diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index d0311584..27397b78 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -6,3 +6,9 @@ d5e3114f7c57c815fe72ae8e2c4c1225352bfc03 # Removed multiline variable declarations ee0d3a7b68e95a9c3e569d582b4efc8aa7fd4d4a + +# Remove leftover nested namespace blocks +c6252ee1c9041e6f4a407816e551455c9d545a53 + +# Apply XAML styler refactor pass to UWP/WinUI 3 samples +e608db8a7f727abda72bde9c538d12b3b4319f55 diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 53ecd86c..7bc4b50e 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -4,25 +4,50 @@ on: [push, pull_request] jobs: - # Build the ComputeSharp project directly. This is the project that - # would be built when running any of the local samples or unit tests. - build-project: + # Build the whole ComputeSharp solution, in Debug + build-solution-debug: runs-on: windows-2022 steps: - name: Git checkout uses: actions/checkout@v2 + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.0.3 + - name: Setup .NET Core 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.x - name: Setup .NET 6 SDK uses: actions/setup-dotnet@v1 with: dotnet-version: 6.0.x - name: Build - run: dotnet build src\ComputeSharp\ComputeSharp.csproj -c Release + run: msbuild -t:restore,build /p:Configuration=Debug /p:Platform=x64 + shell: cmd + + # Build the whole ComputeSharp solution, in Release + build-solution-release: + runs-on: windows-2022 + steps: + - name: Git checkout + uses: actions/checkout@v2 + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.0.3 + - name: Setup .NET Core 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.x + - name: Setup .NET 6 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 6.0.x + - name: Build + run: msbuild -t:restore,build /p:Configuration=Release /p:Platform=x64 shell: cmd # Run all the unit tests referencing the ComputeSharp project directly run-tests: if: success() - needs: [build-project] + needs: [build-solution-debug, build-solution-release] runs-on: windows-2022 steps: - name: Git checkout @@ -125,6 +150,8 @@ jobs: # Buils the .msbuildproj project to generate the NuGet package. # This workflow also uploads the resulting package as an artifact. build-package: + if: success() + needs: [build-solution-debug, build-solution-release] runs-on: windows-2022 steps: - name: Git checkout @@ -186,7 +213,7 @@ jobs: # Run the extra tests to validate a number of build and publishing configurations. # This is used to ensure the native dependencies can always be loaded correctly # regardless of whether the app is shipping with R2R, self-contained, etc. - verify-libs: + verify-package-native-libs: if: success() needs: [verify-package] runs-on: windows-2022 @@ -201,29 +228,11 @@ jobs: run: dotnet test tests\ComputeSharp.Tests.NativeLibrariesResolver\ComputeSharp.Tests.NativeLibrariesResolver.csproj -v n -l "console;verbosity=detailed" shell: cmd - # Build the WinUI panel project - build-project-winui: - runs-on: windows-2022 - steps: - - name: Git checkout - uses: actions/checkout@v2 - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.0.3 - with: - vs-prerelease: true - - name: Setup .NET SDK - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 6.0.x - - name: Build - run: msbuild src\ComputeSharp.WinUI\ComputeSharp.WinUI.csproj -t:restore,build /p:Configuration=Release - shell: cmd - # Build the WinUI project again to generate a NuGet package from it. # This workflow also uploads the resulting package as an artifact. build-package-winui: if: success() - needs: [build-project-winui] + needs: [verify-package] runs-on: windows-2022 steps: - name: Git checkout @@ -235,21 +244,22 @@ jobs: with: dotnet-version: 6.0.x - name: Build - run: msbuild src\ComputeSharp.WinUI\ComputeSharp.WinUI.csproj -t:restore,build /p:Configuration=Release + run: msbuild src\ComputeSharp.WinUI\ComputeSharp.WinUI.csproj -t:restore /p:Configuration=Release /p:ContinuousIntegrationBuild=True shell: cmd - - name: Pack + - name: Build run: msbuild src\ComputeSharp.WinUI\ComputeSharp.WinUI.csproj -t:pack /p:Configuration=Release /p:ContinuousIntegrationBuild=True - shell: cmd + shell: cmd # Packing needs to be done separately and with no previous build target for it to work correctly - name: Upload package artifact uses: actions/upload-artifact@v2 with: name: ComputeSharp.WinUI.nupkg path: src\ComputeSharp.WinUI\bin\Release\*.nupkg - # Build the local WinUI sample to ensure it builds with no errors - build-samples-winui: + # Build the UWP project again to generate a NuGet package from it. + # This workflow also uploads the resulting package as an artifact, like the WinUI one. + build-package-uwp: if: success() - needs: [build-project-winui] + needs: [verify-package] runs-on: windows-2022 steps: - name: Git checkout @@ -260,9 +270,11 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: 6.0.x - - name: Restore ComputeSharp.SwapChain.WinUI sample - run: msbuild samples\ComputeSharp.SwapChain.WinUI\ComputeSharp.SwapChain.WinUI.csproj -t:restore /p:Configuration=Release /p:Platform=x64 + - name: Build + run: msbuild src\ComputeSharp.Uwp\ComputeSharp.Uwp.csproj -t:restore,build,pack /p:Configuration=Release /p:ContinuousIntegrationBuild=True shell: cmd - - name: Build ComputeSharp.SwapChain.WinUI sample - run: msbuild samples\ComputeSharp.SwapChain.WinUI\ComputeSharp.SwapChain.WinUI.csproj -t:build /p:Configuration=Release /p:Platform=x64 - shell: cmd # the build of the sample has to be a separate step, as '-t:restore,build' causes the build to fail \ No newline at end of file + - name: Upload package artifact + uses: actions/upload-artifact@v2 + with: + name: ComputeSharp.Uwp.nupkg + path: src\ComputeSharp.Uwp\bin\Release\*.nupkg \ No newline at end of file diff --git a/ComputeSharp.sln b/ComputeSharp.sln index f1ed2725..d4c0b7a6 100644 --- a/ComputeSharp.sln +++ b/ComputeSharp.sln @@ -58,14 +58,35 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.WinUI", "src\C EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.SwapChain.WinUI", "samples\ComputeSharp.SwapChain.WinUI\ComputeSharp.SwapChain.WinUI.csproj", "{0071701E-B9C5-4098-BE5F-EF556C4553C6}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.Uwp", "src\ComputeSharp.Uwp\ComputeSharp.Uwp.csproj", "{AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputeSharp.SwapChain.Uwp", "samples\ComputeSharp.SwapChain.Uwp\ComputeSharp.SwapChain.Uwp.csproj", "{FBD388A5-7855-4408-98FF-E689F509DB5A}" +EndProject +Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ComputeSharp.UI", "src\ComputeSharp.UI\ComputeSharp.UI.shproj", "{0C82EDE1-5B8A-4DF3-87DA-700B29D5E265}" +EndProject +Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ComputeSharp.SwapChain.Shaders.Shared", "samples\ComputeSharp.SwapChain.Shaders.Shared\ComputeSharp.SwapChain.Shaders.Shared.shproj", "{0800BD51-499D-44C2-9417-FD1F7FDFE9C4}" +EndProject +Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ComputeSharp.SwapChain.Core.Shared", "samples\ComputeSharp.SwapChain.Core.Shared\ComputeSharp.SwapChain.Core.Shared.shproj", "{751BB05B-563D-4B3A-94C6-15E2D79D35EA}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution + samples\ComputeSharp.SwapChain.Core.Shared\ComputeSharp.SwapChain.Core.Shared.projitems*{0071701e-b9c5-4098-be5f-ef556c4553c6}*SharedItemsImports = 5 + samples\ComputeSharp.SwapChain.Shaders.Shared\ComputeSharp.SwapChain.Shaders.Shared.projitems*{0071701e-b9c5-4098-be5f-ef556c4553c6}*SharedItemsImports = 5 + samples\ComputeSharp.SwapChain.Shaders.Shared\ComputeSharp.SwapChain.Shaders.Shared.projitems*{0800bd51-499d-44c2-9417-fd1f7fdfe9c4}*SharedItemsImports = 13 + src\ComputeSharp.UI\ComputeSharp.UI.projitems*{0c82ede1-5b8a-4df3-87da-700b29d5e265}*SharedItemsImports = 13 src\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems*{314eb353-e7e3-4146-8111-685cc83ec1de}*SharedItemsImports = 5 src\TerraFX.Interop.Windows\TerraFX.Interop.Windows.projitems*{314eb353-e7e3-4146-8111-685cc83ec1de}*SharedItemsImports = 5 src\TerraFX.Interop.Windows\TerraFX.Interop.Windows.projitems*{514ff00e-bbf0-4d55-a47c-eeeb6208adce}*SharedItemsImports = 13 samples\ComputeSharp.Sample.Shared\ComputeSharp.Sample.Shared.projitems*{7048deea-0a6f-46a0-b951-b682a8f1cb75}*SharedItemsImports = 5 + samples\ComputeSharp.SwapChain.Core.Shared\ComputeSharp.SwapChain.Core.Shared.projitems*{751bb05b-563d-4b3a-94c6-15e2d79d35ea}*SharedItemsImports = 13 samples\ComputeSharp.Sample.Shared\ComputeSharp.Sample.Shared.projitems*{8cefc324-ca6c-4845-9ad9-70b92bd87057}*SharedItemsImports = 13 src\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems*{a5997814-d8d2-4541-87ac-c3e53caa67c0}*SharedItemsImports = 13 + src\ComputeSharp.UI\ComputeSharp.UI.projitems*{afaafdc9-be42-45d4-8c79-0ee8c8edbf52}*SharedItemsImports = 5 + samples\ComputeSharp.SwapChain.Shaders.Shared\ComputeSharp.SwapChain.Shaders.Shared.projitems*{e7c9247d-016b-4819-af9f-0e9b3591e04b}*SharedItemsImports = 5 + samples\ComputeSharp.SwapChain.Shaders.Shared\ComputeSharp.SwapChain.Shaders.Shared.projitems*{e91f4d24-922a-4921-a8d7-9c45a143c45d}*SharedItemsImports = 5 + src\ComputeSharp.UI\ComputeSharp.UI.projitems*{fa18ba9f-76bf-4de0-8d24-02fc7657e6cb}*SharedItemsImports = 5 + samples\ComputeSharp.SwapChain.Core.Shared\ComputeSharp.SwapChain.Core.Shared.projitems*{fbd388a5-7855-4408-98ff-e689f509db5a}*SharedItemsImports = 4 + samples\ComputeSharp.SwapChain.Shaders.Shared\ComputeSharp.SwapChain.Shaders.Shared.projitems*{fbd388a5-7855-4408-98ff-e689f509db5a}*SharedItemsImports = 4 EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -250,6 +271,36 @@ Global {0071701E-B9C5-4098-BE5F-EF556C4553C6}.Release|x64.ActiveCfg = Release|x64 {0071701E-B9C5-4098-BE5F-EF556C4553C6}.Release|x64.Build.0 = Release|x64 {0071701E-B9C5-4098-BE5F-EF556C4553C6}.Release|x64.Deploy.0 = Release|x64 + {AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}.Debug|Any CPU.ActiveCfg = Debug|x64 + {AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}.Debug|Any CPU.Build.0 = Debug|x64 + {AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}.Debug|ARM64.Build.0 = Debug|ARM64 + {AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}.Debug|x64.ActiveCfg = Debug|x64 + {AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}.Debug|x64.Build.0 = Debug|x64 + {AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}.Release|Any CPU.Build.0 = Release|Any CPU + {AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}.Release|ARM64.ActiveCfg = Release|ARM64 + {AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}.Release|ARM64.Build.0 = Release|ARM64 + {AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}.Release|x64.ActiveCfg = Release|x64 + {AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}.Release|x64.Build.0 = Release|x64 + {FBD388A5-7855-4408-98FF-E689F509DB5A}.Debug|Any CPU.ActiveCfg = Debug|x64 + {FBD388A5-7855-4408-98FF-E689F509DB5A}.Debug|Any CPU.Build.0 = Debug|x64 + {FBD388A5-7855-4408-98FF-E689F509DB5A}.Debug|Any CPU.Deploy.0 = Debug|x64 + {FBD388A5-7855-4408-98FF-E689F509DB5A}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {FBD388A5-7855-4408-98FF-E689F509DB5A}.Debug|ARM64.Build.0 = Debug|ARM64 + {FBD388A5-7855-4408-98FF-E689F509DB5A}.Debug|ARM64.Deploy.0 = Debug|ARM64 + {FBD388A5-7855-4408-98FF-E689F509DB5A}.Debug|x64.ActiveCfg = Debug|x64 + {FBD388A5-7855-4408-98FF-E689F509DB5A}.Debug|x64.Build.0 = Debug|x64 + {FBD388A5-7855-4408-98FF-E689F509DB5A}.Debug|x64.Deploy.0 = Debug|x64 + {FBD388A5-7855-4408-98FF-E689F509DB5A}.Release|Any CPU.ActiveCfg = Release|x64 + {FBD388A5-7855-4408-98FF-E689F509DB5A}.Release|Any CPU.Build.0 = Release|x64 + {FBD388A5-7855-4408-98FF-E689F509DB5A}.Release|Any CPU.Deploy.0 = Release|x64 + {FBD388A5-7855-4408-98FF-E689F509DB5A}.Release|ARM64.ActiveCfg = Release|ARM64 + {FBD388A5-7855-4408-98FF-E689F509DB5A}.Release|ARM64.Build.0 = Release|ARM64 + {FBD388A5-7855-4408-98FF-E689F509DB5A}.Release|ARM64.Deploy.0 = Release|ARM64 + {FBD388A5-7855-4408-98FF-E689F509DB5A}.Release|x64.ActiveCfg = Release|x64 + {FBD388A5-7855-4408-98FF-E689F509DB5A}.Release|x64.Build.0 = Release|x64 + {FBD388A5-7855-4408-98FF-E689F509DB5A}.Release|x64.Deploy.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -269,6 +320,9 @@ Global {A5997814-D8D2-4541-87AC-C3E53CAA67C0} = {8DCE343F-BA78-4FE1-B562-B57C603A8BAA} {514FF00E-BBF0-4D55-A47C-EEEB6208ADCE} = {8DCE343F-BA78-4FE1-B562-B57C603A8BAA} {0071701E-B9C5-4098-BE5F-EF556C4553C6} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1} + {FBD388A5-7855-4408-98FF-E689F509DB5A} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1} + {0800BD51-499D-44C2-9417-FD1F7FDFE9C4} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1} + {751BB05B-563D-4B3A-94C6-15E2D79D35EA} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4664C5E3-0340-4E22-BCFD-98AAEDF5F2DC} diff --git a/Directory.Build.props b/Directory.Build.props index 7b324180..b15ad129 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,6 +3,7 @@ true 10.0 enable + true Sergio Pedri Copyright (c) 2021 Sergio Pedri $(NoWarn);MSB3270 @@ -23,9 +24,15 @@ icon.png https://user-images.githubusercontent.com/10199417/110238403-b8811080-7f41-11eb-8cfe-e47e7e58f05b.png dotnet net netcore netstandard csharp library graphics directx shader hlsl compute gpu performance parallel windows + true - + + + + + + \ No newline at end of file diff --git a/global.json b/global.json new file mode 100644 index 00000000..8a794e68 --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "msbuild-sdks": + { + "MSBuild.Sdk.Extras": "3.0.38" + } + } \ No newline at end of file diff --git a/samples/ComputeSharp.ImageProcessing/Processors/HlslBokehBlurProcessor{TPixel}.cs b/samples/ComputeSharp.ImageProcessing/Processors/HlslBokehBlurProcessor{TPixel}.cs index e41bb4f6..79eb4b45 100644 --- a/samples/ComputeSharp.ImageProcessing/Processors/HlslBokehBlurProcessor{TPixel}.cs +++ b/samples/ComputeSharp.ImageProcessing/Processors/HlslBokehBlurProcessor{TPixel}.cs @@ -56,7 +56,7 @@ public sealed partial class HlslBokehBlurProcessor private readonly float KernelsScale; /// - /// The mapping of initialized complex kernels and parameters, to speed up the initialization of new instances. + /// The mapping of initialized complex kernels and parameters, to speed up the initialization of new instances. /// private static readonly ConcurrentDictionary<(int Radius, int ComponentsCount), (Vector4[] Parameters, float Scale, Complex64[][] Kernels)> Cache = new(); diff --git a/samples/ComputeSharp.SwapChain.Core.Shared/ComputeSharp.SwapChain.Core.Shared.projitems b/samples/ComputeSharp.SwapChain.Core.Shared/ComputeSharp.SwapChain.Core.Shared.projitems new file mode 100644 index 00000000..2a5e911c --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Core.Shared/ComputeSharp.SwapChain.Core.Shared.projitems @@ -0,0 +1,18 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + true + 751bb05b-563d-4b3a-94c6-15e2d79d35ea + + + ComputeSharp.SwapChain.Core.Shared + + + + + + + + + \ No newline at end of file diff --git a/samples/ComputeSharp.SwapChain.Core.Shared/ComputeSharp.SwapChain.Core.Shared.shproj b/samples/ComputeSharp.SwapChain.Core.Shared/ComputeSharp.SwapChain.Core.Shared.shproj new file mode 100644 index 00000000..db365a5b --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Core.Shared/ComputeSharp.SwapChain.Core.Shared.shproj @@ -0,0 +1,13 @@ + + + + 751bb05b-563d-4b3a-94c6-15e2d79d35ea + 14.0 + + + + + + + + diff --git a/samples/ComputeSharp.SwapChain.WinUI/Converters/RenderingPauseConverter.cs b/samples/ComputeSharp.SwapChain.Core.Shared/Converters/RenderingPauseConverter.cs similarity index 77% rename from samples/ComputeSharp.SwapChain.WinUI/Converters/RenderingPauseConverter.cs rename to samples/ComputeSharp.SwapChain.Core.Shared/Converters/RenderingPauseConverter.cs index 5c8ae0bf..18c8479b 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/Converters/RenderingPauseConverter.cs +++ b/samples/ComputeSharp.SwapChain.Core.Shared/Converters/RenderingPauseConverter.cs @@ -1,6 +1,10 @@ -using Microsoft.UI.Xaml.Controls; +#if WINDOWS_UWP +using Windows.UI.Xaml.Controls; +#else +using Microsoft.UI.Xaml.Controls; +#endif -namespace ComputeSharp.SwapChain.WinUI.Converters; +namespace ComputeSharp.SwapChain.Core.Converters; /// /// A class with some static converters for rendering state. diff --git a/samples/ComputeSharp.SwapChain.WinUI/Converters/ResolutionScaleConverter.cs b/samples/ComputeSharp.SwapChain.Core.Shared/Converters/ResolutionScaleConverter.cs similarity index 94% rename from samples/ComputeSharp.SwapChain.WinUI/Converters/ResolutionScaleConverter.cs rename to samples/ComputeSharp.SwapChain.Core.Shared/Converters/ResolutionScaleConverter.cs index 1d242fc7..b13c844a 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/Converters/ResolutionScaleConverter.cs +++ b/samples/ComputeSharp.SwapChain.Core.Shared/Converters/ResolutionScaleConverter.cs @@ -1,4 +1,4 @@ -namespace ComputeSharp.SwapChain.WinUI.Converters; +namespace ComputeSharp.SwapChain.Core.Converters; /// /// A class with some static converters for resolution scale settings. diff --git a/samples/ComputeSharp.SwapChain.WinUI/Models/ComputeShader.cs b/samples/ComputeSharp.SwapChain.Core.Shared/Models/ComputeShader.cs similarity index 91% rename from samples/ComputeSharp.SwapChain.WinUI/Models/ComputeShader.cs rename to samples/ComputeSharp.SwapChain.Core.Shared/Models/ComputeShader.cs index 9816232b..77ff496f 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/Models/ComputeShader.cs +++ b/samples/ComputeSharp.SwapChain.Core.Shared/Models/ComputeShader.cs @@ -1,7 +1,13 @@ using CommunityToolkit.Mvvm.ComponentModel; +#if WINDOWS_UWP +using ComputeSharp.Uwp; +#else using ComputeSharp.WinUI; +#endif -namespace ComputeSharp.SwapChain.WinUI.Models; +#nullable enable + +namespace ComputeSharp.SwapChain.Core.Models; /// /// A model for a compute shader. diff --git a/samples/ComputeSharp.SwapChain.WinUI/Shaders/Runners/ContouredLayersRunner.cs b/samples/ComputeSharp.SwapChain.Core.Shared/Shaders/Runners/ContouredLayersRunner.cs similarity index 88% rename from samples/ComputeSharp.SwapChain.WinUI/Shaders/Runners/ContouredLayersRunner.cs rename to samples/ComputeSharp.SwapChain.Core.Shared/Shaders/Runners/ContouredLayersRunner.cs index 1a09c53a..6e91c5e5 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/Shaders/Runners/ContouredLayersRunner.cs +++ b/samples/ComputeSharp.SwapChain.Core.Shared/Shaders/Runners/ContouredLayersRunner.cs @@ -1,10 +1,16 @@ using System; using System.IO; using ComputeSharp.SwapChain.Shaders; +#if WINDOWS_UWP +using ComputeSharp.Uwp; +#else using ComputeSharp.WinUI; +#endif using Windows.ApplicationModel; -namespace ComputeSharp.SwapChain.WinUI.Shaders.Runners; +#nullable enable + +namespace ComputeSharp.SwapChain.Core.Shaders.Runners; /// /// A specialized for . diff --git a/samples/ComputeSharp.SwapChain.WinUI/ViewModels/MainViewModel.cs b/samples/ComputeSharp.SwapChain.Core.Shared/ViewModels/MainViewModel.cs similarity index 95% rename from samples/ComputeSharp.SwapChain.WinUI/ViewModels/MainViewModel.cs rename to samples/ComputeSharp.SwapChain.Core.Shared/ViewModels/MainViewModel.cs index 0340006a..db1a5868 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/ViewModels/MainViewModel.cs +++ b/samples/ComputeSharp.SwapChain.Core.Shared/ViewModels/MainViewModel.cs @@ -1,12 +1,18 @@ using System.Collections.Generic; -using ComputeSharp.SwapChain.Shaders; -using ComputeSharp.SwapChain.WinUI.Models; -using ComputeSharp.WinUI; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; -using ComputeSharp.SwapChain.WinUI.Shaders.Runners; +using ComputeSharp.SwapChain.Core.Models; +using ComputeSharp.SwapChain.Core.Shaders.Runners; +using ComputeSharp.SwapChain.Shaders; +#if WINDOWS_UWP +using ComputeSharp.Uwp; +#else +using ComputeSharp.WinUI; +#endif -namespace ComputeSharp.SwapChain.WinUI.ViewModels; +#nullable enable + +namespace ComputeSharp.SwapChain.Core.ViewModels; /// /// The viewmodel for for a view that allows users to select shaders and customize settings. diff --git a/samples/ComputeSharp.SwapChain/Shaders/ColorfulInfinity.cs b/samples/ComputeSharp.SwapChain.Shaders.Shared/ColorfulInfinity.cs similarity index 100% rename from samples/ComputeSharp.SwapChain/Shaders/ColorfulInfinity.cs rename to samples/ComputeSharp.SwapChain.Shaders.Shared/ColorfulInfinity.cs diff --git a/samples/ComputeSharp.SwapChain.Shaders.Shared/ComputeSharp.SwapChain.Shaders.Shared.projitems b/samples/ComputeSharp.SwapChain.Shaders.Shared/ComputeSharp.SwapChain.Shaders.Shared.projitems new file mode 100644 index 00000000..6c0c0b40 --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Shaders.Shared/ComputeSharp.SwapChain.Shaders.Shared.projitems @@ -0,0 +1,25 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + true + 0800bd51-499d-44c2-9417-fd1f7fdfe9c4 + + + ComputeSharp.SwapChain.Shaders.Shared + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/ComputeSharp.SwapChain.Shaders.Shared/ComputeSharp.SwapChain.Shaders.Shared.shproj b/samples/ComputeSharp.SwapChain.Shaders.Shared/ComputeSharp.SwapChain.Shaders.Shared.shproj new file mode 100644 index 00000000..293130fe --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Shaders.Shared/ComputeSharp.SwapChain.Shaders.Shared.shproj @@ -0,0 +1,13 @@ + + + + 0800bd51-499d-44c2-9417-fd1f7fdfe9c4 + 14.0 + + + + + + + + diff --git a/samples/ComputeSharp.SwapChain/Shaders/ContouredLayers.cs b/samples/ComputeSharp.SwapChain.Shaders.Shared/ContouredLayers.cs similarity index 100% rename from samples/ComputeSharp.SwapChain/Shaders/ContouredLayers.cs rename to samples/ComputeSharp.SwapChain.Shaders.Shared/ContouredLayers.cs diff --git a/samples/ComputeSharp.SwapChain/Shaders/ExtrudedTruchetPattern.cs b/samples/ComputeSharp.SwapChain.Shaders.Shared/ExtrudedTruchetPattern.cs similarity index 100% rename from samples/ComputeSharp.SwapChain/Shaders/ExtrudedTruchetPattern.cs rename to samples/ComputeSharp.SwapChain.Shaders.Shared/ExtrudedTruchetPattern.cs diff --git a/samples/ComputeSharp.SwapChain/Shaders/FourColorGradient.cs b/samples/ComputeSharp.SwapChain.Shaders.Shared/FourColorGradient.cs similarity index 100% rename from samples/ComputeSharp.SwapChain/Shaders/FourColorGradient.cs rename to samples/ComputeSharp.SwapChain.Shaders.Shared/FourColorGradient.cs diff --git a/samples/ComputeSharp.SwapChain/Shaders/FractalTiling.cs b/samples/ComputeSharp.SwapChain.Shaders.Shared/FractalTiling.cs similarity index 100% rename from samples/ComputeSharp.SwapChain/Shaders/FractalTiling.cs rename to samples/ComputeSharp.SwapChain.Shaders.Shared/FractalTiling.cs diff --git a/samples/ComputeSharp.SwapChain.Shaders.Shared/HelloWorld.cs b/samples/ComputeSharp.SwapChain.Shaders.Shared/HelloWorld.cs new file mode 100644 index 00000000..b3ab8088 --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Shaders.Shared/HelloWorld.cs @@ -0,0 +1,27 @@ +namespace ComputeSharp.SwapChain.Shaders; + +/// +/// A simple shader to get started with based on shadertoy new shader template. +/// Ported from . +/// +[AutoConstructor] +internal readonly partial struct HelloWorld : IPixelShader +{ + /// + /// The current time since the start of the application. + /// + public readonly float time; + + /// + public float4 Execute() + { + // Normalized screen space UV coordinates from 0.0 to 1.0 + float2 uv = ThreadIds.Normalized.XY; + + // Time varying pixel color + float3 col = 0.5f + 0.5f * Hlsl.Cos(time + new float3(uv, uv.X) + new float3(0, 2, 4)); + + // Output to screen + return new(col, 1f); + } +} diff --git a/samples/ComputeSharp.SwapChain/Shaders/MengerJourney.cs b/samples/ComputeSharp.SwapChain.Shaders.Shared/MengerJourney.cs similarity index 100% rename from samples/ComputeSharp.SwapChain/Shaders/MengerJourney.cs rename to samples/ComputeSharp.SwapChain.Shaders.Shared/MengerJourney.cs diff --git a/samples/ComputeSharp.SwapChain/Shaders/Octagrams.cs b/samples/ComputeSharp.SwapChain.Shaders.Shared/Octagrams.cs similarity index 100% rename from samples/ComputeSharp.SwapChain/Shaders/Octagrams.cs rename to samples/ComputeSharp.SwapChain.Shaders.Shared/Octagrams.cs diff --git a/samples/ComputeSharp.SwapChain/Shaders/ProteanClouds.cs b/samples/ComputeSharp.SwapChain.Shaders.Shared/ProteanClouds.cs similarity index 100% rename from samples/ComputeSharp.SwapChain/Shaders/ProteanClouds.cs rename to samples/ComputeSharp.SwapChain.Shaders.Shared/ProteanClouds.cs diff --git a/samples/ComputeSharp.SwapChain/Shaders/PyramidPattern.cs b/samples/ComputeSharp.SwapChain.Shaders.Shared/PyramidPattern.cs similarity index 100% rename from samples/ComputeSharp.SwapChain/Shaders/PyramidPattern.cs rename to samples/ComputeSharp.SwapChain.Shaders.Shared/PyramidPattern.cs diff --git a/samples/ComputeSharp.SwapChain/Shaders/TriangleGridContouring.cs b/samples/ComputeSharp.SwapChain.Shaders.Shared/TriangleGridContouring.cs similarity index 100% rename from samples/ComputeSharp.SwapChain/Shaders/TriangleGridContouring.cs rename to samples/ComputeSharp.SwapChain.Shaders.Shared/TriangleGridContouring.cs diff --git a/samples/ComputeSharp.SwapChain/Shaders/TwoTiledTruchet.cs b/samples/ComputeSharp.SwapChain.Shaders.Shared/TwoTiledTruchet.cs similarity index 100% rename from samples/ComputeSharp.SwapChain/Shaders/TwoTiledTruchet.cs rename to samples/ComputeSharp.SwapChain.Shaders.Shared/TwoTiledTruchet.cs diff --git a/samples/ComputeSharp.SwapChain.Uwp/App.xaml b/samples/ComputeSharp.SwapChain.Uwp/App.xaml new file mode 100644 index 00000000..c01ce6cb --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Uwp/App.xaml @@ -0,0 +1,4 @@ + diff --git a/samples/ComputeSharp.SwapChain.Uwp/App.xaml.cs b/samples/ComputeSharp.SwapChain.Uwp/App.xaml.cs new file mode 100644 index 00000000..720413f7 --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Uwp/App.xaml.cs @@ -0,0 +1,72 @@ +using ComputeSharp.SwapChain.Uwp.Views; +using Windows.ApplicationModel.Activation; +using Windows.ApplicationModel.Core; +using Windows.UI; +using Windows.UI.ViewManagement; +using Windows.UI.Xaml; + +namespace ComputeSharp.SwapChain.Uwp; + +/// +/// Provides application-specific behavior to supplement the default Application class. +/// +sealed partial class App : Application +{ + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public App() + { + this.InitializeComponent(); + } + + /// + protected override void OnLaunched(LaunchActivatedEventArgs e) + { + if (Window.Current.Content is not MainView) + { + StyleTitleBar(); + ExpandViewIntoTitleBar(); + + Window.Current.Content = new MainView(); + } + + if (!e.PrelaunchActivated) + { + Window.Current.Activate(); + } + } + + /// + /// Styles the title bar buttons according to the theme in use + /// + private static void StyleTitleBar() + { + ApplicationViewTitleBar titleBar = ApplicationView.GetForCurrentView().TitleBar; + + // Transparent colors + titleBar.ForegroundColor = Colors.Transparent; + titleBar.BackgroundColor = Colors.Transparent; + titleBar.ButtonBackgroundColor = Colors.Transparent; + titleBar.InactiveBackgroundColor = Colors.Transparent; + titleBar.ButtonInactiveBackgroundColor = Colors.Transparent; + + // Theme aware colors + titleBar.ButtonForegroundColor = titleBar.ButtonHoverForegroundColor = titleBar.ButtonPressedForegroundColor = Colors.White; + titleBar.ButtonHoverBackgroundColor = Color.FromArgb(0x20, 0xFF, 0xFF, 0xFF); + titleBar.ButtonPressedBackgroundColor = Color.FromArgb(0x40, 0xFF, 0xFF, 0xFF); + titleBar.ButtonInactiveForegroundColor = Color.FromArgb(0xC0, 0xFF, 0xFF, 0xFF); + titleBar.InactiveForegroundColor = Color.FromArgb(0xA0, 0xA0, 0xA0, 0xA0); + } + + /// + /// Sets up the app UI to be expanded into the title bar + /// + private static void ExpandViewIntoTitleBar() + { + CoreApplicationViewTitleBar coreTitleBar = CoreApplication.GetCurrentView().TitleBar; + + coreTitleBar.ExtendViewIntoTitleBar = true; + } +} diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/LargeTile.scale-100.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/LargeTile.scale-100.png new file mode 100644 index 00000000..a15aa789 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/LargeTile.scale-100.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/LargeTile.scale-125.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/LargeTile.scale-125.png new file mode 100644 index 00000000..cdd395eb Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/LargeTile.scale-125.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/LargeTile.scale-150.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/LargeTile.scale-150.png new file mode 100644 index 00000000..a11860e1 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/LargeTile.scale-150.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/LargeTile.scale-200.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/LargeTile.scale-200.png new file mode 100644 index 00000000..27b8d951 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/LargeTile.scale-200.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/LargeTile.scale-400.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/LargeTile.scale-400.png new file mode 100644 index 00000000..451db4e9 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/LargeTile.scale-400.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/LockScreenLogo.scale-200.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 00000000..735f57ad Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/LockScreenLogo.scale-200.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Misc/noise_low.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Misc/noise_low.png new file mode 100644 index 00000000..0784c124 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Misc/noise_low.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/SmallTile.scale-100.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/SmallTile.scale-100.png new file mode 100644 index 00000000..4186c153 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/SmallTile.scale-100.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/SmallTile.scale-125.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/SmallTile.scale-125.png new file mode 100644 index 00000000..b89a3b30 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/SmallTile.scale-125.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/SmallTile.scale-150.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/SmallTile.scale-150.png new file mode 100644 index 00000000..bd2cc348 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/SmallTile.scale-150.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/SmallTile.scale-200.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/SmallTile.scale-200.png new file mode 100644 index 00000000..b3791a08 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/SmallTile.scale-200.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/SmallTile.scale-400.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/SmallTile.scale-400.png new file mode 100644 index 00000000..ccf5830b Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/SmallTile.scale-400.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/SplashScreen.scale-100.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/SplashScreen.scale-100.png new file mode 100644 index 00000000..06b1422b Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/SplashScreen.scale-100.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/SplashScreen.scale-125.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/SplashScreen.scale-125.png new file mode 100644 index 00000000..74b67d70 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/SplashScreen.scale-125.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/SplashScreen.scale-150.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/SplashScreen.scale-150.png new file mode 100644 index 00000000..81754d90 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/SplashScreen.scale-150.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/SplashScreen.scale-200.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/SplashScreen.scale-200.png new file mode 100644 index 00000000..dd6c312b Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/SplashScreen.scale-200.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/SplashScreen.scale-400.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/SplashScreen.scale-400.png new file mode 100644 index 00000000..b28b180c Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/SplashScreen.scale-400.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square150x150Logo.scale-100.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square150x150Logo.scale-100.png new file mode 100644 index 00000000..32bd822d Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square150x150Logo.scale-100.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square150x150Logo.scale-125.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square150x150Logo.scale-125.png new file mode 100644 index 00000000..f4342abc Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square150x150Logo.scale-125.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square150x150Logo.scale-150.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square150x150Logo.scale-150.png new file mode 100644 index 00000000..c1107980 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square150x150Logo.scale-150.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square150x150Logo.scale-200.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 00000000..79e9c5e4 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square150x150Logo.scale-200.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square150x150Logo.scale-400.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square150x150Logo.scale-400.png new file mode 100644 index 00000000..73ceb76b Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square150x150Logo.scale-400.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png new file mode 100644 index 00000000..18275c6f Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png new file mode 100644 index 00000000..7561de6f Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png new file mode 100644 index 00000000..f50843bd Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png new file mode 100644 index 00000000..3d4ee641 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png new file mode 100644 index 00000000..e003e7e6 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-unplated_targetsize-16.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-unplated_targetsize-16.png new file mode 100644 index 00000000..18275c6f Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-unplated_targetsize-16.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-unplated_targetsize-256.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-unplated_targetsize-256.png new file mode 100644 index 00000000..f50843bd Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-unplated_targetsize-256.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-unplated_targetsize-32.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-unplated_targetsize-32.png new file mode 100644 index 00000000..3d4ee641 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-unplated_targetsize-32.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-unplated_targetsize-48.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-unplated_targetsize-48.png new file mode 100644 index 00000000..e003e7e6 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.altform-unplated_targetsize-48.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.scale-100.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.scale-100.png new file mode 100644 index 00000000..e6b266e0 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.scale-100.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.scale-125.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.scale-125.png new file mode 100644 index 00000000..ba883192 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.scale-125.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.scale-150.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.scale-150.png new file mode 100644 index 00000000..6a0ee022 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.scale-150.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.scale-200.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 00000000..3ce9873d Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.scale-200.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.scale-400.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.scale-400.png new file mode 100644 index 00000000..74d1bded Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.scale-400.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.targetsize-16.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.targetsize-16.png new file mode 100644 index 00000000..18275c6f Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.targetsize-16.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.targetsize-24.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.targetsize-24.png new file mode 100644 index 00000000..7561de6f Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.targetsize-24.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 00000000..e3ab7e4c Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.targetsize-256.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.targetsize-256.png new file mode 100644 index 00000000..f50843bd Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.targetsize-256.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.targetsize-32.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.targetsize-32.png new file mode 100644 index 00000000..b44a854c Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.targetsize-32.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.targetsize-48.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.targetsize-48.png new file mode 100644 index 00000000..1bf9d6f6 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Square44x44Logo.targetsize-48.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/StoreLogo.backup.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/StoreLogo.backup.png new file mode 100644 index 00000000..7385b56c Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/StoreLogo.backup.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/StoreLogo.scale-100.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/StoreLogo.scale-100.png new file mode 100644 index 00000000..1ed8820e Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/StoreLogo.scale-100.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/StoreLogo.scale-125.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/StoreLogo.scale-125.png new file mode 100644 index 00000000..cf1dbb07 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/StoreLogo.scale-125.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/StoreLogo.scale-150.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/StoreLogo.scale-150.png new file mode 100644 index 00000000..fa496dca Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/StoreLogo.scale-150.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/StoreLogo.scale-200.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/StoreLogo.scale-200.png new file mode 100644 index 00000000..829aa3b5 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/StoreLogo.scale-200.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/StoreLogo.scale-400.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/StoreLogo.scale-400.png new file mode 100644 index 00000000..6e28acc7 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/StoreLogo.scale-400.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Wide310x150Logo.scale-100.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Wide310x150Logo.scale-100.png new file mode 100644 index 00000000..96ad84bc Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Wide310x150Logo.scale-100.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Wide310x150Logo.scale-125.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Wide310x150Logo.scale-125.png new file mode 100644 index 00000000..6bb12caa Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Wide310x150Logo.scale-125.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Wide310x150Logo.scale-150.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Wide310x150Logo.scale-150.png new file mode 100644 index 00000000..47b73b95 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Wide310x150Logo.scale-150.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Wide310x150Logo.scale-200.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Wide310x150Logo.scale-200.png new file mode 100644 index 00000000..06b1422b Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Wide310x150Logo.scale-200.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/Assets/Wide310x150Logo.scale-400.png b/samples/ComputeSharp.SwapChain.Uwp/Assets/Wide310x150Logo.scale-400.png new file mode 100644 index 00000000..dd6c312b Binary files /dev/null and b/samples/ComputeSharp.SwapChain.Uwp/Assets/Wide310x150Logo.scale-400.png differ diff --git a/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj b/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj new file mode 100644 index 00000000..62ed2535 --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj @@ -0,0 +1,239 @@ + + + + + Debug + x86 + {FBD388A5-7855-4408-98FF-E689F509DB5A} + AppContainerExe + Properties + ComputeSharp.SwapChain.Uwp + ComputeSharp.SwapChain.Uwp + en-US + UAP + 10.0.19041.0 + 10.0.17763.0 + 14 + 512 + {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + true + false + + + true + bin\x86\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + x86 + false + prompt + true + + + bin\x86\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + x86 + false + prompt + true + true + + + true + bin\ARM\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + ARM + false + prompt + true + + + bin\ARM\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + ARM + false + prompt + true + true + + + true + bin\ARM64\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + ARM64 + false + prompt + true + true + + + bin\ARM64\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + ARM64 + false + prompt + true + true + + + true + bin\x64\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + x64 + false + prompt + true + + + bin\x64\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + x64 + false + prompt + true + true + + + PackageReference + + + + App.xaml + + + + MainView.xaml + + + + + Designer + + + + + + + + + + PreserveNewest + + + Assets\Textures\RustyMetal.png + PreserveNewest + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MSBuild:Compile + Designer + + + + + 7.1.2 + + + 6.2.13 + + + 7.1.2 + + + 7.1.2 + + + + + + + + + + + Designer + MSBuild:Compile + + + + + + 14.0 + + + + \ No newline at end of file diff --git a/samples/ComputeSharp.SwapChain.Uwp/Package.appxmanifest b/samples/ComputeSharp.SwapChain.Uwp/Package.appxmanifest new file mode 100644 index 00000000..eb50ef1e --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Uwp/Package.appxmanifest @@ -0,0 +1,51 @@ + + + + + + + + + + ComputeSharp Sample App + Sergio Pedri + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/ComputeSharp.SwapChain.Uwp/Properties/AssemblyInfo.cs b/samples/ComputeSharp.SwapChain.Uwp/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..84399f6d --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Uwp/Properties/AssemblyInfo.cs @@ -0,0 +1,29 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ComputeSharp.SwapChain.Uwp")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ComputeSharp.SwapChain.Uwp")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: ComVisible(false)] \ No newline at end of file diff --git a/samples/ComputeSharp.SwapChain.Uwp/Properties/Default.rd.xml b/samples/ComputeSharp.SwapChain.Uwp/Properties/Default.rd.xml new file mode 100644 index 00000000..819be7a4 --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Uwp/Properties/Default.rd.xml @@ -0,0 +1,21 @@ + + + + + + \ No newline at end of file diff --git a/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml b/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml new file mode 100644 index 00000000..fe94efd1 --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml @@ -0,0 +1,233 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml.cs b/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml.cs new file mode 100644 index 00000000..92b663c5 --- /dev/null +++ b/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml.cs @@ -0,0 +1,36 @@ +using System; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Input; + +namespace ComputeSharp.SwapChain.Uwp.Views; + +/// +/// A view for . +/// +public sealed partial class MainView : UserControl +{ + public MainView() + { + this.InitializeComponent(); + } + + // Opens the shader selection panel + private void OpenShaderSelectionPanelButton_Click(object sender, RoutedEventArgs e) + { + Root.Resources.Remove("ShaderSelectionPanel"); + Root.Children.Add(ShaderSelectionPanel); + } + + // Hides the shader selection panel + private void ShaderSelectionPanel_Tapped(object sender, TappedRoutedEventArgs e) + { + Root.Children.Remove(ShaderSelectionPanel); + } + + // Updates the size of the shaders list panel + private void UserControl_SizeChanged(object sender, SizeChangedEventArgs e) + { + ShadersListContainerPanel.Height = Math.Round(e.NewSize.Height * 0.35); + } +} diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-100.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-100.png new file mode 100644 index 00000000..d6c0045a Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-100.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-125.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-125.png new file mode 100644 index 00000000..5122e651 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-125.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-150.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-150.png new file mode 100644 index 00000000..53a9bc92 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-150.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-200.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-200.png new file mode 100644 index 00000000..cc8b55f3 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-200.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-400.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-400.png new file mode 100644 index 00000000..e774041e Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/LargeTile.scale-400.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-100.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-100.png new file mode 100644 index 00000000..605059d8 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-100.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-125.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-125.png new file mode 100644 index 00000000..cea40610 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-125.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-150.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-150.png new file mode 100644 index 00000000..3a7361dd Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-150.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-200.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-200.png new file mode 100644 index 00000000..75b9b2b3 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-200.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-400.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-400.png new file mode 100644 index 00000000..418563fc Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/SmallTile.scale-400.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-100.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-100.png new file mode 100644 index 00000000..d800c4a0 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-100.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-125.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-125.png new file mode 100644 index 00000000..e2117c20 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-125.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-150.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-150.png new file mode 100644 index 00000000..08abf805 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-150.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-200.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-200.png index 32f486a8..1df2cb62 100644 Binary files a/samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-200.png and b/samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-200.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-400.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-400.png new file mode 100644 index 00000000..5aebcf43 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/SplashScreen.scale-400.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-100.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-100.png new file mode 100644 index 00000000..97045881 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-100.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-125.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-125.png new file mode 100644 index 00000000..b3f74401 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-125.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-150.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-150.png new file mode 100644 index 00000000..e4861d09 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-150.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-200.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-200.png index 53ee3777..84faf5ff 100644 Binary files a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-200.png and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-200.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-400.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-400.png new file mode 100644 index 00000000..3104ab19 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square150x150Logo.scale-400.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png new file mode 100644 index 00000000..6c39100e Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png new file mode 100644 index 00000000..3e58e5b6 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png new file mode 100644 index 00000000..f50843bd Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png new file mode 100644 index 00000000..90a762d9 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png new file mode 100644 index 00000000..0d8c72f0 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-16.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-16.png new file mode 100644 index 00000000..6c39100e Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-16.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-256.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-256.png new file mode 100644 index 00000000..f50843bd Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-256.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-32.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-32.png new file mode 100644 index 00000000..90a762d9 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-32.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-48.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-48.png new file mode 100644 index 00000000..0d8c72f0 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.altform-unplated_targetsize-48.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-100.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-100.png new file mode 100644 index 00000000..11dabfee Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-100.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-125.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-125.png new file mode 100644 index 00000000..1ff0964b Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-125.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-150.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-150.png new file mode 100644 index 00000000..4255eac3 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-150.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-200.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-200.png index f713bba6..f02661b2 100644 Binary files a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-200.png and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-200.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-400.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-400.png new file mode 100644 index 00000000..64e172ad Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.scale-400.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-16.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-16.png new file mode 100644 index 00000000..6c39100e Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-16.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-24.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-24.png new file mode 100644 index 00000000..3e58e5b6 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-24.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-24_altform-unplated.png index dc9f5bea..3e58e5b6 100644 Binary files a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-24_altform-unplated.png and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-256.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-256.png new file mode 100644 index 00000000..f50843bd Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-256.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-32.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-32.png new file mode 100644 index 00000000..90a762d9 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-32.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-48.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-48.png new file mode 100644 index 00000000..0d8c72f0 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Square44x44Logo.targetsize-48.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.backup.png similarity index 100% rename from samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.png rename to samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.backup.png diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-100.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-100.png new file mode 100644 index 00000000..1ed8820e Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-100.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-125.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-125.png new file mode 100644 index 00000000..cf1dbb07 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-125.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-150.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-150.png new file mode 100644 index 00000000..966a6067 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-150.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-200.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-200.png new file mode 100644 index 00000000..7bc22428 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-200.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-400.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-400.png new file mode 100644 index 00000000..87e3523c Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/StoreLogo.scale-400.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-100.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-100.png new file mode 100644 index 00000000..a5704b35 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-100.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-125.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-125.png new file mode 100644 index 00000000..d92c4699 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-125.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-150.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-150.png new file mode 100644 index 00000000..73ac19b2 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-150.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-200.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-200.png index 8b4a5d0d..d800c4a0 100644 Binary files a/samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-200.png and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-200.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-400.png b/samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-400.png new file mode 100644 index 00000000..1df2cb62 Binary files /dev/null and b/samples/ComputeSharp.SwapChain.WinUI/Assets/Wide310x150Logo.scale-400.png differ diff --git a/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj b/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj index 881b6747..4d829db6 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj +++ b/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj @@ -23,7 +23,6 @@ - @@ -31,19 +30,6 @@ - - - - - - - - - - - - - @@ -60,4 +46,8 @@ ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" /> + + + + diff --git a/samples/ComputeSharp.SwapChain.WinUI/Package.appxmanifest b/samples/ComputeSharp.SwapChain.WinUI/Package.appxmanifest index aa2f427c..4ca96b07 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/Package.appxmanifest +++ b/samples/ComputeSharp.SwapChain.WinUI/Package.appxmanifest @@ -12,8 +12,8 @@ Version="1.0.0.0" /> - ComputeSharp.SwapChain.WinUI - Sergio + ComputeSharp Sample App (WinUI 3) + Sergio Pedri Assets\StoreLogo.png @@ -31,13 +31,13 @@ Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$"> - - + + diff --git a/samples/ComputeSharp.SwapChain.WinUI/Properties/PublishProfiles/win10-arm64.pubxml b/samples/ComputeSharp.SwapChain.WinUI/Properties/PublishProfiles/win10-arm64.pubxml new file mode 100644 index 00000000..318e1b94 --- /dev/null +++ b/samples/ComputeSharp.SwapChain.WinUI/Properties/PublishProfiles/win10-arm64.pubxml @@ -0,0 +1,19 @@ + + + + + FileSystem + ARM64 + win10-arm64 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + True + + + \ No newline at end of file diff --git a/samples/ComputeSharp.SwapChain.WinUI/Views/MainWindow.xaml b/samples/ComputeSharp.SwapChain.WinUI/Views/MainWindow.xaml index 985d0dce..3a80242f 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/Views/MainWindow.xaml +++ b/samples/ComputeSharp.SwapChain.WinUI/Views/MainWindow.xaml @@ -2,211 +2,242 @@ x:Class="ComputeSharp.SwapChain.WinUI.Views.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:animations="using:CommunityToolkit.WinUI.UI.Animations" + xmlns:computesharp="using:ComputeSharp.WinUI" + xmlns:controls="using:CommunityToolkit.WinUI.UI.Controls" + xmlns:converters="using:ComputeSharp.SwapChain.Core.Converters" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:controls="using:CommunityToolkit.WinUI.UI.Controls" - xmlns:ui="using:CommunityToolkit.WinUI.UI" - xmlns:animations="using:CommunityToolkit.WinUI.UI.Animations" xmlns:media="using:CommunityToolkit.WinUI.UI.Media" - xmlns:computesharp="using:ComputeSharp.WinUI" - xmlns:converters="using:ComputeSharp.SwapChain.WinUI.Converters" - xmlns:viewmodels="using:ComputeSharp.SwapChain.WinUI.ViewModels" - xmlns:models="using:ComputeSharp.SwapChain.WinUI.Models" + xmlns:models="using:ComputeSharp.SwapChain.Core.Models" + xmlns:ui="using:CommunityToolkit.WinUI.UI" + xmlns:viewmodels="using:ComputeSharp.SwapChain.Core.ViewModels" + SizeChanged="UserControl_SizeChanged" mc:Ignorable="d"> - + - + change and stop their render loops. This avoids wasting GPU resources when the panel isn't visible. + --> - + - + + TextureUri="ms-appx:///Assets/Misc/noise_low.png" + TintColor="#FF222222" + TintOpacity="0.2" /> - - + + VerticalAlignment="Bottom" + Background="#FF222222"> - + - + - + + + - - - + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - + + + + - - + + - + When that is working, the ComputeShader.IsSelected property can also be removed, as it will no longer be needed. + --> + VerticalAlignment="Top" + Fill="White" + Points="0,0 32,0 32,32" /> - - - - - + + + + + - + + ShaderRunner="{x:Bind ViewModel.SelectedComputeShader.ShaderRunner, Mode=OneWay}" /> - + + VerticalAlignment="Bottom" + Orientation="Horizontal" + Spacing="20"> - + - + - + - + + + + + HorizontalAlignment="Stretch" + VerticalAlignment="Top" + Fill="Transparent" /> diff --git a/samples/ComputeSharp.SwapChain.WinUI/Views/MainWindow.xaml.cs b/samples/ComputeSharp.SwapChain.WinUI/Views/MainWindow.xaml.cs index c9ce9c54..c65c33d0 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/Views/MainWindow.xaml.cs +++ b/samples/ComputeSharp.SwapChain.WinUI/Views/MainWindow.xaml.cs @@ -1,10 +1,11 @@ -using Microsoft.UI.Xaml; +using System; +using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Input; namespace ComputeSharp.SwapChain.WinUI.Views; /// -/// A view for . +/// A view for . /// public sealed partial class MainWindow : Window { @@ -28,4 +29,16 @@ public sealed partial class MainWindow : Window { Root.Children.Remove(ShaderSelectionPanel); } + + // Updates the size of the shaders list panel + private void UserControl_SizeChanged(object sender, WindowSizeChangedEventArgs e) + { + ShadersListContainerPanel.Height = Math.Round(e.Size.Height * 0.35); + } + + // Closes the app + private void CloseButton_Click(object sender, RoutedEventArgs e) + { + Application.Current.Exit(); + } } diff --git a/samples/ComputeSharp.SwapChain/Backend/SwapChainApplication{T}.cs b/samples/ComputeSharp.SwapChain/Backend/SwapChainApplication{T}.cs index db765d50..df208d46 100644 --- a/samples/ComputeSharp.SwapChain/Backend/SwapChainApplication{T}.cs +++ b/samples/ComputeSharp.SwapChain/Backend/SwapChainApplication{T}.cs @@ -76,7 +76,7 @@ internal sealed class SwapChainApplication : Win32Application private bool isResizePending; /// - /// Creates a new instance with the specified parameters. + /// Creates a new instance with the specified parameters. /// /// The instance used to create shaders to run. public SwapChainApplication(Func shaderFactory) diff --git a/samples/ComputeSharp.SwapChain/Backend/Win32ApplicationRunner.cs b/samples/ComputeSharp.SwapChain/Backend/Win32ApplicationRunner.cs index 281a26cf..475a2210 100644 --- a/samples/ComputeSharp.SwapChain/Backend/Win32ApplicationRunner.cs +++ b/samples/ComputeSharp.SwapChain/Backend/Win32ApplicationRunner.cs @@ -39,13 +39,10 @@ internal unsafe static class Win32ApplicationRunner private static Thread renderThread = null!; /// - /// Runs a specified application and starts the main loop to update its state. - /// This is the entry point for a given application of type , and it should be - /// called as soon as the process is launched, excluding any other additional initialization needed. - /// To launch an application, simply add this line to the project being used: - /// Win32ApplicationRunner.Run<MyApplication>(); + /// Runs a specified application and starts the main loop to update its state. This is the entry point for a given application, + /// and it should be called as soon as the process is launched, excluding any other additional initialization needed. /// - /// The type of application being launched. + /// The input application instance to run. /// The exit code for the application. public static int Run(Win32Application application) { diff --git a/samples/ComputeSharp.SwapChain/ComputeSharp.SwapChain.csproj b/samples/ComputeSharp.SwapChain/ComputeSharp.SwapChain.csproj index d1a42239..0fa5b528 100644 --- a/samples/ComputeSharp.SwapChain/ComputeSharp.SwapChain.csproj +++ b/samples/ComputeSharp.SwapChain/ComputeSharp.SwapChain.csproj @@ -20,4 +20,6 @@ + + diff --git a/samples/ComputeSharp.SwapChain/Shaders/HelloWorld.cs b/samples/ComputeSharp.SwapChain/Shaders/HelloWorld.cs deleted file mode 100644 index 8e60a9ff..00000000 --- a/samples/ComputeSharp.SwapChain/Shaders/HelloWorld.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace ComputeSharp.SwapChain.Shaders -{ - /// - /// A simple shader to get started with based on shadertoy new shader template. - /// Ported from . - /// - [AutoConstructor] - internal readonly partial struct HelloWorld : IPixelShader - { - /// - /// The current time since the start of the application. - /// - public readonly float time; - - /// - public float4 Execute() - { - // Normalized screen space UV coordinates from 0.0 to 1.0 - float2 uv = ThreadIds.Normalized.XY; - - // Time varying pixel color - float3 col = 0.5f + 0.5f * Hlsl.Cos(time + new float3(uv, uv.X) + new float3(0, 2, 4)); - - // Output to screen - return new(col, 1f); - } - } -} diff --git a/samples/Directory.Build.props b/samples/Directory.Build.props new file mode 100644 index 00000000..e190c8b2 --- /dev/null +++ b/samples/Directory.Build.props @@ -0,0 +1,7 @@ + + + + + $(NoWarn);CS1591 + + \ No newline at end of file diff --git a/src/ComputeSharp.Package/icon_highres.png b/src/ComputeSharp.Package/icon_highres.png new file mode 100644 index 00000000..2653e7a7 Binary files /dev/null and b/src/ComputeSharp.Package/icon_highres.png differ diff --git a/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj b/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj index 59ea54ce..c6b670e3 100644 --- a/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj +++ b/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj @@ -74,7 +74,7 @@ - + diff --git a/src/ComputeSharp.SourceGenerators/Diagnostics/DiagnosticsExtensions.cs b/src/ComputeSharp.SourceGenerators/Diagnostics/DiagnosticsExtensions.cs index 9739f8ab..a5894cd6 100644 --- a/src/ComputeSharp.SourceGenerators/Diagnostics/DiagnosticsExtensions.cs +++ b/src/ComputeSharp.SourceGenerators/Diagnostics/DiagnosticsExtensions.cs @@ -11,7 +11,7 @@ internal static class DiagnosticsExtensions /// /// Adds a new diagnostics to the current compilation. /// - /// The instance currently in use. + /// The instance currently in use. /// The input for the diagnostics to create. /// The source to attach the diagnostics to. /// The optional arguments for the formatted message to include. @@ -27,7 +27,7 @@ internal static class DiagnosticsExtensions /// /// Adds a new diagnostics to the current compilation. /// - /// The instance currently in use. + /// The instance currently in use. /// The input for the diagnostics to create. /// The source to attach the diagnostics to. /// The optional arguments for the formatted message to include. diff --git a/src/ComputeSharp.SourceGenerators/Helpers/SyntaxFactoryHelper.cs b/src/ComputeSharp.SourceGenerators/Helpers/SyntaxFactoryHelper.cs index 8b08572f..f1d215c8 100644 --- a/src/ComputeSharp.SourceGenerators/Helpers/SyntaxFactoryHelper.cs +++ b/src/ComputeSharp.SourceGenerators/Helpers/SyntaxFactoryHelper.cs @@ -21,7 +21,7 @@ internal static class SyntaxFactoryHelper /// /// /// - /// The input sequence of groups. + /// The input sequence of groups. /// An instance with the described contents. [Pure] public static ArrayCreationExpressionSyntax NestedArrayExpression(IEnumerable<(string A, string B)> groups) diff --git a/src/ComputeSharp.SourceGenerators/IShaderGenerator.cs b/src/ComputeSharp.SourceGenerators/IShaderGenerator.cs index 986e19ca..c89752f1 100644 --- a/src/ComputeSharp.SourceGenerators/IShaderGenerator.cs +++ b/src/ComputeSharp.SourceGenerators/IShaderGenerator.cs @@ -147,7 +147,7 @@ public sealed partial class IShaderGenerator : ISourceGenerator /// /// Creates a instance for the GetDispatchId method. /// - /// The for . + /// The for the input struct declaration. /// The resulting instance for the GetDispatchId method. private static partial MethodDeclarationSyntax CreateGetDispatchIdMethod(INamedTypeSymbol structDeclarationSymbol); @@ -155,7 +155,7 @@ public sealed partial class IShaderGenerator : ISourceGenerator /// Creates a instance for the LoadDispatchDataMethod method. /// /// The input instance to use. - /// The for . + /// The for the input struct declaration. /// The collection of discovered resources in the current shader type. /// The total number of 32 bit root constants being loaded for the current shader type. /// The resulting instance for the LoadDispatchDataMethod method. diff --git a/src/ComputeSharp.SourceGenerators/Mappings/HlslKnownMembers.cs b/src/ComputeSharp.SourceGenerators/Mappings/HlslKnownMembers.cs index 904ef8e1..adecb8dd 100644 --- a/src/ComputeSharp.SourceGenerators/Mappings/HlslKnownMembers.cs +++ b/src/ComputeSharp.SourceGenerators/Mappings/HlslKnownMembers.cs @@ -414,11 +414,12 @@ internal static class HlslKnownMembers } /// - /// Tries to get the mapped HLSL-compatible indexer vector type name for the input indexer name. + /// Tries to get the mapped rank and axis for a given indexer name. /// /// The input fully qualified indexer name. - /// The mapped type name, if one is found. - /// The HLSL-compatible type name that can be used in an HLSL shader for the given indexer. + /// The resulting indexer rank, if found. + /// The resulting indexer axis, if found. + /// Whether or not a rank and axis could be resolved by the input indexer name. [Pure] public static bool TryGetAccessorRankAndAxis(string name, out int rank, out int axis) { diff --git a/src/ComputeSharp.SourceGenerators/Mappings/HlslKnownTypes.cs b/src/ComputeSharp.SourceGenerators/Mappings/HlslKnownTypes.cs index 9ebd68ed..25b7ae9d 100644 --- a/src/ComputeSharp.SourceGenerators/Mappings/HlslKnownTypes.cs +++ b/src/ComputeSharp.SourceGenerators/Mappings/HlslKnownTypes.cs @@ -336,7 +336,8 @@ internal static class HlslKnownTypes /// /// Gets the mapped HLSL-compatible type name for the input type name. /// - /// The input type name to map. + /// The input type name to map. + /// The resulting mapped type name, if found. /// The HLSL-compatible type name that can be used in an HLSL shader. public static bool TryGetMappedName(string originalName, out string? mappedName) { diff --git a/src/ComputeSharp.SourceGenerators/SyntaxRewriters/ShaderSourceRewriter.cs b/src/ComputeSharp.SourceGenerators/SyntaxRewriters/ShaderSourceRewriter.cs index 89cd50a3..0b45396c 100644 --- a/src/ComputeSharp.SourceGenerators/SyntaxRewriters/ShaderSourceRewriter.cs +++ b/src/ComputeSharp.SourceGenerators/SyntaxRewriters/ShaderSourceRewriter.cs @@ -114,7 +114,7 @@ internal sealed class ShaderSourceRewriter : HlslSourceRewriter public bool IsGroupIdsUsed { get; private set; } /// - /// Gets whether or not the shader uses at least once. /// public bool IsGroupIdsIndexUsed { get; private set; } diff --git a/src/ComputeSharp.UI/ComputeSharp.UI.projitems b/src/ComputeSharp.UI/ComputeSharp.UI.projitems new file mode 100644 index 00000000..e081e8cc --- /dev/null +++ b/src/ComputeSharp.UI/ComputeSharp.UI.projitems @@ -0,0 +1,19 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + true + 0c82ede1-5b8a-4df3-87da-700b29d5e265 + + + ComputeSharp.UI + + + + + + + + + + \ No newline at end of file diff --git a/src/ComputeSharp.UI/ComputeSharp.UI.shproj b/src/ComputeSharp.UI/ComputeSharp.UI.shproj new file mode 100644 index 00000000..dfd65f65 --- /dev/null +++ b/src/ComputeSharp.UI/ComputeSharp.UI.shproj @@ -0,0 +1,13 @@ + + + + 0c82ede1-5b8a-4df3-87da-700b29d5e265 + 14.0 + + + + + + + + diff --git a/src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.Properties.cs b/src/ComputeSharp.UI/Controls/ComputeShaderPanel.Properties.cs similarity index 98% rename from src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.Properties.cs rename to src/ComputeSharp.UI/Controls/ComputeShaderPanel.Properties.cs index 2714afd8..73e49028 100644 --- a/src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.Properties.cs +++ b/src/ComputeSharp.UI/Controls/ComputeShaderPanel.Properties.cs @@ -1,7 +1,13 @@ using System; -using Microsoft.UI.Xaml; +#if WINDOWS_UWP +using Windows.UI.Xaml; +namespace ComputeSharp.Uwp; +#else + +using Microsoft.UI.Xaml; namespace ComputeSharp.WinUI; +#endif /// public sealed unsafe partial class ComputeShaderPanel diff --git a/src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.Rendering.cs b/src/ComputeSharp.UI/Controls/ComputeShaderPanel.Rendering.cs similarity index 95% rename from src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.Rendering.cs rename to src/ComputeSharp.UI/Controls/ComputeShaderPanel.Rendering.cs index f946f799..0e4903ee 100644 --- a/src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.Rendering.cs +++ b/src/ComputeSharp.UI/Controls/ComputeShaderPanel.Rendering.cs @@ -1,19 +1,32 @@ using System; using System.Diagnostics; +#if WINDOWS_UWP +using System.Runtime.InteropServices; +#endif using System.Threading; using ComputeSharp.Core.Extensions; using ComputeSharp.Graphics.Helpers; using ComputeSharp.Interop; +#if WINDOWS_UWP +using ComputeSharp.Uwp.Helpers; +#else using ComputeSharp.WinUI.Helpers; +#endif using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; using TerraFX.Interop.WinRT; +#if !WINDOWS_UWP using WinRT; +#endif using Win32 = TerraFX.Interop.Windows.Windows; #pragma warning disable CS0420 +#if WINDOWS_UWP +namespace ComputeSharp.Uwp; +#else namespace ComputeSharp.WinUI; +#endif /// public sealed partial class ComputeShaderPanel @@ -64,7 +77,7 @@ public sealed partial class ComputeShaderPanel private ComPtr dxgiSwapChain3; /// - /// The awaitable object for calls. + /// The awaitable object for calls. /// private HANDLE frameLatencyWaitableObject; @@ -94,22 +107,22 @@ public sealed partial class ComputeShaderPanel private volatile bool isResizePending; /// - /// The backing store for for the render thread. + /// The backing store for the actual width for the render thread. /// private volatile float width; /// - /// The backing store for for the render thread. + /// The backing store for the actual height for the render thread. /// private volatile float height; /// - /// The backing store for for the render thread. + /// The backing store for the current composition scale on the X axis for the render thread. /// private volatile float compositionScaleX; /// - /// The backing store for for the render thread. + /// The backing store for the current composition scale on the Y axis for the render thread. /// private volatile float compositionScaleY; @@ -249,12 +262,20 @@ public sealed partial class ComputeShaderPanel // IDXGISwapChain reference just created and set that as the swap chain panel to use. using ComPtr swapChainPanelNative = default; +#if WINDOWS_UWP + IUnknown* swapChainPanel = (IUnknown*)Marshal.GetIUnknownForObject(this); + + swapChainPanel->QueryInterface( + Win32.__uuidof(), + (void**)&swapChainPanelNative).Assert(); +#else IUnknown* swapChainPanel = (IUnknown*)((IWinRTObject)this).NativeObject.ThisPtr; Guid iSwapChainPanelNativeUuid = new(0x63AAD0B8, 0x7C24, 0x40FF, 0x85, 0xA8, 0x64, 0x0D, 0x94, 0x4C, 0xC3, 0x25); swapChainPanel->QueryInterface( &iSwapChainPanelNativeUuid, (void**)&swapChainPanelNative).Assert(); +#endif using (ComPtr idxgiSwapChain = default) { diff --git a/src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.cs b/src/ComputeSharp.UI/Controls/ComputeShaderPanel.cs similarity index 94% rename from src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.cs rename to src/ComputeSharp.UI/Controls/ComputeShaderPanel.cs index 7ca0e51c..70d86b9d 100644 --- a/src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.cs +++ b/src/ComputeSharp.UI/Controls/ComputeShaderPanel.cs @@ -1,7 +1,14 @@ -using Microsoft.UI.Xaml; +#if WINDOWS_UWP +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; + +namespace ComputeSharp.Uwp; +#else +using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; namespace ComputeSharp.WinUI; +#endif /// /// A custom that can be used to render animated backgrounds. diff --git a/src/ComputeSharp.WinUI/Helpers/DynamicResolutionManager.cs b/src/ComputeSharp.UI/Helpers/DynamicResolutionManager.cs similarity index 94% rename from src/ComputeSharp.WinUI/Helpers/DynamicResolutionManager.cs rename to src/ComputeSharp.UI/Helpers/DynamicResolutionManager.cs index 802650db..26b9004e 100644 --- a/src/ComputeSharp.WinUI/Helpers/DynamicResolutionManager.cs +++ b/src/ComputeSharp.UI/Helpers/DynamicResolutionManager.cs @@ -1,8 +1,14 @@ using System; +#if !WINDOWS_UWP using System.Runtime.InteropServices; +#endif using System.Threading; +#if WINDOWS_UWP +namespace ComputeSharp.Uwp.Helpers; +#else namespace ComputeSharp.WinUI.Helpers; +#endif /// /// A helper type that is responsible for applying dynamic resolution changes. @@ -68,7 +74,14 @@ internal unsafe ref struct DynamicResolutionManager manager.frameTimeOffset = 0; manager.slidingFrameTimeWindowSum = TargetFrameTimeInTicksFor60fps * SlidingFrameTimeWindowLength; +#if WINDOWS_UWP + fixed (long* p = &manager.frameTimesInTicks[0]) + { + new Span(p, SlidingFrameTimeWindowLength).Fill(TargetFrameTimeInTicksFor60fps); + } +#else MemoryMarshal.CreateSpan(ref manager.frameTimesInTicks[0], SlidingFrameTimeWindowLength).Fill(TargetFrameTimeInTicksFor60fps); +#endif } /// diff --git a/src/ComputeSharp.WinUI/IShaderRunner.cs b/src/ComputeSharp.UI/IShaderRunner.cs similarity index 90% rename from src/ComputeSharp.WinUI/IShaderRunner.cs rename to src/ComputeSharp.UI/IShaderRunner.cs index 8a1deb5e..c681b68b 100644 --- a/src/ComputeSharp.WinUI/IShaderRunner.cs +++ b/src/ComputeSharp.UI/IShaderRunner.cs @@ -1,6 +1,10 @@ using System; +#if WINDOWS_UWP +namespace ComputeSharp.Uwp; +#else namespace ComputeSharp.WinUI; +#endif /// /// An interface for a shader runner to be used with . diff --git a/src/ComputeSharp.WinUI/ShaderRunner{T}.cs b/src/ComputeSharp.UI/ShaderRunner{T}.cs similarity index 96% rename from src/ComputeSharp.WinUI/ShaderRunner{T}.cs rename to src/ComputeSharp.UI/ShaderRunner{T}.cs index af32f397..be100516 100644 --- a/src/ComputeSharp.WinUI/ShaderRunner{T}.cs +++ b/src/ComputeSharp.UI/ShaderRunner{T}.cs @@ -1,6 +1,10 @@ using System; +#if WINDOWS_UWP +namespace ComputeSharp.Uwp; +#else namespace ComputeSharp.WinUI; +#endif /// /// An implementation powered by a supplied shader type. diff --git a/src/ComputeSharp.Uwp/ComputeSharp.Uwp.csproj b/src/ComputeSharp.Uwp/ComputeSharp.Uwp.csproj new file mode 100644 index 00000000..06046c44 --- /dev/null +++ b/src/ComputeSharp.Uwp/ComputeSharp.Uwp.csproj @@ -0,0 +1,42 @@ + + + uap10.0.17763 + 10.0 + 19041 + 17763 + $(TargetPlatformBaseVersion).$(TargetPlatformRevision).0 + $(TargetPlatformBaseVersion).$(TargetPlatformMinRevision).0 + Portable + true + true + true + true + true + $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb + ComputeSharp.Uwp + x64;ARM64 + win10-x64;win-arm64 + $(NoWarn);NETSDK1023 + + + + ComputeSharp.Uwp + ComputeSharp.Uwp + A UWP library with controls to render DX12 shaders powered by ComputeSharp + $(PackageTags) uwp winui + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ComputeSharp.Uwp/Directory.Build.props b/src/ComputeSharp.Uwp/Directory.Build.props new file mode 100644 index 00000000..7fbbecef --- /dev/null +++ b/src/ComputeSharp.Uwp/Directory.Build.props @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/ComputeSharp.Uwp/Properties/AssemblyInfo.cs b/src/ComputeSharp.Uwp/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..eecfefd0 --- /dev/null +++ b/src/ComputeSharp.Uwp/Properties/AssemblyInfo.cs @@ -0,0 +1,6 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[module: SkipLocalsInit] + +[assembly: ComVisible(false)] \ No newline at end of file diff --git a/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj b/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj index d2821e60..4f65001f 100644 --- a/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj +++ b/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj @@ -6,6 +6,9 @@ x64;ARM64 win10-x64;win10-arm64 true + + + $(NoWarn);NU5104 @@ -27,4 +30,6 @@ + + diff --git a/src/ComputeSharp.WinUI/Properties/AssemblyInfo.cs b/src/ComputeSharp.WinUI/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..196f23c5 --- /dev/null +++ b/src/ComputeSharp.WinUI/Properties/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using System.Runtime.CompilerServices; + +[module: SkipLocalsInit] \ No newline at end of file diff --git a/src/ComputeSharp/ComputeSharp.csproj b/src/ComputeSharp/ComputeSharp.csproj index 3b456dec..4c8128dc 100644 --- a/src/ComputeSharp/ComputeSharp.csproj +++ b/src/ComputeSharp/ComputeSharp.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/ComputeSharp/Graphics/Extensions/Interop/ComPtrExtensions.cs b/src/ComputeSharp/Graphics/Extensions/Interop/ComPtrExtensions.cs index e589b564..8ff5c5df 100644 --- a/src/ComputeSharp/Graphics/Extensions/Interop/ComPtrExtensions.cs +++ b/src/ComputeSharp/Graphics/Extensions/Interop/ComPtrExtensions.cs @@ -17,11 +17,20 @@ internal static class ComPtrExtensions /// A instance of type . [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe uint AddRef(this ComPtr ptr) +#if NET6_0_OR_GREATER where T : unmanaged, IUnknown.Interface +#else + where T : unmanaged +#endif { if (ptr.Get() is not null) { +#if NET6_0_OR_GREATER return ptr.Get()->AddRef(); +#else + return ((IUnknown*)ptr.Get())->AddRef(); +#endif + } return 0; @@ -36,11 +45,19 @@ internal static class ComPtrExtensions /// A instance of type . [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe uint Release(this ref ComPtr ptr) +#if NET6_0_OR_GREATER where T : unmanaged, IUnknown.Interface +#else + where T : unmanaged +#endif { if (ptr.Get() is not null) { +#if NET6_0_OR_GREATER uint count = ptr.Get()->Release(); +#else + uint count = ((IUnknown*)ptr.Get())->Release(); +#endif if (count == 0) { @@ -66,7 +83,11 @@ internal static class ComPtrExtensions [Pure] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe ref readonly ComPtr AsIUnknown(this in ComPtr ptr) +#if NET6_0_OR_GREATER where T : unmanaged, IUnknown.Interface +#else + where T : unmanaged +#endif { return ref Unsafe.As, ComPtr>(ref Unsafe.AsRef(in ptr)); } @@ -81,7 +102,11 @@ internal static class ComPtrExtensions [Pure] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void** GetVoidAddressOf(this in ComPtr ptr) +#if NET6_0_OR_GREATER where T : unmanaged, IUnknown.Interface +#else + where T : unmanaged +#endif { return (void**)Unsafe.AsPointer(ref Unsafe.AsRef(in ptr)); } @@ -94,7 +119,11 @@ internal static class ComPtrExtensions /// The moved instance. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe ComPtr Move(this in ComPtr ptr) +#if NET6_0_OR_GREATER where T : unmanaged, IUnknown.Interface +#else + where T : unmanaged +#endif { ComPtr copy = default; diff --git a/src/ComputeSharp/Properties/AssemblyInfo.cs b/src/ComputeSharp/Properties/AssemblyInfo.cs index a671df7e..bbec36ea 100644 --- a/src/ComputeSharp/Properties/AssemblyInfo.cs +++ b/src/ComputeSharp/Properties/AssemblyInfo.cs @@ -3,4 +3,5 @@ [module: SkipLocalsInit] [assembly: InternalsVisibleTo("ComputeSharp.Tests.Internals")] +[assembly: InternalsVisibleTo("ComputeSharp.Uwp")] [assembly: InternalsVisibleTo("ComputeSharp.WinUI")] diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 3b884e46..96486587 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,7 +1,7 @@ + + - - \ No newline at end of file diff --git a/src/TerraFX.Interop.Windows/ComPtr`1.cs b/src/TerraFX.Interop.Windows/ComPtr`1.cs index db953e85..dd8c38ab 100644 --- a/src/TerraFX.Interop.Windows/ComPtr`1.cs +++ b/src/TerraFX.Interop.Windows/ComPtr`1.cs @@ -7,8 +7,8 @@ using System; using System.ComponentModel; using System.Diagnostics; using System.Runtime.CompilerServices; -using static TerraFX.Interop.Windows.S; using static TerraFX.Interop.Windows.Windows; +using static TerraFX.Interop.Windows.S; namespace TerraFX.Interop.Windows { @@ -16,7 +16,7 @@ namespace TerraFX.Interop.Windows /// The type to wrap in the current instance. /// While this type is not marked as so that it can also be used in fields, make sure to keep the reference counts properly tracked if you do store instances on the heap. internal unsafe struct ComPtr : IDisposable - where T : unmanaged, IUnknown.Interface + where T : unmanaged { /// The raw pointer to a COM object, if existing. private T* ptr_; @@ -55,9 +55,9 @@ namespace TerraFX.Interop.Windows /// The result of for the target type . /// This method will automatically release the target COM object pointed to by , if any. public readonly HRESULT As(ComPtr* p) - where U : unmanaged, IUnknown.Interface + where U : unmanaged { - return ptr_->QueryInterface(__uuidof(), (void**)p->ReleaseAndGetAddressOf()); + return ((IUnknown*)ptr_)->QueryInterface(__uuidof(), (void**)p->ReleaseAndGetAddressOf()); } /// Converts the current object reference to type and assigns that to a target value. @@ -66,10 +66,10 @@ namespace TerraFX.Interop.Windows /// The result of for the target type . /// This method will automatically release the target COM object pointed to by , if any. public readonly HRESULT As(ref ComPtr other) - where U : unmanaged, IUnknown.Interface + where U : unmanaged { U* ptr; - HRESULT result = ptr_->QueryInterface(__uuidof(), (void**)&ptr); + HRESULT result = ((IUnknown*)ptr_)->QueryInterface(__uuidof(), (void**)&ptr); other.Attach(ptr); return result; @@ -82,7 +82,7 @@ namespace TerraFX.Interop.Windows /// This method will automatically release the target COM object pointed to by , if any. public readonly HRESULT AsIID(Guid* riid, ComPtr* other) { - return ptr_->QueryInterface(riid, (void**)other->ReleaseAndGetAddressOf()); + return ((IUnknown*)ptr_)->QueryInterface(riid, (void**)other->ReleaseAndGetAddressOf()); } /// Converts the current object reference to a type indicated by the given IID and assigns that to a target value. @@ -93,7 +93,7 @@ namespace TerraFX.Interop.Windows public readonly HRESULT AsIID(Guid* riid, ref ComPtr other) { IUnknown* ptr; - HRESULT result = ptr_->QueryInterface(riid, (void**)&ptr); + HRESULT result = ((IUnknown*)ptr_)->QueryInterface(riid, (void**)&ptr); other.Attach(ptr); return result; @@ -106,7 +106,7 @@ namespace TerraFX.Interop.Windows { if (ptr_ != null) { - var @ref = ptr_->Release(); + var @ref = ((IUnknown*)ptr_)->Release(); Debug.Assert((@ref != 0) || (ptr_ != other)); } ptr_ = other; @@ -156,28 +156,28 @@ namespace TerraFX.Interop.Windows /// The target raw pointer to copy the address of the current COM object to. /// The result of for the target type . public readonly HRESULT CopyTo(U** ptr) - where U : unmanaged, IUnknown.Interface + where U : unmanaged { - return ptr_->QueryInterface(__uuidof(), (void**)ptr); + return ((IUnknown*)ptr_)->QueryInterface(__uuidof(), (void**)ptr); } /// Converts the current COM object reference to a given interface type and assigns that to a target . /// The target raw pointer to copy the address of the current COM object to. /// The result of for the target type . public readonly HRESULT CopyTo(ComPtr* p) - where U : unmanaged, IUnknown.Interface + where U : unmanaged { - return ptr_->QueryInterface(__uuidof(), (void**)p->ReleaseAndGetAddressOf()); + return ((IUnknown*)ptr_)->QueryInterface(__uuidof(), (void**)p->ReleaseAndGetAddressOf()); } /// Converts the current COM object reference to a given interface type and assigns that to a target . /// The target reference to copy the address of the current COM object to. /// The result of for the target type . public readonly HRESULT CopyTo(ref ComPtr other) - where U : unmanaged, IUnknown.Interface + where U : unmanaged { U* ptr; - HRESULT result = ptr_->QueryInterface(__uuidof(), (void**)&ptr); + HRESULT result = ((IUnknown*)ptr_)->QueryInterface(__uuidof(), (void**)&ptr); other.Attach(ptr); return result; @@ -189,7 +189,7 @@ namespace TerraFX.Interop.Windows /// The result of for the target IID. public readonly HRESULT CopyTo(Guid* riid, void** ptr) { - return ptr_->QueryInterface(riid, ptr); + return ((IUnknown*)ptr_)->QueryInterface(riid, ptr); } /// Converts the current object reference to a type indicated by the given IID and assigns that to a target value. @@ -198,7 +198,7 @@ namespace TerraFX.Interop.Windows /// The result of for the target IID. public readonly HRESULT CopyTo(Guid* riid, ComPtr* p) { - return ptr_->QueryInterface(riid, (void**)p->ReleaseAndGetAddressOf()); + return ((IUnknown*)ptr_)->QueryInterface(riid, (void**)p->ReleaseAndGetAddressOf()); } /// Converts the current object reference to a type indicated by the given IID and assigns that to a target value. @@ -208,7 +208,7 @@ namespace TerraFX.Interop.Windows public readonly HRESULT CopyTo(Guid* riid, ref ComPtr other) { IUnknown* ptr; - HRESULT result = ptr_->QueryInterface(riid, (void**)&ptr); + HRESULT result = ((IUnknown*)ptr_)->QueryInterface(riid, (void**)&ptr); other.Attach(ptr); return result; @@ -219,11 +219,11 @@ namespace TerraFX.Interop.Windows public void Dispose() { T* pointer = ptr_; - if (pointer != null) { ptr_ = null; - _ = pointer->Release(); + + _ = ((IUnknown*)pointer)->Release(); } } @@ -300,7 +300,7 @@ namespace TerraFX.Interop.Windows if (temp != null) { - _ = temp->AddRef(); + _ = ((IUnknown*)temp)->AddRef(); } } @@ -313,10 +313,10 @@ namespace TerraFX.Interop.Windows if (temp != null) { ptr_ = null; - @ref = temp->Release(); + @ref = ((IUnknown*)temp)->Release(); } return @ref; } } -} +} \ No newline at end of file diff --git a/src/TerraFX.Interop.Windows/DirectX/other/d3dx12/D3D12_RESOURCE_DESC.Manual.cs b/src/TerraFX.Interop.Windows/DirectX/other/d3dx12/D3D12_RESOURCE_DESC.Manual.cs index e87dae05..8150cc56 100644 --- a/src/TerraFX.Interop.Windows/DirectX/other/d3dx12/D3D12_RESOURCE_DESC.Manual.cs +++ b/src/TerraFX.Interop.Windows/DirectX/other/d3dx12/D3D12_RESOURCE_DESC.Manual.cs @@ -58,21 +58,6 @@ namespace TerraFX.Interop.DirectX public ushort ArraySize => ((Dimension != D3D12_RESOURCE_DIMENSION_TEXTURE3D) ? DepthOrArraySize : (ushort)(1)); - public byte GetPlaneCount(ID3D12Device* pDevice) - { - return D3D12GetFormatPlaneCount(pDevice, Format); - } - - public uint GetSubresources(ID3D12Device* pDevice) - { - return MipLevels * (uint)ArraySize * GetPlaneCount(pDevice); - } - - public uint CalcSubresource(uint MipSlice, uint ArraySlice, uint PlaneSlice) - { - return D3D12CalcSubresource(MipSlice, ArraySlice, PlaneSlice, MipLevels, ArraySize); - } - public static bool operator ==([NativeTypeName("const D3D12_RESOURCE_DESC &")] in D3D12_RESOURCE_DESC l, [NativeTypeName("const D3D12_RESOURCE_DESC &")] in D3D12_RESOURCE_DESC r) { return (l.Dimension == r.Dimension) diff --git a/src/TerraFX.Interop.Windows/DirectX/other/d3dx12/DirectX.cs b/src/TerraFX.Interop.Windows/DirectX/other/d3dx12/DirectX.cs deleted file mode 100644 index ec19f141..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/other/d3dx12/DirectX.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from d3dx12.h in the microsoft/DirectX-Graphics-Samples tag v10.0.19041.0 -// Original source is Copyright © Microsoft. All rights reserved. Licensed under the MIT License (MIT). - -using TerraFX.Interop.Windows; -using static TerraFX.Interop.DirectX.D3D12_FEATURE; - -namespace TerraFX.Interop.DirectX -{ - internal static unsafe partial class DirectX - { - public static uint D3D12CalcSubresource(uint MipSlice, uint ArraySlice, uint PlaneSlice, uint MipLevels, uint ArraySize) - { - return MipSlice + ArraySlice * MipLevels + PlaneSlice * MipLevels * ArraySize; - } - - [return: NativeTypeName("UINT8")] - public static byte D3D12GetFormatPlaneCount(ID3D12Device* pDevice, DXGI_FORMAT Format) - { - D3D12_FEATURE_DATA_FORMAT_INFO formatInfo = new D3D12_FEATURE_DATA_FORMAT_INFO - { - Format = Format, - PlaneCount = 0, - }; - - if ((((HRESULT)(pDevice->CheckFeatureSupport(D3D12_FEATURE_FORMAT_INFO, &formatInfo, (uint)(sizeof(D3D12_FEATURE_DATA_FORMAT_INFO))))) < 0)) - { - return 0; - } - - return formatInfo.PlaneCount; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/DXGI.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/DXGI.cs new file mode 100644 index 00000000..7f74e299 --- /dev/null +++ b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/DXGI.cs @@ -0,0 +1,103 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from shared/dxgi.h in the Windows SDK for Windows 10.0.20348.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.DirectX +{ + internal static partial class DXGI + { + [NativeTypeName("#define DXGI_USAGE_SHADER_INPUT 0x00000010UL")] + public const uint DXGI_USAGE_SHADER_INPUT = 0x00000010U; + + [NativeTypeName("#define DXGI_USAGE_RENDER_TARGET_OUTPUT 0x00000020UL")] + public const uint DXGI_USAGE_RENDER_TARGET_OUTPUT = 0x00000020U; + + [NativeTypeName("#define DXGI_USAGE_BACK_BUFFER 0x00000040UL")] + public const uint DXGI_USAGE_BACK_BUFFER = 0x00000040U; + + [NativeTypeName("#define DXGI_USAGE_SHARED 0x00000080UL")] + public const uint DXGI_USAGE_SHARED = 0x00000080U; + + [NativeTypeName("#define DXGI_USAGE_READ_ONLY 0x00000100UL")] + public const uint DXGI_USAGE_READ_ONLY = 0x00000100U; + + [NativeTypeName("#define DXGI_USAGE_DISCARD_ON_PRESENT 0x00000200UL")] + public const uint DXGI_USAGE_DISCARD_ON_PRESENT = 0x00000200U; + + [NativeTypeName("#define DXGI_USAGE_UNORDERED_ACCESS 0x00000400UL")] + public const uint DXGI_USAGE_UNORDERED_ACCESS = 0x00000400U; + + [NativeTypeName("#define DXGI_RESOURCE_PRIORITY_MINIMUM ( 0x28000000 )")] + public const int DXGI_RESOURCE_PRIORITY_MINIMUM = (0x28000000); + + [NativeTypeName("#define DXGI_RESOURCE_PRIORITY_LOW ( 0x50000000 )")] + public const int DXGI_RESOURCE_PRIORITY_LOW = (0x50000000); + + [NativeTypeName("#define DXGI_RESOURCE_PRIORITY_NORMAL ( 0x78000000 )")] + public const int DXGI_RESOURCE_PRIORITY_NORMAL = (0x78000000); + + [NativeTypeName("#define DXGI_RESOURCE_PRIORITY_HIGH ( 0xa0000000 )")] + public const uint DXGI_RESOURCE_PRIORITY_HIGH = (0xa0000000); + + [NativeTypeName("#define DXGI_RESOURCE_PRIORITY_MAXIMUM ( 0xc8000000 )")] + public const uint DXGI_RESOURCE_PRIORITY_MAXIMUM = (0xc8000000); + + [NativeTypeName("#define DXGI_MAP_READ ( 1UL )")] + public const uint DXGI_MAP_READ = (1U); + + [NativeTypeName("#define DXGI_MAP_WRITE ( 2UL )")] + public const uint DXGI_MAP_WRITE = (2U); + + [NativeTypeName("#define DXGI_MAP_DISCARD ( 4UL )")] + public const uint DXGI_MAP_DISCARD = (4U); + + [NativeTypeName("#define DXGI_ENUM_MODES_INTERLACED ( 1UL )")] + public const uint DXGI_ENUM_MODES_INTERLACED = (1U); + + [NativeTypeName("#define DXGI_ENUM_MODES_SCALING ( 2UL )")] + public const uint DXGI_ENUM_MODES_SCALING = (2U); + + [NativeTypeName("#define DXGI_MAX_SWAP_CHAIN_BUFFERS ( 16 )")] + public const int DXGI_MAX_SWAP_CHAIN_BUFFERS = (16); + + [NativeTypeName("#define DXGI_PRESENT_TEST 0x00000001UL")] + public const uint DXGI_PRESENT_TEST = 0x00000001U; + + [NativeTypeName("#define DXGI_PRESENT_DO_NOT_SEQUENCE 0x00000002UL")] + public const uint DXGI_PRESENT_DO_NOT_SEQUENCE = 0x00000002U; + + [NativeTypeName("#define DXGI_PRESENT_RESTART 0x00000004UL")] + public const uint DXGI_PRESENT_RESTART = 0x00000004U; + + [NativeTypeName("#define DXGI_PRESENT_DO_NOT_WAIT 0x00000008UL")] + public const uint DXGI_PRESENT_DO_NOT_WAIT = 0x00000008U; + + [NativeTypeName("#define DXGI_PRESENT_STEREO_PREFER_RIGHT 0x00000010UL")] + public const uint DXGI_PRESENT_STEREO_PREFER_RIGHT = 0x00000010U; + + [NativeTypeName("#define DXGI_PRESENT_STEREO_TEMPORARY_MONO 0x00000020UL")] + public const uint DXGI_PRESENT_STEREO_TEMPORARY_MONO = 0x00000020U; + + [NativeTypeName("#define DXGI_PRESENT_RESTRICT_TO_OUTPUT 0x00000040UL")] + public const uint DXGI_PRESENT_RESTRICT_TO_OUTPUT = 0x00000040U; + + [NativeTypeName("#define DXGI_PRESENT_USE_DURATION 0x00000100UL")] + public const uint DXGI_PRESENT_USE_DURATION = 0x00000100U; + + [NativeTypeName("#define DXGI_PRESENT_ALLOW_TEARING 0x00000200UL")] + public const uint DXGI_PRESENT_ALLOW_TEARING = 0x00000200U; + + [NativeTypeName("#define DXGI_MWA_NO_WINDOW_CHANGES ( 1 << 0 )")] + public const int DXGI_MWA_NO_WINDOW_CHANGES = (1 << 0); + + [NativeTypeName("#define DXGI_MWA_NO_ALT_ENTER ( 1 << 1 )")] + public const int DXGI_MWA_NO_ALT_ENTER = (1 << 1); + + [NativeTypeName("#define DXGI_MWA_NO_PRINT_SCREEN ( 1 << 2 )")] + public const int DXGI_MWA_NO_PRINT_SCREEN = (1 << 2); + + [NativeTypeName("#define DXGI_MWA_VALID ( 0x7 )")] + public const int DXGI_MWA_VALID = (0x7); + } +} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/DXGI_FRAME_STATISTICS.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/DXGI_FRAME_STATISTICS.cs deleted file mode 100644 index 02d072e3..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/DXGI_FRAME_STATISTICS.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DXGI_FRAME_STATISTICS - { - public uint PresentCount; - - public uint PresentRefreshCount; - - public uint SyncRefreshCount; - - public LARGE_INTEGER SyncQPCTime; - - public LARGE_INTEGER SyncGPUTime; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/DXGI_MAPPED_RECT.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/DXGI_MAPPED_RECT.cs deleted file mode 100644 index 3e442232..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/DXGI_MAPPED_RECT.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct DXGI_MAPPED_RECT - { - public int Pitch; - - public byte* pBits; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/DXGI_OUTPUT_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/DXGI_OUTPUT_DESC.cs deleted file mode 100644 index 668a3b00..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/DXGI_OUTPUT_DESC.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct DXGI_OUTPUT_DESC - { - [NativeTypeName("WCHAR [32]")] - public fixed ushort DeviceName[32]; - - public RECT DesktopCoordinates; - - public BOOL AttachedToDesktop; - - public DXGI_MODE_ROTATION Rotation; - - public HMONITOR Monitor; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/DXGI_SURFACE_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/DXGI_SURFACE_DESC.cs deleted file mode 100644 index 19cb2efc..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/DXGI_SURFACE_DESC.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DXGI_SURFACE_DESC - { - public uint Width; - - public uint Height; - - public DXGI_FORMAT Format; - - public DXGI_SAMPLE_DESC SampleDesc; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/DXGI_SWAP_CHAIN_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/DXGI_SWAP_CHAIN_DESC.cs deleted file mode 100644 index dba3b686..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/DXGI_SWAP_CHAIN_DESC.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DXGI_SWAP_CHAIN_DESC - { - public DXGI_MODE_DESC BufferDesc; - - public DXGI_SAMPLE_DESC SampleDesc; - - [NativeTypeName("DXGI_USAGE")] - public uint BufferUsage; - - public uint BufferCount; - - public HWND OutputWindow; - - public BOOL Windowed; - - public DXGI_SWAP_EFFECT SwapEffect; - - public uint Flags; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/DXGI_SWAP_CHAIN_FLAG.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/DXGI_SWAP_CHAIN_FLAG.cs new file mode 100644 index 00000000..16968bd2 --- /dev/null +++ b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/DXGI_SWAP_CHAIN_FLAG.cs @@ -0,0 +1,27 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from shared/dxgi.h in the Windows SDK for Windows 10.0.20348.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop.DirectX +{ + [Flags] + internal enum DXGI_SWAP_CHAIN_FLAG + { + DXGI_SWAP_CHAIN_FLAG_NONPREROTATED = 1, + DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH = 2, + DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE = 4, + DXGI_SWAP_CHAIN_FLAG_RESTRICTED_CONTENT = 8, + DXGI_SWAP_CHAIN_FLAG_RESTRICT_SHARED_RESOURCE_DRIVER = 16, + DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY = 32, + DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT = 64, + DXGI_SWAP_CHAIN_FLAG_FOREGROUND_LAYER = 128, + DXGI_SWAP_CHAIN_FLAG_FULLSCREEN_VIDEO = 256, + DXGI_SWAP_CHAIN_FLAG_YUV_VIDEO = 512, + DXGI_SWAP_CHAIN_FLAG_HW_PROTECTED = 1024, + DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING = 2048, + DXGI_SWAP_CHAIN_FLAG_RESTRICTED_TO_ALL_HOLOGRAPHIC_DISPLAYS = 4096, + } +} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIAdapter.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIAdapter.cs index c9776b48..c33669e3 100644 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIAdapter.cs +++ b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIAdapter.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("2411E7E1-12AC-4CCF-BD14-9798E8534DC0")] [NativeTypeName("struct IDXGIAdapter : IDXGIObject")] [NativeInheritance("IDXGIObject")] - internal unsafe partial struct IDXGIAdapter : IDXGIAdapter.Interface + internal unsafe partial struct IDXGIAdapter { public void** lpVtbl; @@ -88,50 +88,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDXGIAdapter*)Unsafe.AsPointer(ref this), InterfaceName, pUMDVersion); } - - public interface Interface : IDXGIObject.Interface - { - [VtblIndex(7)] - HRESULT EnumOutputs(uint Output, IDXGIOutput** ppOutput); - - [VtblIndex(8)] - HRESULT GetDesc(DXGI_ADAPTER_DESC* pDesc); - - [VtblIndex(9)] - HRESULT CheckInterfaceSupport([NativeTypeName("const GUID &")] Guid* InterfaceName, LARGE_INTEGER* pUMDVersion); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetParent; - - [NativeTypeName("HRESULT (UINT, IDXGIOutput **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumOutputs; - - [NativeTypeName("HRESULT (DXGI_ADAPTER_DESC *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDesc; - - [NativeTypeName("HRESULT (const GUID &, LARGE_INTEGER *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CheckInterfaceSupport; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIAdapter1.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIAdapter1.cs index 56a7c0b2..505a0501 100644 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIAdapter1.cs +++ b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIAdapter1.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("29038F61-3839-4626-91FD-086879011A05")] [NativeTypeName("struct IDXGIAdapter1 : IDXGIAdapter")] [NativeInheritance("IDXGIAdapter")] - internal unsafe partial struct IDXGIAdapter1 : IDXGIAdapter1.Interface + internal unsafe partial struct IDXGIAdapter1 { public void** lpVtbl; @@ -95,47 +95,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IDXGIAdapter1*)Unsafe.AsPointer(ref this), pDesc); } - - public interface Interface : IDXGIAdapter.Interface - { - [VtblIndex(10)] - HRESULT GetDesc1(DXGI_ADAPTER_DESC1* pDesc); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetParent; - - [NativeTypeName("HRESULT (UINT, IDXGIOutput **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumOutputs; - - [NativeTypeName("HRESULT (DXGI_ADAPTER_DESC *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDesc; - - [NativeTypeName("HRESULT (const GUID &, LARGE_INTEGER *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CheckInterfaceSupport; - - [NativeTypeName("HRESULT (DXGI_ADAPTER_DESC1 *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDesc1; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIDeviceSubObject.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIDeviceSubObject.cs deleted file mode 100644 index 6559b7a8..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIDeviceSubObject.cs +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("3D3E0379-F9DE-4D58-BB6C-18D62992F1A6")] - [NativeTypeName("struct IDXGIDeviceSubObject : IDXGIObject")] - [NativeInheritance("IDXGIObject")] - internal unsafe partial struct IDXGIDeviceSubObject : IDXGIDeviceSubObject.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDXGIDeviceSubObject*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDXGIDeviceSubObject*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDXGIDeviceSubObject*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT SetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint DataSize, [NativeTypeName("const void *")] void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDXGIDeviceSubObject*)Unsafe.AsPointer(ref this), Name, DataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT SetPrivateDataInterface([NativeTypeName("const GUID &")] Guid* Name, [NativeTypeName("const IUnknown *")] IUnknown* pUnknown) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDXGIDeviceSubObject*)Unsafe.AsPointer(ref this), Name, pUnknown); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint* pDataSize, void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDXGIDeviceSubObject*)Unsafe.AsPointer(ref this), Name, pDataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetParent([NativeTypeName("const IID &")] Guid* riid, void** ppParent) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDXGIDeviceSubObject*)Unsafe.AsPointer(ref this), riid, ppParent); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT GetDevice([NativeTypeName("const IID &")] Guid* riid, void** ppDevice) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDXGIDeviceSubObject*)Unsafe.AsPointer(ref this), riid, ppDevice); - } - - public interface Interface : IDXGIObject.Interface - { - [VtblIndex(7)] - HRESULT GetDevice([NativeTypeName("const IID &")] Guid* riid, void** ppDevice); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetParent; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDevice; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIFactory.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIFactory.cs index 20398d23..aa9bda1f 100644 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIFactory.cs +++ b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIFactory.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("7B7166EC-21C7-44AE-B21A-C9AE321AE369")] [NativeTypeName("struct IDXGIFactory : IDXGIObject")] [NativeInheritance("IDXGIObject")] - internal unsafe partial struct IDXGIFactory : IDXGIFactory.Interface + internal unsafe partial struct IDXGIFactory { public void** lpVtbl; @@ -39,125 +39,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDXGIFactory*)Unsafe.AsPointer(ref this)); } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT SetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint DataSize, [NativeTypeName("const void *")] void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDXGIFactory*)Unsafe.AsPointer(ref this), Name, DataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT SetPrivateDataInterface([NativeTypeName("const GUID &")] Guid* Name, [NativeTypeName("const IUnknown *")] IUnknown* pUnknown) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDXGIFactory*)Unsafe.AsPointer(ref this), Name, pUnknown); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint* pDataSize, void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDXGIFactory*)Unsafe.AsPointer(ref this), Name, pDataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetParent([NativeTypeName("const IID &")] Guid* riid, void** ppParent) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDXGIFactory*)Unsafe.AsPointer(ref this), riid, ppParent); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT EnumAdapters(uint Adapter, IDXGIAdapter** ppAdapter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDXGIFactory*)Unsafe.AsPointer(ref this), Adapter, ppAdapter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT MakeWindowAssociation(HWND WindowHandle, uint Flags) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDXGIFactory*)Unsafe.AsPointer(ref this), WindowHandle, Flags); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT GetWindowAssociation(HWND* pWindowHandle) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDXGIFactory*)Unsafe.AsPointer(ref this), pWindowHandle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT CreateSwapChain(IUnknown* pDevice, DXGI_SWAP_CHAIN_DESC* pDesc, IDXGISwapChain** ppSwapChain) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IDXGIFactory*)Unsafe.AsPointer(ref this), pDevice, pDesc, ppSwapChain); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CreateSoftwareAdapter(HMODULE Module, IDXGIAdapter** ppAdapter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IDXGIFactory*)Unsafe.AsPointer(ref this), Module, ppAdapter); - } - - public interface Interface : IDXGIObject.Interface - { - [VtblIndex(7)] - HRESULT EnumAdapters(uint Adapter, IDXGIAdapter** ppAdapter); - - [VtblIndex(8)] - HRESULT MakeWindowAssociation(HWND WindowHandle, uint Flags); - - [VtblIndex(9)] - HRESULT GetWindowAssociation(HWND* pWindowHandle); - - [VtblIndex(10)] - HRESULT CreateSwapChain(IUnknown* pDevice, DXGI_SWAP_CHAIN_DESC* pDesc, IDXGISwapChain** ppSwapChain); - - [VtblIndex(11)] - HRESULT CreateSoftwareAdapter(HMODULE Module, IDXGIAdapter** ppAdapter); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetParent; - - [NativeTypeName("HRESULT (UINT, IDXGIAdapter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumAdapters; - - [NativeTypeName("HRESULT (HWND, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] MakeWindowAssociation; - - [NativeTypeName("HRESULT (HWND *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetWindowAssociation; - - [NativeTypeName("HRESULT (IUnknown *, DXGI_SWAP_CHAIN_DESC *, IDXGISwapChain **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChain; - - [NativeTypeName("HRESULT (HMODULE, IDXGIAdapter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSoftwareAdapter; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIFactory1.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIFactory1.cs deleted file mode 100644 index e72ddbef..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIFactory1.cs +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("770AAE78-F26F-4DBA-A829-253C83D1B387")] - [NativeTypeName("struct IDXGIFactory1 : IDXGIFactory")] - [NativeInheritance("IDXGIFactory")] - internal unsafe partial struct IDXGIFactory1 : IDXGIFactory1.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDXGIFactory1*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDXGIFactory1*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDXGIFactory1*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT SetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint DataSize, [NativeTypeName("const void *")] void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDXGIFactory1*)Unsafe.AsPointer(ref this), Name, DataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT SetPrivateDataInterface([NativeTypeName("const GUID &")] Guid* Name, [NativeTypeName("const IUnknown *")] IUnknown* pUnknown) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDXGIFactory1*)Unsafe.AsPointer(ref this), Name, pUnknown); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint* pDataSize, void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDXGIFactory1*)Unsafe.AsPointer(ref this), Name, pDataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetParent([NativeTypeName("const IID &")] Guid* riid, void** ppParent) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDXGIFactory1*)Unsafe.AsPointer(ref this), riid, ppParent); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT EnumAdapters(uint Adapter, IDXGIAdapter** ppAdapter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDXGIFactory1*)Unsafe.AsPointer(ref this), Adapter, ppAdapter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT MakeWindowAssociation(HWND WindowHandle, uint Flags) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDXGIFactory1*)Unsafe.AsPointer(ref this), WindowHandle, Flags); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT GetWindowAssociation(HWND* pWindowHandle) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDXGIFactory1*)Unsafe.AsPointer(ref this), pWindowHandle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT CreateSwapChain(IUnknown* pDevice, DXGI_SWAP_CHAIN_DESC* pDesc, IDXGISwapChain** ppSwapChain) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IDXGIFactory1*)Unsafe.AsPointer(ref this), pDevice, pDesc, ppSwapChain); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CreateSoftwareAdapter(HMODULE Module, IDXGIAdapter** ppAdapter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IDXGIFactory1*)Unsafe.AsPointer(ref this), Module, ppAdapter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT EnumAdapters1(uint Adapter, IDXGIAdapter1** ppAdapter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IDXGIFactory1*)Unsafe.AsPointer(ref this), Adapter, ppAdapter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public BOOL IsCurrent() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDXGIFactory1*)Unsafe.AsPointer(ref this)); - } - - public interface Interface : IDXGIFactory.Interface - { - [VtblIndex(12)] - HRESULT EnumAdapters1(uint Adapter, IDXGIAdapter1** ppAdapter); - - [VtblIndex(13)] - BOOL IsCurrent(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetParent; - - [NativeTypeName("HRESULT (UINT, IDXGIAdapter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumAdapters; - - [NativeTypeName("HRESULT (HWND, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] MakeWindowAssociation; - - [NativeTypeName("HRESULT (HWND *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetWindowAssociation; - - [NativeTypeName("HRESULT (IUnknown *, DXGI_SWAP_CHAIN_DESC *, IDXGISwapChain **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChain; - - [NativeTypeName("HRESULT (HMODULE, IDXGIAdapter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSoftwareAdapter; - - [NativeTypeName("HRESULT (UINT, IDXGIAdapter1 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumAdapters1; - - [NativeTypeName("BOOL () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsCurrent; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIObject.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIObject.cs deleted file mode 100644 index 8d459c92..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIObject.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("AEC22FB8-76F3-4639-9BE0-28EB43A67A2E")] - [NativeTypeName("struct IDXGIObject : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IDXGIObject : IDXGIObject.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDXGIObject*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDXGIObject*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDXGIObject*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT SetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint DataSize, [NativeTypeName("const void *")] void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDXGIObject*)Unsafe.AsPointer(ref this), Name, DataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT SetPrivateDataInterface([NativeTypeName("const GUID &")] Guid* Name, [NativeTypeName("const IUnknown *")] IUnknown* pUnknown) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDXGIObject*)Unsafe.AsPointer(ref this), Name, pUnknown); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint* pDataSize, void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDXGIObject*)Unsafe.AsPointer(ref this), Name, pDataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetParent([NativeTypeName("const IID &")] Guid* riid, void** ppParent) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDXGIObject*)Unsafe.AsPointer(ref this), riid, ppParent); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT SetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint DataSize, [NativeTypeName("const void *")] void* pData); - - [VtblIndex(4)] - HRESULT SetPrivateDataInterface([NativeTypeName("const GUID &")] Guid* Name, [NativeTypeName("const IUnknown *")] IUnknown* pUnknown); - - [VtblIndex(5)] - HRESULT GetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint* pDataSize, void* pData); - - [VtblIndex(6)] - HRESULT GetParent([NativeTypeName("const IID &")] Guid* riid, void** ppParent); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetParent; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIOutput.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIOutput.cs index be59812a..d2593375 100644 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIOutput.cs +++ b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGIOutput.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("AE02EEDB-C735-4690-8D52-5A8DC20213AA")] [NativeTypeName("struct IDXGIOutput : IDXGIObject")] [NativeInheritance("IDXGIObject")] - internal unsafe partial struct IDXGIOutput : IDXGIOutput.Interface + internal unsafe partial struct IDXGIOutput { public void** lpVtbl; @@ -39,216 +39,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDXGIOutput*)Unsafe.AsPointer(ref this)); } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT SetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint DataSize, [NativeTypeName("const void *")] void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDXGIOutput*)Unsafe.AsPointer(ref this), Name, DataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT SetPrivateDataInterface([NativeTypeName("const GUID &")] Guid* Name, [NativeTypeName("const IUnknown *")] IUnknown* pUnknown) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDXGIOutput*)Unsafe.AsPointer(ref this), Name, pUnknown); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint* pDataSize, void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDXGIOutput*)Unsafe.AsPointer(ref this), Name, pDataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetParent([NativeTypeName("const IID &")] Guid* riid, void** ppParent) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDXGIOutput*)Unsafe.AsPointer(ref this), riid, ppParent); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT GetDesc(DXGI_OUTPUT_DESC* pDesc) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDXGIOutput*)Unsafe.AsPointer(ref this), pDesc); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT GetDisplayModeList(DXGI_FORMAT EnumFormat, uint Flags, uint* pNumModes, DXGI_MODE_DESC* pDesc) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDXGIOutput*)Unsafe.AsPointer(ref this), EnumFormat, Flags, pNumModes, pDesc); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT FindClosestMatchingMode([NativeTypeName("const DXGI_MODE_DESC *")] DXGI_MODE_DESC* pModeToMatch, DXGI_MODE_DESC* pClosestMatch, IUnknown* pConcernedDevice) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDXGIOutput*)Unsafe.AsPointer(ref this), pModeToMatch, pClosestMatch, pConcernedDevice); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT WaitForVBlank() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IDXGIOutput*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT TakeOwnership(IUnknown* pDevice, BOOL Exclusive) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IDXGIOutput*)Unsafe.AsPointer(ref this), pDevice, Exclusive); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public void ReleaseOwnership() - { - ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IDXGIOutput*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT GetGammaControlCapabilities(DXGI_GAMMA_CONTROL_CAPABILITIES* pGammaCaps) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDXGIOutput*)Unsafe.AsPointer(ref this), pGammaCaps); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT SetGammaControl([NativeTypeName("const DXGI_GAMMA_CONTROL *")] DXGI_GAMMA_CONTROL* pArray) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IDXGIOutput*)Unsafe.AsPointer(ref this), pArray); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT GetGammaControl(DXGI_GAMMA_CONTROL* pArray) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IDXGIOutput*)Unsafe.AsPointer(ref this), pArray); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT SetDisplaySurface(IDXGISurface* pScanoutSurface) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IDXGIOutput*)Unsafe.AsPointer(ref this), pScanoutSurface); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public HRESULT GetDisplaySurfaceData(IDXGISurface* pDestination) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IDXGIOutput*)Unsafe.AsPointer(ref this), pDestination); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public HRESULT GetFrameStatistics(DXGI_FRAME_STATISTICS* pStats) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((IDXGIOutput*)Unsafe.AsPointer(ref this), pStats); - } - - public interface Interface : IDXGIObject.Interface - { - [VtblIndex(7)] - HRESULT GetDesc(DXGI_OUTPUT_DESC* pDesc); - - [VtblIndex(8)] - HRESULT GetDisplayModeList(DXGI_FORMAT EnumFormat, uint Flags, uint* pNumModes, DXGI_MODE_DESC* pDesc); - - [VtblIndex(9)] - HRESULT FindClosestMatchingMode([NativeTypeName("const DXGI_MODE_DESC *")] DXGI_MODE_DESC* pModeToMatch, DXGI_MODE_DESC* pClosestMatch, IUnknown* pConcernedDevice); - - [VtblIndex(10)] - HRESULT WaitForVBlank(); - - [VtblIndex(11)] - HRESULT TakeOwnership(IUnknown* pDevice, BOOL Exclusive); - - [VtblIndex(12)] - void ReleaseOwnership(); - - [VtblIndex(13)] - HRESULT GetGammaControlCapabilities(DXGI_GAMMA_CONTROL_CAPABILITIES* pGammaCaps); - - [VtblIndex(14)] - HRESULT SetGammaControl([NativeTypeName("const DXGI_GAMMA_CONTROL *")] DXGI_GAMMA_CONTROL* pArray); - - [VtblIndex(15)] - HRESULT GetGammaControl(DXGI_GAMMA_CONTROL* pArray); - - [VtblIndex(16)] - HRESULT SetDisplaySurface(IDXGISurface* pScanoutSurface); - - [VtblIndex(17)] - HRESULT GetDisplaySurfaceData(IDXGISurface* pDestination); - - [VtblIndex(18)] - HRESULT GetFrameStatistics(DXGI_FRAME_STATISTICS* pStats); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetParent; - - [NativeTypeName("HRESULT (DXGI_OUTPUT_DESC *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDesc; - - [NativeTypeName("HRESULT (DXGI_FORMAT, UINT, UINT *, DXGI_MODE_DESC *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDisplayModeList; - - [NativeTypeName("HRESULT (const DXGI_MODE_DESC *, DXGI_MODE_DESC *, IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FindClosestMatchingMode; - - [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] WaitForVBlank; - - [NativeTypeName("HRESULT (IUnknown *, BOOL) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] TakeOwnership; - - [NativeTypeName("void () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ReleaseOwnership; - - [NativeTypeName("HRESULT (DXGI_GAMMA_CONTROL_CAPABILITIES *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetGammaControlCapabilities; - - [NativeTypeName("HRESULT (const DXGI_GAMMA_CONTROL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetGammaControl; - - [NativeTypeName("HRESULT (DXGI_GAMMA_CONTROL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetGammaControl; - - [NativeTypeName("HRESULT (IDXGISurface *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetDisplaySurface; - - [NativeTypeName("HRESULT (IDXGISurface *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDisplaySurfaceData; - - [NativeTypeName("HRESULT (DXGI_FRAME_STATISTICS *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFrameStatistics; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGISurface.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGISurface.cs deleted file mode 100644 index f31bda8e..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGISurface.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("CAFCB56C-6AC3-4889-BF47-9E23BBD260EC")] - [NativeTypeName("struct IDXGISurface : IDXGIDeviceSubObject")] - [NativeInheritance("IDXGIDeviceSubObject")] - internal unsafe partial struct IDXGISurface : IDXGISurface.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDXGISurface*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDXGISurface*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDXGISurface*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT SetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint DataSize, [NativeTypeName("const void *")] void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDXGISurface*)Unsafe.AsPointer(ref this), Name, DataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT SetPrivateDataInterface([NativeTypeName("const GUID &")] Guid* Name, [NativeTypeName("const IUnknown *")] IUnknown* pUnknown) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDXGISurface*)Unsafe.AsPointer(ref this), Name, pUnknown); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint* pDataSize, void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDXGISurface*)Unsafe.AsPointer(ref this), Name, pDataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetParent([NativeTypeName("const IID &")] Guid* riid, void** ppParent) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDXGISurface*)Unsafe.AsPointer(ref this), riid, ppParent); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT GetDevice([NativeTypeName("const IID &")] Guid* riid, void** ppDevice) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDXGISurface*)Unsafe.AsPointer(ref this), riid, ppDevice); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT GetDesc(DXGI_SURFACE_DESC* pDesc) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDXGISurface*)Unsafe.AsPointer(ref this), pDesc); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT Map(DXGI_MAPPED_RECT* pLockedRect, uint MapFlags) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDXGISurface*)Unsafe.AsPointer(ref this), pLockedRect, MapFlags); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT Unmap() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IDXGISurface*)Unsafe.AsPointer(ref this)); - } - - public interface Interface : IDXGIDeviceSubObject.Interface - { - [VtblIndex(8)] - HRESULT GetDesc(DXGI_SURFACE_DESC* pDesc); - - [VtblIndex(9)] - HRESULT Map(DXGI_MAPPED_RECT* pLockedRect, uint MapFlags); - - [VtblIndex(10)] - HRESULT Unmap(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetParent; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDevice; - - [NativeTypeName("HRESULT (DXGI_SURFACE_DESC *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDesc; - - [NativeTypeName("HRESULT (DXGI_MAPPED_RECT *, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Map; - - [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Unmap; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGISwapChain.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGISwapChain.cs index 3a428798..5e8cf0a8 100644 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGISwapChain.cs +++ b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi/IDXGISwapChain.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("310D36A0-D2E7-4C0A-AA04-6A9D23B8886A")] [NativeTypeName("struct IDXGISwapChain : IDXGIDeviceSubObject")] [NativeInheritance("IDXGIDeviceSubObject")] - internal unsafe partial struct IDXGISwapChain : IDXGISwapChain.Interface + internal unsafe partial struct IDXGISwapChain { public void** lpVtbl; @@ -39,200 +39,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDXGISwapChain*)Unsafe.AsPointer(ref this)); } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT SetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint DataSize, [NativeTypeName("const void *")] void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDXGISwapChain*)Unsafe.AsPointer(ref this), Name, DataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT SetPrivateDataInterface([NativeTypeName("const GUID &")] Guid* Name, [NativeTypeName("const IUnknown *")] IUnknown* pUnknown) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDXGISwapChain*)Unsafe.AsPointer(ref this), Name, pUnknown); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint* pDataSize, void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDXGISwapChain*)Unsafe.AsPointer(ref this), Name, pDataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetParent([NativeTypeName("const IID &")] Guid* riid, void** ppParent) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDXGISwapChain*)Unsafe.AsPointer(ref this), riid, ppParent); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT GetDevice([NativeTypeName("const IID &")] Guid* riid, void** ppDevice) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDXGISwapChain*)Unsafe.AsPointer(ref this), riid, ppDevice); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT Present(uint SyncInterval, uint Flags) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDXGISwapChain*)Unsafe.AsPointer(ref this), SyncInterval, Flags); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT GetBuffer(uint Buffer, [NativeTypeName("const IID &")] Guid* riid, void** ppSurface) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDXGISwapChain*)Unsafe.AsPointer(ref this), Buffer, riid, ppSurface); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT SetFullscreenState(BOOL Fullscreen, IDXGIOutput* pTarget) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IDXGISwapChain*)Unsafe.AsPointer(ref this), Fullscreen, pTarget); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT GetFullscreenState(BOOL* pFullscreen, IDXGIOutput** ppTarget) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IDXGISwapChain*)Unsafe.AsPointer(ref this), pFullscreen, ppTarget); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT GetDesc(DXGI_SWAP_CHAIN_DESC* pDesc) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IDXGISwapChain*)Unsafe.AsPointer(ref this), pDesc); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT ResizeBuffers(uint BufferCount, uint Width, uint Height, DXGI_FORMAT NewFormat, uint SwapChainFlags) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDXGISwapChain*)Unsafe.AsPointer(ref this), BufferCount, Width, Height, NewFormat, SwapChainFlags); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT ResizeTarget([NativeTypeName("const DXGI_MODE_DESC *")] DXGI_MODE_DESC* pNewTargetParameters) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IDXGISwapChain*)Unsafe.AsPointer(ref this), pNewTargetParameters); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT GetContainingOutput(IDXGIOutput** ppOutput) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IDXGISwapChain*)Unsafe.AsPointer(ref this), ppOutput); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT GetFrameStatistics(DXGI_FRAME_STATISTICS* pStats) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IDXGISwapChain*)Unsafe.AsPointer(ref this), pStats); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public HRESULT GetLastPresentCount(uint* pLastPresentCount) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IDXGISwapChain*)Unsafe.AsPointer(ref this), pLastPresentCount); - } - - public interface Interface : IDXGIDeviceSubObject.Interface - { - [VtblIndex(8)] - HRESULT Present(uint SyncInterval, uint Flags); - - [VtblIndex(9)] - HRESULT GetBuffer(uint Buffer, [NativeTypeName("const IID &")] Guid* riid, void** ppSurface); - - [VtblIndex(10)] - HRESULT SetFullscreenState(BOOL Fullscreen, IDXGIOutput* pTarget); - - [VtblIndex(11)] - HRESULT GetFullscreenState(BOOL* pFullscreen, IDXGIOutput** ppTarget); - - [VtblIndex(12)] - HRESULT GetDesc(DXGI_SWAP_CHAIN_DESC* pDesc); - - [VtblIndex(13)] - HRESULT ResizeBuffers(uint BufferCount, uint Width, uint Height, DXGI_FORMAT NewFormat, uint SwapChainFlags); - - [VtblIndex(14)] - HRESULT ResizeTarget([NativeTypeName("const DXGI_MODE_DESC *")] DXGI_MODE_DESC* pNewTargetParameters); - - [VtblIndex(15)] - HRESULT GetContainingOutput(IDXGIOutput** ppOutput); - - [VtblIndex(16)] - HRESULT GetFrameStatistics(DXGI_FRAME_STATISTICS* pStats); - - [VtblIndex(17)] - HRESULT GetLastPresentCount(uint* pLastPresentCount); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetParent; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDevice; - - [NativeTypeName("HRESULT (UINT, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Present; - - [NativeTypeName("HRESULT (UINT, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBuffer; - - [NativeTypeName("HRESULT (BOOL, IDXGIOutput *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetFullscreenState; - - [NativeTypeName("HRESULT (BOOL *, IDXGIOutput **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFullscreenState; - - [NativeTypeName("HRESULT (DXGI_SWAP_CHAIN_DESC *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDesc; - - [NativeTypeName("HRESULT (UINT, UINT, UINT, DXGI_FORMAT, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ResizeBuffers; - - [NativeTypeName("HRESULT (const DXGI_MODE_DESC *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ResizeTarget; - - [NativeTypeName("HRESULT (IDXGIOutput **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetContainingOutput; - - [NativeTypeName("HRESULT (DXGI_FRAME_STATISTICS *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFrameStatistics; - - [NativeTypeName("HRESULT (UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetLastPresentCount; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_2/DXGI_PRESENT_PARAMETERS.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_2/DXGI_PRESENT_PARAMETERS.cs deleted file mode 100644 index fd07a791..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_2/DXGI_PRESENT_PARAMETERS.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgi1_2.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct DXGI_PRESENT_PARAMETERS - { - public uint DirtyRectsCount; - - public RECT* pDirtyRects; - - public RECT* pScrollRect; - - public POINT* pScrollOffset; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_2/DXGI_SWAP_CHAIN_FULLSCREEN_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_2/DXGI_SWAP_CHAIN_FULLSCREEN_DESC.cs deleted file mode 100644 index 12142f5a..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_2/DXGI_SWAP_CHAIN_FULLSCREEN_DESC.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgi1_2.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DXGI_SWAP_CHAIN_FULLSCREEN_DESC - { - public DXGI_RATIONAL RefreshRate; - - public DXGI_MODE_SCANLINE_ORDER ScanlineOrdering; - - public DXGI_MODE_SCALING Scaling; - - public BOOL Windowed; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_2/IDXGIFactory2.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_2/IDXGIFactory2.cs index 7cc967af..92a574e0 100644 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_2/IDXGIFactory2.cs +++ b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_2/IDXGIFactory2.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("50C83A1C-E072-4C48-87B0-3630FA36A6D0")] [NativeTypeName("struct IDXGIFactory2 : IDXGIFactory1")] [NativeInheritance("IDXGIFactory1")] - internal unsafe partial struct IDXGIFactory2 : IDXGIFactory2.Interface + internal unsafe partial struct IDXGIFactory2 { public void** lpVtbl; @@ -40,272 +40,11 @@ namespace TerraFX.Interop.DirectX return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDXGIFactory2*)Unsafe.AsPointer(ref this)); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT SetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint DataSize, [NativeTypeName("const void *")] void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), Name, DataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT SetPrivateDataInterface([NativeTypeName("const GUID &")] Guid* Name, [NativeTypeName("const IUnknown *")] IUnknown* pUnknown) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), Name, pUnknown); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint* pDataSize, void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), Name, pDataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetParent([NativeTypeName("const IID &")] Guid* riid, void** ppParent) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), riid, ppParent); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT EnumAdapters(uint Adapter, IDXGIAdapter** ppAdapter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), Adapter, ppAdapter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT MakeWindowAssociation(HWND WindowHandle, uint Flags) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), WindowHandle, Flags); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT GetWindowAssociation(HWND* pWindowHandle) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), pWindowHandle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT CreateSwapChain(IUnknown* pDevice, DXGI_SWAP_CHAIN_DESC* pDesc, IDXGISwapChain** ppSwapChain) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), pDevice, pDesc, ppSwapChain); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CreateSoftwareAdapter(HMODULE Module, IDXGIAdapter** ppAdapter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), Module, ppAdapter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT EnumAdapters1(uint Adapter, IDXGIAdapter1** ppAdapter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), Adapter, ppAdapter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public BOOL IsCurrent() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDXGIFactory2*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public BOOL IsWindowedStereoEnabled() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IDXGIFactory2*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT CreateSwapChainForHwnd(IUnknown* pDevice, HWND hWnd, [NativeTypeName("const DXGI_SWAP_CHAIN_DESC1 *")] DXGI_SWAP_CHAIN_DESC1* pDesc, [NativeTypeName("const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *")] DXGI_SWAP_CHAIN_FULLSCREEN_DESC* pFullscreenDesc, IDXGIOutput* pRestrictToOutput, IDXGISwapChain1** ppSwapChain) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), pDevice, hWnd, pDesc, pFullscreenDesc, pRestrictToOutput, ppSwapChain); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT CreateSwapChainForCoreWindow(IUnknown* pDevice, IUnknown* pWindow, [NativeTypeName("const DXGI_SWAP_CHAIN_DESC1 *")] DXGI_SWAP_CHAIN_DESC1* pDesc, IDXGIOutput* pRestrictToOutput, IDXGISwapChain1** ppSwapChain) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), pDevice, pWindow, pDesc, pRestrictToOutput, ppSwapChain); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public HRESULT GetSharedResourceAdapterLuid(HANDLE hResource, LUID* pLuid) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), hResource, pLuid); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public HRESULT RegisterStereoStatusWindow(HWND WindowHandle, uint wMsg, [NativeTypeName("DWORD *")] uint* pdwCookie) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), WindowHandle, wMsg, pdwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(19)] - public HRESULT RegisterStereoStatusEvent(HANDLE hEvent, [NativeTypeName("DWORD *")] uint* pdwCookie) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), hEvent, pdwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(20)] - public void UnregisterStereoStatus([NativeTypeName("DWORD")] uint dwCookie) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), dwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(21)] - public HRESULT RegisterOcclusionStatusWindow(HWND WindowHandle, uint wMsg, [NativeTypeName("DWORD *")] uint* pdwCookie) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), WindowHandle, wMsg, pdwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(22)] - public HRESULT RegisterOcclusionStatusEvent(HANDLE hEvent, [NativeTypeName("DWORD *")] uint* pdwCookie) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), hEvent, pdwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(23)] - public void UnregisterOcclusionStatus([NativeTypeName("DWORD")] uint dwCookie) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[23]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), dwCookie); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(24)] public HRESULT CreateSwapChainForComposition(IUnknown* pDevice, [NativeTypeName("const DXGI_SWAP_CHAIN_DESC1 *")] DXGI_SWAP_CHAIN_DESC1* pDesc, IDXGIOutput* pRestrictToOutput, IDXGISwapChain1** ppSwapChain) { return ((delegate* unmanaged[Stdcall])(lpVtbl[24]))((IDXGIFactory2*)Unsafe.AsPointer(ref this), pDevice, pDesc, pRestrictToOutput, ppSwapChain); } - - public interface Interface : IDXGIFactory1.Interface - { - [VtblIndex(14)] - BOOL IsWindowedStereoEnabled(); - - [VtblIndex(15)] - HRESULT CreateSwapChainForHwnd(IUnknown* pDevice, HWND hWnd, [NativeTypeName("const DXGI_SWAP_CHAIN_DESC1 *")] DXGI_SWAP_CHAIN_DESC1* pDesc, [NativeTypeName("const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *")] DXGI_SWAP_CHAIN_FULLSCREEN_DESC* pFullscreenDesc, IDXGIOutput* pRestrictToOutput, IDXGISwapChain1** ppSwapChain); - - [VtblIndex(16)] - HRESULT CreateSwapChainForCoreWindow(IUnknown* pDevice, IUnknown* pWindow, [NativeTypeName("const DXGI_SWAP_CHAIN_DESC1 *")] DXGI_SWAP_CHAIN_DESC1* pDesc, IDXGIOutput* pRestrictToOutput, IDXGISwapChain1** ppSwapChain); - - [VtblIndex(17)] - HRESULT GetSharedResourceAdapterLuid(HANDLE hResource, LUID* pLuid); - - [VtblIndex(18)] - HRESULT RegisterStereoStatusWindow(HWND WindowHandle, uint wMsg, [NativeTypeName("DWORD *")] uint* pdwCookie); - - [VtblIndex(19)] - HRESULT RegisterStereoStatusEvent(HANDLE hEvent, [NativeTypeName("DWORD *")] uint* pdwCookie); - - [VtblIndex(20)] - void UnregisterStereoStatus([NativeTypeName("DWORD")] uint dwCookie); - - [VtblIndex(21)] - HRESULT RegisterOcclusionStatusWindow(HWND WindowHandle, uint wMsg, [NativeTypeName("DWORD *")] uint* pdwCookie); - - [VtblIndex(22)] - HRESULT RegisterOcclusionStatusEvent(HANDLE hEvent, [NativeTypeName("DWORD *")] uint* pdwCookie); - - [VtblIndex(23)] - void UnregisterOcclusionStatus([NativeTypeName("DWORD")] uint dwCookie); - - [VtblIndex(24)] - HRESULT CreateSwapChainForComposition(IUnknown* pDevice, [NativeTypeName("const DXGI_SWAP_CHAIN_DESC1 *")] DXGI_SWAP_CHAIN_DESC1* pDesc, IDXGIOutput* pRestrictToOutput, IDXGISwapChain1** ppSwapChain); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetParent; - - [NativeTypeName("HRESULT (UINT, IDXGIAdapter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumAdapters; - - [NativeTypeName("HRESULT (HWND, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] MakeWindowAssociation; - - [NativeTypeName("HRESULT (HWND *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetWindowAssociation; - - [NativeTypeName("HRESULT (IUnknown *, DXGI_SWAP_CHAIN_DESC *, IDXGISwapChain **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChain; - - [NativeTypeName("HRESULT (HMODULE, IDXGIAdapter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSoftwareAdapter; - - [NativeTypeName("HRESULT (UINT, IDXGIAdapter1 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumAdapters1; - - [NativeTypeName("BOOL () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsCurrent; - - [NativeTypeName("BOOL () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsWindowedStereoEnabled; - - [NativeTypeName("HRESULT (IUnknown *, HWND, const DXGI_SWAP_CHAIN_DESC1 *, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *, IDXGIOutput *, IDXGISwapChain1 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChainForHwnd; - - [NativeTypeName("HRESULT (IUnknown *, IUnknown *, const DXGI_SWAP_CHAIN_DESC1 *, IDXGIOutput *, IDXGISwapChain1 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChainForCoreWindow; - - [NativeTypeName("HRESULT (HANDLE, LUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSharedResourceAdapterLuid; - - [NativeTypeName("HRESULT (HWND, UINT, DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RegisterStereoStatusWindow; - - [NativeTypeName("HRESULT (HANDLE, DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RegisterStereoStatusEvent; - - [NativeTypeName("void (DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] UnregisterStereoStatus; - - [NativeTypeName("HRESULT (HWND, UINT, DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RegisterOcclusionStatusWindow; - - [NativeTypeName("HRESULT (HANDLE, DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RegisterOcclusionStatusEvent; - - [NativeTypeName("void (DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] UnregisterOcclusionStatus; - - [NativeTypeName("HRESULT (IUnknown *, const DXGI_SWAP_CHAIN_DESC1 *, IDXGIOutput *, IDXGISwapChain1 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChainForComposition; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_2/IDXGISwapChain1.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_2/IDXGISwapChain1.cs index 4335fa94..d6fbecab 100644 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_2/IDXGISwapChain1.cs +++ b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_2/IDXGISwapChain1.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("790A45F7-0D42-4876-983A-0A55CFE6F4AA")] [NativeTypeName("struct IDXGISwapChain1 : IDXGISwapChain")] [NativeInheritance("IDXGISwapChain")] - internal unsafe partial struct IDXGISwapChain1 : IDXGISwapChain1.Interface + internal unsafe partial struct IDXGISwapChain1 { public void** lpVtbl; @@ -39,313 +39,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this)); } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT SetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint DataSize, [NativeTypeName("const void *")] void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), Name, DataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT SetPrivateDataInterface([NativeTypeName("const GUID &")] Guid* Name, [NativeTypeName("const IUnknown *")] IUnknown* pUnknown) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), Name, pUnknown); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint* pDataSize, void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), Name, pDataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetParent([NativeTypeName("const IID &")] Guid* riid, void** ppParent) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), riid, ppParent); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT GetDevice([NativeTypeName("const IID &")] Guid* riid, void** ppDevice) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), riid, ppDevice); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT Present(uint SyncInterval, uint Flags) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), SyncInterval, Flags); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT GetBuffer(uint Buffer, [NativeTypeName("const IID &")] Guid* riid, void** ppSurface) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), Buffer, riid, ppSurface); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT SetFullscreenState(BOOL Fullscreen, IDXGIOutput* pTarget) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), Fullscreen, pTarget); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT GetFullscreenState(BOOL* pFullscreen, IDXGIOutput** ppTarget) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), pFullscreen, ppTarget); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT GetDesc(DXGI_SWAP_CHAIN_DESC* pDesc) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), pDesc); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT ResizeBuffers(uint BufferCount, uint Width, uint Height, DXGI_FORMAT NewFormat, uint SwapChainFlags) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), BufferCount, Width, Height, NewFormat, SwapChainFlags); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT ResizeTarget([NativeTypeName("const DXGI_MODE_DESC *")] DXGI_MODE_DESC* pNewTargetParameters) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), pNewTargetParameters); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT GetContainingOutput(IDXGIOutput** ppOutput) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), ppOutput); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT GetFrameStatistics(DXGI_FRAME_STATISTICS* pStats) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), pStats); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public HRESULT GetLastPresentCount(uint* pLastPresentCount) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), pLastPresentCount); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public HRESULT GetDesc1(DXGI_SWAP_CHAIN_DESC1* pDesc) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), pDesc); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(19)] - public HRESULT GetFullscreenDesc(DXGI_SWAP_CHAIN_FULLSCREEN_DESC* pDesc) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), pDesc); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(20)] - public HRESULT GetHwnd(HWND* pHwnd) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), pHwnd); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(21)] - public HRESULT GetCoreWindow([NativeTypeName("const IID &")] Guid* refiid, void** ppUnk) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), refiid, ppUnk); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(22)] - public HRESULT Present1(uint SyncInterval, uint PresentFlags, [NativeTypeName("const DXGI_PRESENT_PARAMETERS *")] DXGI_PRESENT_PARAMETERS* pPresentParameters) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), SyncInterval, PresentFlags, pPresentParameters); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(23)] - public BOOL IsTemporaryMonoSupported() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[23]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(24)] - public HRESULT GetRestrictToOutput(IDXGIOutput** ppRestrictToOutput) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[24]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), ppRestrictToOutput); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(25)] - public HRESULT SetBackgroundColor([NativeTypeName("const DXGI_RGBA *")] DXGI_RGBA* pColor) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[25]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), pColor); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(26)] - public HRESULT GetBackgroundColor(DXGI_RGBA* pColor) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[26]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), pColor); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(27)] - public HRESULT SetRotation(DXGI_MODE_ROTATION Rotation) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[27]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), Rotation); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(28)] - public HRESULT GetRotation(DXGI_MODE_ROTATION* pRotation) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), pRotation); - } - - public interface Interface : IDXGISwapChain.Interface - { - [VtblIndex(18)] - HRESULT GetDesc1(DXGI_SWAP_CHAIN_DESC1* pDesc); - - [VtblIndex(19)] - HRESULT GetFullscreenDesc(DXGI_SWAP_CHAIN_FULLSCREEN_DESC* pDesc); - - [VtblIndex(20)] - HRESULT GetHwnd(HWND* pHwnd); - - [VtblIndex(21)] - HRESULT GetCoreWindow([NativeTypeName("const IID &")] Guid* refiid, void** ppUnk); - - [VtblIndex(22)] - HRESULT Present1(uint SyncInterval, uint PresentFlags, [NativeTypeName("const DXGI_PRESENT_PARAMETERS *")] DXGI_PRESENT_PARAMETERS* pPresentParameters); - - [VtblIndex(23)] - BOOL IsTemporaryMonoSupported(); - - [VtblIndex(24)] - HRESULT GetRestrictToOutput(IDXGIOutput** ppRestrictToOutput); - - [VtblIndex(25)] - HRESULT SetBackgroundColor([NativeTypeName("const DXGI_RGBA *")] DXGI_RGBA* pColor); - - [VtblIndex(26)] - HRESULT GetBackgroundColor(DXGI_RGBA* pColor); - - [VtblIndex(27)] - HRESULT SetRotation(DXGI_MODE_ROTATION Rotation); - - [VtblIndex(28)] - HRESULT GetRotation(DXGI_MODE_ROTATION* pRotation); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetParent; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDevice; - - [NativeTypeName("HRESULT (UINT, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Present; - - [NativeTypeName("HRESULT (UINT, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBuffer; - - [NativeTypeName("HRESULT (BOOL, IDXGIOutput *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetFullscreenState; - - [NativeTypeName("HRESULT (BOOL *, IDXGIOutput **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFullscreenState; - - [NativeTypeName("HRESULT (DXGI_SWAP_CHAIN_DESC *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDesc; - - [NativeTypeName("HRESULT (UINT, UINT, UINT, DXGI_FORMAT, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ResizeBuffers; - - [NativeTypeName("HRESULT (const DXGI_MODE_DESC *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ResizeTarget; - - [NativeTypeName("HRESULT (IDXGIOutput **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetContainingOutput; - - [NativeTypeName("HRESULT (DXGI_FRAME_STATISTICS *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFrameStatistics; - - [NativeTypeName("HRESULT (UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetLastPresentCount; - - [NativeTypeName("HRESULT (DXGI_SWAP_CHAIN_DESC1 *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDesc1; - - [NativeTypeName("HRESULT (DXGI_SWAP_CHAIN_FULLSCREEN_DESC *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFullscreenDesc; - - [NativeTypeName("HRESULT (HWND *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetHwnd; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetCoreWindow; - - [NativeTypeName("HRESULT (UINT, UINT, const DXGI_PRESENT_PARAMETERS *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Present1; - - [NativeTypeName("BOOL () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsTemporaryMonoSupported; - - [NativeTypeName("HRESULT (IDXGIOutput **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetRestrictToOutput; - - [NativeTypeName("HRESULT (const DXGI_RGBA *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetBackgroundColor; - - [NativeTypeName("HRESULT (DXGI_RGBA *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBackgroundColor; - - [NativeTypeName("HRESULT (DXGI_MODE_ROTATION) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetRotation; - - [NativeTypeName("HRESULT (DXGI_MODE_ROTATION *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetRotation; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_3/DXGI_MATRIX_3X2_F.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_3/DXGI_MATRIX_3X2_F.cs new file mode 100644 index 00000000..f6a6be78 --- /dev/null +++ b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_3/DXGI_MATRIX_3X2_F.cs @@ -0,0 +1,25 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from shared/dxgi1_3.h in the Windows SDK for Windows 10.0.20348.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.Versioning; + +namespace TerraFX.Interop.DirectX +{ + [SupportedOSPlatform("windows8.1")] + internal partial struct DXGI_MATRIX_3X2_F + { + public float _11; + + public float _12; + + public float _21; + + public float _22; + + public float _31; + + public float _32; + } +} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_3/DirectX.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_3/DirectX.cs index a74f089a..440954d3 100644 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_3/DirectX.cs +++ b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_3/DirectX.cs @@ -15,9 +15,5 @@ namespace TerraFX.Interop.DirectX [SupportedOSPlatform("windows8.1")] [DllImport("dxgi", ExactSpelling = true)] public static extern HRESULT CreateDXGIFactory2(uint Flags, [NativeTypeName("const IID &")] Guid* riid, void** ppFactory); - - [SupportedOSPlatform("windows8.1")] - [DllImport("dxgi", ExactSpelling = true)] - public static extern HRESULT DXGIGetDebugInterface1(uint Flags, [NativeTypeName("const IID &")] Guid* riid, void** pDebug); } } diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_3/IDXGIFactory3.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_3/IDXGIFactory3.cs deleted file mode 100644 index 015d887a..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_3/IDXGIFactory3.cs +++ /dev/null @@ -1,293 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgi1_3.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Versioning; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [SupportedOSPlatform("windows8.1")] - [Guid("25483823-CD46-4C7D-86CA-47AA95B837BD")] - [NativeTypeName("struct IDXGIFactory3 : IDXGIFactory2")] - [NativeInheritance("IDXGIFactory2")] - internal unsafe partial struct IDXGIFactory3 : IDXGIFactory3.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDXGIFactory3*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDXGIFactory3*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT SetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint DataSize, [NativeTypeName("const void *")] void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), Name, DataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT SetPrivateDataInterface([NativeTypeName("const GUID &")] Guid* Name, [NativeTypeName("const IUnknown *")] IUnknown* pUnknown) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), Name, pUnknown); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint* pDataSize, void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), Name, pDataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetParent([NativeTypeName("const IID &")] Guid* riid, void** ppParent) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), riid, ppParent); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT EnumAdapters(uint Adapter, IDXGIAdapter** ppAdapter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), Adapter, ppAdapter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT MakeWindowAssociation(HWND WindowHandle, uint Flags) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), WindowHandle, Flags); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT GetWindowAssociation(HWND* pWindowHandle) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), pWindowHandle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT CreateSwapChain(IUnknown* pDevice, DXGI_SWAP_CHAIN_DESC* pDesc, IDXGISwapChain** ppSwapChain) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), pDevice, pDesc, ppSwapChain); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CreateSoftwareAdapter(HMODULE Module, IDXGIAdapter** ppAdapter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), Module, ppAdapter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT EnumAdapters1(uint Adapter, IDXGIAdapter1** ppAdapter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), Adapter, ppAdapter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public BOOL IsCurrent() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDXGIFactory3*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public BOOL IsWindowedStereoEnabled() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IDXGIFactory3*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT CreateSwapChainForHwnd(IUnknown* pDevice, HWND hWnd, [NativeTypeName("const DXGI_SWAP_CHAIN_DESC1 *")] DXGI_SWAP_CHAIN_DESC1* pDesc, [NativeTypeName("const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *")] DXGI_SWAP_CHAIN_FULLSCREEN_DESC* pFullscreenDesc, IDXGIOutput* pRestrictToOutput, IDXGISwapChain1** ppSwapChain) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), pDevice, hWnd, pDesc, pFullscreenDesc, pRestrictToOutput, ppSwapChain); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT CreateSwapChainForCoreWindow(IUnknown* pDevice, IUnknown* pWindow, [NativeTypeName("const DXGI_SWAP_CHAIN_DESC1 *")] DXGI_SWAP_CHAIN_DESC1* pDesc, IDXGIOutput* pRestrictToOutput, IDXGISwapChain1** ppSwapChain) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), pDevice, pWindow, pDesc, pRestrictToOutput, ppSwapChain); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public HRESULT GetSharedResourceAdapterLuid(HANDLE hResource, LUID* pLuid) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), hResource, pLuid); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public HRESULT RegisterStereoStatusWindow(HWND WindowHandle, uint wMsg, [NativeTypeName("DWORD *")] uint* pdwCookie) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), WindowHandle, wMsg, pdwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(19)] - public HRESULT RegisterStereoStatusEvent(HANDLE hEvent, [NativeTypeName("DWORD *")] uint* pdwCookie) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), hEvent, pdwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(20)] - public void UnregisterStereoStatus([NativeTypeName("DWORD")] uint dwCookie) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), dwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(21)] - public HRESULT RegisterOcclusionStatusWindow(HWND WindowHandle, uint wMsg, [NativeTypeName("DWORD *")] uint* pdwCookie) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), WindowHandle, wMsg, pdwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(22)] - public HRESULT RegisterOcclusionStatusEvent(HANDLE hEvent, [NativeTypeName("DWORD *")] uint* pdwCookie) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), hEvent, pdwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(23)] - public void UnregisterOcclusionStatus([NativeTypeName("DWORD")] uint dwCookie) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[23]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), dwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(24)] - public HRESULT CreateSwapChainForComposition(IUnknown* pDevice, [NativeTypeName("const DXGI_SWAP_CHAIN_DESC1 *")] DXGI_SWAP_CHAIN_DESC1* pDesc, IDXGIOutput* pRestrictToOutput, IDXGISwapChain1** ppSwapChain) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[24]))((IDXGIFactory3*)Unsafe.AsPointer(ref this), pDevice, pDesc, pRestrictToOutput, ppSwapChain); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(25)] - public uint GetCreationFlags() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[25]))((IDXGIFactory3*)Unsafe.AsPointer(ref this)); - } - - public interface Interface : IDXGIFactory2.Interface - { - [VtblIndex(25)] - uint GetCreationFlags(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetParent; - - [NativeTypeName("HRESULT (UINT, IDXGIAdapter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumAdapters; - - [NativeTypeName("HRESULT (HWND, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] MakeWindowAssociation; - - [NativeTypeName("HRESULT (HWND *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetWindowAssociation; - - [NativeTypeName("HRESULT (IUnknown *, DXGI_SWAP_CHAIN_DESC *, IDXGISwapChain **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChain; - - [NativeTypeName("HRESULT (HMODULE, IDXGIAdapter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSoftwareAdapter; - - [NativeTypeName("HRESULT (UINT, IDXGIAdapter1 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumAdapters1; - - [NativeTypeName("BOOL () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsCurrent; - - [NativeTypeName("BOOL () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsWindowedStereoEnabled; - - [NativeTypeName("HRESULT (IUnknown *, HWND, const DXGI_SWAP_CHAIN_DESC1 *, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *, IDXGIOutput *, IDXGISwapChain1 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChainForHwnd; - - [NativeTypeName("HRESULT (IUnknown *, IUnknown *, const DXGI_SWAP_CHAIN_DESC1 *, IDXGIOutput *, IDXGISwapChain1 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChainForCoreWindow; - - [NativeTypeName("HRESULT (HANDLE, LUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSharedResourceAdapterLuid; - - [NativeTypeName("HRESULT (HWND, UINT, DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RegisterStereoStatusWindow; - - [NativeTypeName("HRESULT (HANDLE, DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RegisterStereoStatusEvent; - - [NativeTypeName("void (DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] UnregisterStereoStatus; - - [NativeTypeName("HRESULT (HWND, UINT, DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RegisterOcclusionStatusWindow; - - [NativeTypeName("HRESULT (HANDLE, DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RegisterOcclusionStatusEvent; - - [NativeTypeName("void (DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] UnregisterOcclusionStatus; - - [NativeTypeName("HRESULT (IUnknown *, const DXGI_SWAP_CHAIN_DESC1 *, IDXGIOutput *, IDXGISwapChain1 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChainForComposition; - - [NativeTypeName("UINT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetCreationFlags; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_4/IDXGIFactory4.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_4/IDXGIFactory4.cs index 71189315..19eb878b 100644 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_4/IDXGIFactory4.cs +++ b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_4/IDXGIFactory4.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("1BC6EA02-EF36-464F-BF0C-21CA39E5168A")] [NativeTypeName("struct IDXGIFactory4 : IDXGIFactory3")] [NativeInheritance("IDXGIFactory3")] - internal unsafe partial struct IDXGIFactory4 : IDXGIFactory4.Interface + internal unsafe partial struct IDXGIFactory4 { public void** lpVtbl; @@ -89,20 +89,6 @@ namespace TerraFX.Interop.DirectX return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDXGIFactory4*)Unsafe.AsPointer(ref this), pWindowHandle); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT CreateSwapChain(IUnknown* pDevice, DXGI_SWAP_CHAIN_DESC* pDesc, IDXGISwapChain** ppSwapChain) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IDXGIFactory4*)Unsafe.AsPointer(ref this), pDevice, pDesc, ppSwapChain); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CreateSoftwareAdapter(HMODULE Module, IDXGIAdapter** ppAdapter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IDXGIFactory4*)Unsafe.AsPointer(ref this), Module, ppAdapter); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(12)] public HRESULT EnumAdapters1(uint Adapter, IDXGIAdapter1** ppAdapter) @@ -124,13 +110,6 @@ namespace TerraFX.Interop.DirectX return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IDXGIFactory4*)Unsafe.AsPointer(ref this)); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT CreateSwapChainForHwnd(IUnknown* pDevice, HWND hWnd, [NativeTypeName("const DXGI_SWAP_CHAIN_DESC1 *")] DXGI_SWAP_CHAIN_DESC1* pDesc, [NativeTypeName("const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *")] DXGI_SWAP_CHAIN_FULLSCREEN_DESC* pFullscreenDesc, IDXGIOutput* pRestrictToOutput, IDXGISwapChain1** ppSwapChain) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IDXGIFactory4*)Unsafe.AsPointer(ref this), pDevice, hWnd, pDesc, pFullscreenDesc, pRestrictToOutput, ppSwapChain); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(16)] public HRESULT CreateSwapChainForCoreWindow(IUnknown* pDevice, IUnknown* pWindow, [NativeTypeName("const DXGI_SWAP_CHAIN_DESC1 *")] DXGI_SWAP_CHAIN_DESC1* pDesc, IDXGIOutput* pRestrictToOutput, IDXGISwapChain1** ppSwapChain) @@ -214,101 +193,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[27]))((IDXGIFactory4*)Unsafe.AsPointer(ref this), riid, ppvAdapter); } - - public interface Interface : IDXGIFactory3.Interface - { - [VtblIndex(26)] - HRESULT EnumAdapterByLuid(LUID AdapterLuid, [NativeTypeName("const IID &")] Guid* riid, void** ppvAdapter); - - [VtblIndex(27)] - HRESULT EnumWarpAdapter([NativeTypeName("const IID &")] Guid* riid, void** ppvAdapter); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetParent; - - [NativeTypeName("HRESULT (UINT, IDXGIAdapter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumAdapters; - - [NativeTypeName("HRESULT (HWND, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] MakeWindowAssociation; - - [NativeTypeName("HRESULT (HWND *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetWindowAssociation; - - [NativeTypeName("HRESULT (IUnknown *, DXGI_SWAP_CHAIN_DESC *, IDXGISwapChain **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChain; - - [NativeTypeName("HRESULT (HMODULE, IDXGIAdapter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSoftwareAdapter; - - [NativeTypeName("HRESULT (UINT, IDXGIAdapter1 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumAdapters1; - - [NativeTypeName("BOOL () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsCurrent; - - [NativeTypeName("BOOL () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsWindowedStereoEnabled; - - [NativeTypeName("HRESULT (IUnknown *, HWND, const DXGI_SWAP_CHAIN_DESC1 *, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *, IDXGIOutput *, IDXGISwapChain1 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChainForHwnd; - - [NativeTypeName("HRESULT (IUnknown *, IUnknown *, const DXGI_SWAP_CHAIN_DESC1 *, IDXGIOutput *, IDXGISwapChain1 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChainForCoreWindow; - - [NativeTypeName("HRESULT (HANDLE, LUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSharedResourceAdapterLuid; - - [NativeTypeName("HRESULT (HWND, UINT, DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RegisterStereoStatusWindow; - - [NativeTypeName("HRESULT (HANDLE, DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RegisterStereoStatusEvent; - - [NativeTypeName("void (DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] UnregisterStereoStatus; - - [NativeTypeName("HRESULT (HWND, UINT, DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RegisterOcclusionStatusWindow; - - [NativeTypeName("HRESULT (HANDLE, DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RegisterOcclusionStatusEvent; - - [NativeTypeName("void (DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] UnregisterOcclusionStatus; - - [NativeTypeName("HRESULT (IUnknown *, const DXGI_SWAP_CHAIN_DESC1 *, IDXGIOutput *, IDXGISwapChain1 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChainForComposition; - - [NativeTypeName("UINT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetCreationFlags; - - [NativeTypeName("HRESULT (LUID, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumAdapterByLuid; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumWarpAdapter; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_4/IDXGISwapChain3.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_4/IDXGISwapChain3.cs new file mode 100644 index 00000000..358cbf3d --- /dev/null +++ b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_4/IDXGISwapChain3.cs @@ -0,0 +1,87 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from shared/dxgi1_4.h in the Windows SDK for Windows 10.0.20348.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; +using TerraFX.Interop.Windows; + +namespace TerraFX.Interop.DirectX +{ + [SupportedOSPlatform("windows10.0")] + [Guid("94D99BDB-F1F8-4AB0-B236-7DA0170EDAB1")] + [NativeTypeName("struct IDXGISwapChain3 : IDXGISwapChain2")] + [NativeInheritance("IDXGISwapChain2")] + internal unsafe partial struct IDXGISwapChain3 + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDXGISwapChain3*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDXGISwapChain3*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDXGISwapChain3*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HRESULT Present(uint SyncInterval, uint Flags) + { + return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDXGISwapChain3*)Unsafe.AsPointer(ref this), SyncInterval, Flags); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] + public HRESULT GetBuffer(uint Buffer, [NativeTypeName("const IID &")] Guid* riid, void** ppSurface) + { + return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDXGISwapChain3*)Unsafe.AsPointer(ref this), Buffer, riid, ppSurface); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(13)] + public HRESULT ResizeBuffers(uint BufferCount, uint Width, uint Height, DXGI_FORMAT NewFormat, uint SwapChainFlags) + { + return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDXGISwapChain3*)Unsafe.AsPointer(ref this), BufferCount, Width, Height, NewFormat, SwapChainFlags); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(33)] + public HANDLE GetFrameLatencyWaitableObject() + { + return ((HANDLE)(((delegate* unmanaged[Stdcall])(lpVtbl[33]))((IDXGISwapChain3*)Unsafe.AsPointer(ref this)))); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(34)] + public HRESULT SetMatrixTransform([NativeTypeName("const DXGI_MATRIX_3X2_F *")] DXGI_MATRIX_3X2_F* pMatrix) + { + return ((delegate* unmanaged[Stdcall])(lpVtbl[34]))((IDXGISwapChain3*)Unsafe.AsPointer(ref this), pMatrix); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(36)] + public uint GetCurrentBackBufferIndex() + { + return ((delegate* unmanaged[Stdcall])(lpVtbl[36]))((IDXGISwapChain3*)Unsafe.AsPointer(ref this)); + } + } +} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_5/IDXGIFactory5.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_5/IDXGIFactory5.cs deleted file mode 100644 index 072ddbde..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_5/IDXGIFactory5.cs +++ /dev/null @@ -1,321 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgi1_5.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("7632E1F5-EE65-4DCA-87FD-84CD75F8838D")] - [NativeTypeName("struct IDXGIFactory5 : IDXGIFactory4")] - [NativeInheritance("IDXGIFactory4")] - internal unsafe partial struct IDXGIFactory5 : IDXGIFactory5.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDXGIFactory5*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDXGIFactory5*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT SetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint DataSize, [NativeTypeName("const void *")] void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), Name, DataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT SetPrivateDataInterface([NativeTypeName("const GUID &")] Guid* Name, [NativeTypeName("const IUnknown *")] IUnknown* pUnknown) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), Name, pUnknown); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint* pDataSize, void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), Name, pDataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetParent([NativeTypeName("const IID &")] Guid* riid, void** ppParent) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), riid, ppParent); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT EnumAdapters(uint Adapter, IDXGIAdapter** ppAdapter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), Adapter, ppAdapter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT MakeWindowAssociation(HWND WindowHandle, uint Flags) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), WindowHandle, Flags); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT GetWindowAssociation(HWND* pWindowHandle) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), pWindowHandle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT CreateSwapChain(IUnknown* pDevice, DXGI_SWAP_CHAIN_DESC* pDesc, IDXGISwapChain** ppSwapChain) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), pDevice, pDesc, ppSwapChain); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CreateSoftwareAdapter(HMODULE Module, IDXGIAdapter** ppAdapter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), Module, ppAdapter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT EnumAdapters1(uint Adapter, IDXGIAdapter1** ppAdapter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), Adapter, ppAdapter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public BOOL IsCurrent() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDXGIFactory5*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public BOOL IsWindowedStereoEnabled() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IDXGIFactory5*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT CreateSwapChainForHwnd(IUnknown* pDevice, HWND hWnd, [NativeTypeName("const DXGI_SWAP_CHAIN_DESC1 *")] DXGI_SWAP_CHAIN_DESC1* pDesc, [NativeTypeName("const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *")] DXGI_SWAP_CHAIN_FULLSCREEN_DESC* pFullscreenDesc, IDXGIOutput* pRestrictToOutput, IDXGISwapChain1** ppSwapChain) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), pDevice, hWnd, pDesc, pFullscreenDesc, pRestrictToOutput, ppSwapChain); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT CreateSwapChainForCoreWindow(IUnknown* pDevice, IUnknown* pWindow, [NativeTypeName("const DXGI_SWAP_CHAIN_DESC1 *")] DXGI_SWAP_CHAIN_DESC1* pDesc, IDXGIOutput* pRestrictToOutput, IDXGISwapChain1** ppSwapChain) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), pDevice, pWindow, pDesc, pRestrictToOutput, ppSwapChain); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public HRESULT GetSharedResourceAdapterLuid(HANDLE hResource, LUID* pLuid) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), hResource, pLuid); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public HRESULT RegisterStereoStatusWindow(HWND WindowHandle, uint wMsg, [NativeTypeName("DWORD *")] uint* pdwCookie) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), WindowHandle, wMsg, pdwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(19)] - public HRESULT RegisterStereoStatusEvent(HANDLE hEvent, [NativeTypeName("DWORD *")] uint* pdwCookie) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), hEvent, pdwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(20)] - public void UnregisterStereoStatus([NativeTypeName("DWORD")] uint dwCookie) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), dwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(21)] - public HRESULT RegisterOcclusionStatusWindow(HWND WindowHandle, uint wMsg, [NativeTypeName("DWORD *")] uint* pdwCookie) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), WindowHandle, wMsg, pdwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(22)] - public HRESULT RegisterOcclusionStatusEvent(HANDLE hEvent, [NativeTypeName("DWORD *")] uint* pdwCookie) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), hEvent, pdwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(23)] - public void UnregisterOcclusionStatus([NativeTypeName("DWORD")] uint dwCookie) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[23]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), dwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(24)] - public HRESULT CreateSwapChainForComposition(IUnknown* pDevice, [NativeTypeName("const DXGI_SWAP_CHAIN_DESC1 *")] DXGI_SWAP_CHAIN_DESC1* pDesc, IDXGIOutput* pRestrictToOutput, IDXGISwapChain1** ppSwapChain) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[24]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), pDevice, pDesc, pRestrictToOutput, ppSwapChain); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(25)] - public uint GetCreationFlags() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[25]))((IDXGIFactory5*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(26)] - public HRESULT EnumAdapterByLuid(LUID AdapterLuid, [NativeTypeName("const IID &")] Guid* riid, void** ppvAdapter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[26]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), AdapterLuid, riid, ppvAdapter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(27)] - public HRESULT EnumWarpAdapter([NativeTypeName("const IID &")] Guid* riid, void** ppvAdapter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[27]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), riid, ppvAdapter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(28)] - public HRESULT CheckFeatureSupport(DXGI_FEATURE Feature, void* pFeatureSupportData, uint FeatureSupportDataSize) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize); - } - - public interface Interface : IDXGIFactory4.Interface - { - [VtblIndex(28)] - HRESULT CheckFeatureSupport(DXGI_FEATURE Feature, void* pFeatureSupportData, uint FeatureSupportDataSize); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetParent; - - [NativeTypeName("HRESULT (UINT, IDXGIAdapter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumAdapters; - - [NativeTypeName("HRESULT (HWND, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] MakeWindowAssociation; - - [NativeTypeName("HRESULT (HWND *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetWindowAssociation; - - [NativeTypeName("HRESULT (IUnknown *, DXGI_SWAP_CHAIN_DESC *, IDXGISwapChain **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChain; - - [NativeTypeName("HRESULT (HMODULE, IDXGIAdapter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSoftwareAdapter; - - [NativeTypeName("HRESULT (UINT, IDXGIAdapter1 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumAdapters1; - - [NativeTypeName("BOOL () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsCurrent; - - [NativeTypeName("BOOL () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsWindowedStereoEnabled; - - [NativeTypeName("HRESULT (IUnknown *, HWND, const DXGI_SWAP_CHAIN_DESC1 *, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *, IDXGIOutput *, IDXGISwapChain1 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChainForHwnd; - - [NativeTypeName("HRESULT (IUnknown *, IUnknown *, const DXGI_SWAP_CHAIN_DESC1 *, IDXGIOutput *, IDXGISwapChain1 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChainForCoreWindow; - - [NativeTypeName("HRESULT (HANDLE, LUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSharedResourceAdapterLuid; - - [NativeTypeName("HRESULT (HWND, UINT, DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RegisterStereoStatusWindow; - - [NativeTypeName("HRESULT (HANDLE, DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RegisterStereoStatusEvent; - - [NativeTypeName("void (DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] UnregisterStereoStatus; - - [NativeTypeName("HRESULT (HWND, UINT, DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RegisterOcclusionStatusWindow; - - [NativeTypeName("HRESULT (HANDLE, DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RegisterOcclusionStatusEvent; - - [NativeTypeName("void (DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] UnregisterOcclusionStatus; - - [NativeTypeName("HRESULT (IUnknown *, const DXGI_SWAP_CHAIN_DESC1 *, IDXGIOutput *, IDXGISwapChain1 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChainForComposition; - - [NativeTypeName("UINT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetCreationFlags; - - [NativeTypeName("HRESULT (LUID, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumAdapterByLuid; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumWarpAdapter; - - [NativeTypeName("HRESULT (DXGI_FEATURE, void *, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CheckFeatureSupport; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_6/IDXGIFactory6.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_6/IDXGIFactory6.cs index 5a8b9b66..50c34e5e 100644 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_6/IDXGIFactory6.cs +++ b/src/TerraFX.Interop.Windows/DirectX/shared/dxgi1_6/IDXGIFactory6.cs @@ -15,7 +15,7 @@ namespace TerraFX.Interop.DirectX [Guid("C1B6694F-FF09-44A9-B03C-77900A0A1D17")] [NativeTypeName("struct IDXGIFactory6 : IDXGIFactory5")] [NativeInheritance("IDXGIFactory5")] - internal unsafe partial struct IDXGIFactory6 : IDXGIFactory6.Interface + internal unsafe partial struct IDXGIFactory6 { public void** lpVtbl; @@ -42,153 +42,6 @@ namespace TerraFX.Interop.DirectX return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDXGIFactory6*)Unsafe.AsPointer(ref this)); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT SetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint DataSize, [NativeTypeName("const void *")] void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), Name, DataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT SetPrivateDataInterface([NativeTypeName("const GUID &")] Guid* Name, [NativeTypeName("const IUnknown *")] IUnknown* pUnknown) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), Name, pUnknown); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetPrivateData([NativeTypeName("const GUID &")] Guid* Name, uint* pDataSize, void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), Name, pDataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetParent([NativeTypeName("const IID &")] Guid* riid, void** ppParent) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), riid, ppParent); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT EnumAdapters(uint Adapter, IDXGIAdapter** ppAdapter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), Adapter, ppAdapter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT MakeWindowAssociation(HWND WindowHandle, uint Flags) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), WindowHandle, Flags); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT GetWindowAssociation(HWND* pWindowHandle) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), pWindowHandle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT CreateSwapChain(IUnknown* pDevice, DXGI_SWAP_CHAIN_DESC* pDesc, IDXGISwapChain** ppSwapChain) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), pDevice, pDesc, ppSwapChain); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CreateSoftwareAdapter(HMODULE Module, IDXGIAdapter** ppAdapter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), Module, ppAdapter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT EnumAdapters1(uint Adapter, IDXGIAdapter1** ppAdapter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), Adapter, ppAdapter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public BOOL IsCurrent() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDXGIFactory6*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public BOOL IsWindowedStereoEnabled() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IDXGIFactory6*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT CreateSwapChainForHwnd(IUnknown* pDevice, HWND hWnd, [NativeTypeName("const DXGI_SWAP_CHAIN_DESC1 *")] DXGI_SWAP_CHAIN_DESC1* pDesc, [NativeTypeName("const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *")] DXGI_SWAP_CHAIN_FULLSCREEN_DESC* pFullscreenDesc, IDXGIOutput* pRestrictToOutput, IDXGISwapChain1** ppSwapChain) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), pDevice, hWnd, pDesc, pFullscreenDesc, pRestrictToOutput, ppSwapChain); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT CreateSwapChainForCoreWindow(IUnknown* pDevice, IUnknown* pWindow, [NativeTypeName("const DXGI_SWAP_CHAIN_DESC1 *")] DXGI_SWAP_CHAIN_DESC1* pDesc, IDXGIOutput* pRestrictToOutput, IDXGISwapChain1** ppSwapChain) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), pDevice, pWindow, pDesc, pRestrictToOutput, ppSwapChain); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public HRESULT GetSharedResourceAdapterLuid(HANDLE hResource, LUID* pLuid) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), hResource, pLuid); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public HRESULT RegisterStereoStatusWindow(HWND WindowHandle, uint wMsg, [NativeTypeName("DWORD *")] uint* pdwCookie) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), WindowHandle, wMsg, pdwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(19)] - public HRESULT RegisterStereoStatusEvent(HANDLE hEvent, [NativeTypeName("DWORD *")] uint* pdwCookie) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), hEvent, pdwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(20)] - public void UnregisterStereoStatus([NativeTypeName("DWORD")] uint dwCookie) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), dwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(21)] - public HRESULT RegisterOcclusionStatusWindow(HWND WindowHandle, uint wMsg, [NativeTypeName("DWORD *")] uint* pdwCookie) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), WindowHandle, wMsg, pdwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(22)] - public HRESULT RegisterOcclusionStatusEvent(HANDLE hEvent, [NativeTypeName("DWORD *")] uint* pdwCookie) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), hEvent, pdwCookie); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(23)] - public void UnregisterOcclusionStatus([NativeTypeName("DWORD")] uint dwCookie) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[23]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), dwCookie); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(24)] public HRESULT CreateSwapChainForComposition(IUnknown* pDevice, [NativeTypeName("const DXGI_SWAP_CHAIN_DESC1 *")] DXGI_SWAP_CHAIN_DESC1* pDesc, IDXGIOutput* pRestrictToOutput, IDXGISwapChain1** ppSwapChain) @@ -196,20 +49,6 @@ namespace TerraFX.Interop.DirectX return ((delegate* unmanaged[Stdcall])(lpVtbl[24]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), pDevice, pDesc, pRestrictToOutput, ppSwapChain); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(25)] - public uint GetCreationFlags() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[25]))((IDXGIFactory6*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(26)] - public HRESULT EnumAdapterByLuid(LUID AdapterLuid, [NativeTypeName("const IID &")] Guid* riid, void** ppvAdapter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[26]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), AdapterLuid, riid, ppvAdapter); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(27)] public HRESULT EnumWarpAdapter([NativeTypeName("const IID &")] Guid* riid, void** ppvAdapter) @@ -217,117 +56,11 @@ namespace TerraFX.Interop.DirectX return ((delegate* unmanaged[Stdcall])(lpVtbl[27]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), riid, ppvAdapter); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(28)] - public HRESULT CheckFeatureSupport(DXGI_FEATURE Feature, void* pFeatureSupportData, uint FeatureSupportDataSize) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(29)] public HRESULT EnumAdapterByGpuPreference(uint Adapter, DXGI_GPU_PREFERENCE GpuPreference, [NativeTypeName("const IID &")] Guid* riid, void** ppvAdapter) { return ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), Adapter, GpuPreference, riid, ppvAdapter); } - - public interface Interface : IDXGIFactory5.Interface - { - [VtblIndex(29)] - HRESULT EnumAdapterByGpuPreference(uint Adapter, DXGI_GPU_PREFERENCE GpuPreference, [NativeTypeName("const IID &")] Guid* riid, void** ppvAdapter); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetParent; - - [NativeTypeName("HRESULT (UINT, IDXGIAdapter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumAdapters; - - [NativeTypeName("HRESULT (HWND, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] MakeWindowAssociation; - - [NativeTypeName("HRESULT (HWND *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetWindowAssociation; - - [NativeTypeName("HRESULT (IUnknown *, DXGI_SWAP_CHAIN_DESC *, IDXGISwapChain **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChain; - - [NativeTypeName("HRESULT (HMODULE, IDXGIAdapter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSoftwareAdapter; - - [NativeTypeName("HRESULT (UINT, IDXGIAdapter1 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumAdapters1; - - [NativeTypeName("BOOL () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsCurrent; - - [NativeTypeName("BOOL () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsWindowedStereoEnabled; - - [NativeTypeName("HRESULT (IUnknown *, HWND, const DXGI_SWAP_CHAIN_DESC1 *, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *, IDXGIOutput *, IDXGISwapChain1 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChainForHwnd; - - [NativeTypeName("HRESULT (IUnknown *, IUnknown *, const DXGI_SWAP_CHAIN_DESC1 *, IDXGIOutput *, IDXGISwapChain1 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChainForCoreWindow; - - [NativeTypeName("HRESULT (HANDLE, LUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSharedResourceAdapterLuid; - - [NativeTypeName("HRESULT (HWND, UINT, DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RegisterStereoStatusWindow; - - [NativeTypeName("HRESULT (HANDLE, DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RegisterStereoStatusEvent; - - [NativeTypeName("void (DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] UnregisterStereoStatus; - - [NativeTypeName("HRESULT (HWND, UINT, DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RegisterOcclusionStatusWindow; - - [NativeTypeName("HRESULT (HANDLE, DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RegisterOcclusionStatusEvent; - - [NativeTypeName("void (DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] UnregisterOcclusionStatus; - - [NativeTypeName("HRESULT (IUnknown *, const DXGI_SWAP_CHAIN_DESC1 *, IDXGIOutput *, IDXGISwapChain1 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSwapChainForComposition; - - [NativeTypeName("UINT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetCreationFlags; - - [NativeTypeName("HRESULT (LUID, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumAdapterByLuid; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumWarpAdapter; - - [NativeTypeName("HRESULT (DXGI_FEATURE, void *, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CheckFeatureSupport; - - [NativeTypeName("HRESULT (UINT, DXGI_GPU_PREFERENCE, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumAdapterByGpuPreference; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgicommon/DXGI_RATIONAL.Manual.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgicommon/DXGI_RATIONAL.Manual.cs deleted file mode 100644 index 7a8ef1eb..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgicommon/DXGI_RATIONAL.Manual.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dcommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DXGI_RATIONAL - { - public DXGI_RATIONAL(uint numerator, uint denominator) - { - Numerator = numerator; - Denominator = denominator; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgicommon/DXGI_RATIONAL.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgicommon/DXGI_RATIONAL.cs deleted file mode 100644 index 91d1dd1a..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgicommon/DXGI_RATIONAL.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgicommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DXGI_RATIONAL - { - public uint Numerator; - - public uint Denominator; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_GAMMA_CONTROL.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_GAMMA_CONTROL.cs deleted file mode 100644 index d37599da..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_GAMMA_CONTROL.cs +++ /dev/null @@ -1,1062 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgitype.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal; - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DXGI_GAMMA_CONTROL - { - public DXGI_RGB Scale; - - public DXGI_RGB Offset; - - [NativeTypeName("DXGI_RGB [1025]")] - public _GammaCurve_e__FixedBuffer GammaCurve; - - internal partial struct _GammaCurve_e__FixedBuffer - { - public DXGI_RGB e0; - public DXGI_RGB e1; - public DXGI_RGB e2; - public DXGI_RGB e3; - public DXGI_RGB e4; - public DXGI_RGB e5; - public DXGI_RGB e6; - public DXGI_RGB e7; - public DXGI_RGB e8; - public DXGI_RGB e9; - public DXGI_RGB e10; - public DXGI_RGB e11; - public DXGI_RGB e12; - public DXGI_RGB e13; - public DXGI_RGB e14; - public DXGI_RGB e15; - public DXGI_RGB e16; - public DXGI_RGB e17; - public DXGI_RGB e18; - public DXGI_RGB e19; - public DXGI_RGB e20; - public DXGI_RGB e21; - public DXGI_RGB e22; - public DXGI_RGB e23; - public DXGI_RGB e24; - public DXGI_RGB e25; - public DXGI_RGB e26; - public DXGI_RGB e27; - public DXGI_RGB e28; - public DXGI_RGB e29; - public DXGI_RGB e30; - public DXGI_RGB e31; - public DXGI_RGB e32; - public DXGI_RGB e33; - public DXGI_RGB e34; - public DXGI_RGB e35; - public DXGI_RGB e36; - public DXGI_RGB e37; - public DXGI_RGB e38; - public DXGI_RGB e39; - public DXGI_RGB e40; - public DXGI_RGB e41; - public DXGI_RGB e42; - public DXGI_RGB e43; - public DXGI_RGB e44; - public DXGI_RGB e45; - public DXGI_RGB e46; - public DXGI_RGB e47; - public DXGI_RGB e48; - public DXGI_RGB e49; - public DXGI_RGB e50; - public DXGI_RGB e51; - public DXGI_RGB e52; - public DXGI_RGB e53; - public DXGI_RGB e54; - public DXGI_RGB e55; - public DXGI_RGB e56; - public DXGI_RGB e57; - public DXGI_RGB e58; - public DXGI_RGB e59; - public DXGI_RGB e60; - public DXGI_RGB e61; - public DXGI_RGB e62; - public DXGI_RGB e63; - public DXGI_RGB e64; - public DXGI_RGB e65; - public DXGI_RGB e66; - public DXGI_RGB e67; - public DXGI_RGB e68; - public DXGI_RGB e69; - public DXGI_RGB e70; - public DXGI_RGB e71; - public DXGI_RGB e72; - public DXGI_RGB e73; - public DXGI_RGB e74; - public DXGI_RGB e75; - public DXGI_RGB e76; - public DXGI_RGB e77; - public DXGI_RGB e78; - public DXGI_RGB e79; - public DXGI_RGB e80; - public DXGI_RGB e81; - public DXGI_RGB e82; - public DXGI_RGB e83; - public DXGI_RGB e84; - public DXGI_RGB e85; - public DXGI_RGB e86; - public DXGI_RGB e87; - public DXGI_RGB e88; - public DXGI_RGB e89; - public DXGI_RGB e90; - public DXGI_RGB e91; - public DXGI_RGB e92; - public DXGI_RGB e93; - public DXGI_RGB e94; - public DXGI_RGB e95; - public DXGI_RGB e96; - public DXGI_RGB e97; - public DXGI_RGB e98; - public DXGI_RGB e99; - public DXGI_RGB e100; - public DXGI_RGB e101; - public DXGI_RGB e102; - public DXGI_RGB e103; - public DXGI_RGB e104; - public DXGI_RGB e105; - public DXGI_RGB e106; - public DXGI_RGB e107; - public DXGI_RGB e108; - public DXGI_RGB e109; - public DXGI_RGB e110; - public DXGI_RGB e111; - public DXGI_RGB e112; - public DXGI_RGB e113; - public DXGI_RGB e114; - public DXGI_RGB e115; - public DXGI_RGB e116; - public DXGI_RGB e117; - public DXGI_RGB e118; - public DXGI_RGB e119; - public DXGI_RGB e120; - public DXGI_RGB e121; - public DXGI_RGB e122; - public DXGI_RGB e123; - public DXGI_RGB e124; - public DXGI_RGB e125; - public DXGI_RGB e126; - public DXGI_RGB e127; - public DXGI_RGB e128; - public DXGI_RGB e129; - public DXGI_RGB e130; - public DXGI_RGB e131; - public DXGI_RGB e132; - public DXGI_RGB e133; - public DXGI_RGB e134; - public DXGI_RGB e135; - public DXGI_RGB e136; - public DXGI_RGB e137; - public DXGI_RGB e138; - public DXGI_RGB e139; - public DXGI_RGB e140; - public DXGI_RGB e141; - public DXGI_RGB e142; - public DXGI_RGB e143; - public DXGI_RGB e144; - public DXGI_RGB e145; - public DXGI_RGB e146; - public DXGI_RGB e147; - public DXGI_RGB e148; - public DXGI_RGB e149; - public DXGI_RGB e150; - public DXGI_RGB e151; - public DXGI_RGB e152; - public DXGI_RGB e153; - public DXGI_RGB e154; - public DXGI_RGB e155; - public DXGI_RGB e156; - public DXGI_RGB e157; - public DXGI_RGB e158; - public DXGI_RGB e159; - public DXGI_RGB e160; - public DXGI_RGB e161; - public DXGI_RGB e162; - public DXGI_RGB e163; - public DXGI_RGB e164; - public DXGI_RGB e165; - public DXGI_RGB e166; - public DXGI_RGB e167; - public DXGI_RGB e168; - public DXGI_RGB e169; - public DXGI_RGB e170; - public DXGI_RGB e171; - public DXGI_RGB e172; - public DXGI_RGB e173; - public DXGI_RGB e174; - public DXGI_RGB e175; - public DXGI_RGB e176; - public DXGI_RGB e177; - public DXGI_RGB e178; - public DXGI_RGB e179; - public DXGI_RGB e180; - public DXGI_RGB e181; - public DXGI_RGB e182; - public DXGI_RGB e183; - public DXGI_RGB e184; - public DXGI_RGB e185; - public DXGI_RGB e186; - public DXGI_RGB e187; - public DXGI_RGB e188; - public DXGI_RGB e189; - public DXGI_RGB e190; - public DXGI_RGB e191; - public DXGI_RGB e192; - public DXGI_RGB e193; - public DXGI_RGB e194; - public DXGI_RGB e195; - public DXGI_RGB e196; - public DXGI_RGB e197; - public DXGI_RGB e198; - public DXGI_RGB e199; - public DXGI_RGB e200; - public DXGI_RGB e201; - public DXGI_RGB e202; - public DXGI_RGB e203; - public DXGI_RGB e204; - public DXGI_RGB e205; - public DXGI_RGB e206; - public DXGI_RGB e207; - public DXGI_RGB e208; - public DXGI_RGB e209; - public DXGI_RGB e210; - public DXGI_RGB e211; - public DXGI_RGB e212; - public DXGI_RGB e213; - public DXGI_RGB e214; - public DXGI_RGB e215; - public DXGI_RGB e216; - public DXGI_RGB e217; - public DXGI_RGB e218; - public DXGI_RGB e219; - public DXGI_RGB e220; - public DXGI_RGB e221; - public DXGI_RGB e222; - public DXGI_RGB e223; - public DXGI_RGB e224; - public DXGI_RGB e225; - public DXGI_RGB e226; - public DXGI_RGB e227; - public DXGI_RGB e228; - public DXGI_RGB e229; - public DXGI_RGB e230; - public DXGI_RGB e231; - public DXGI_RGB e232; - public DXGI_RGB e233; - public DXGI_RGB e234; - public DXGI_RGB e235; - public DXGI_RGB e236; - public DXGI_RGB e237; - public DXGI_RGB e238; - public DXGI_RGB e239; - public DXGI_RGB e240; - public DXGI_RGB e241; - public DXGI_RGB e242; - public DXGI_RGB e243; - public DXGI_RGB e244; - public DXGI_RGB e245; - public DXGI_RGB e246; - public DXGI_RGB e247; - public DXGI_RGB e248; - public DXGI_RGB e249; - public DXGI_RGB e250; - public DXGI_RGB e251; - public DXGI_RGB e252; - public DXGI_RGB e253; - public DXGI_RGB e254; - public DXGI_RGB e255; - public DXGI_RGB e256; - public DXGI_RGB e257; - public DXGI_RGB e258; - public DXGI_RGB e259; - public DXGI_RGB e260; - public DXGI_RGB e261; - public DXGI_RGB e262; - public DXGI_RGB e263; - public DXGI_RGB e264; - public DXGI_RGB e265; - public DXGI_RGB e266; - public DXGI_RGB e267; - public DXGI_RGB e268; - public DXGI_RGB e269; - public DXGI_RGB e270; - public DXGI_RGB e271; - public DXGI_RGB e272; - public DXGI_RGB e273; - public DXGI_RGB e274; - public DXGI_RGB e275; - public DXGI_RGB e276; - public DXGI_RGB e277; - public DXGI_RGB e278; - public DXGI_RGB e279; - public DXGI_RGB e280; - public DXGI_RGB e281; - public DXGI_RGB e282; - public DXGI_RGB e283; - public DXGI_RGB e284; - public DXGI_RGB e285; - public DXGI_RGB e286; - public DXGI_RGB e287; - public DXGI_RGB e288; - public DXGI_RGB e289; - public DXGI_RGB e290; - public DXGI_RGB e291; - public DXGI_RGB e292; - public DXGI_RGB e293; - public DXGI_RGB e294; - public DXGI_RGB e295; - public DXGI_RGB e296; - public DXGI_RGB e297; - public DXGI_RGB e298; - public DXGI_RGB e299; - public DXGI_RGB e300; - public DXGI_RGB e301; - public DXGI_RGB e302; - public DXGI_RGB e303; - public DXGI_RGB e304; - public DXGI_RGB e305; - public DXGI_RGB e306; - public DXGI_RGB e307; - public DXGI_RGB e308; - public DXGI_RGB e309; - public DXGI_RGB e310; - public DXGI_RGB e311; - public DXGI_RGB e312; - public DXGI_RGB e313; - public DXGI_RGB e314; - public DXGI_RGB e315; - public DXGI_RGB e316; - public DXGI_RGB e317; - public DXGI_RGB e318; - public DXGI_RGB e319; - public DXGI_RGB e320; - public DXGI_RGB e321; - public DXGI_RGB e322; - public DXGI_RGB e323; - public DXGI_RGB e324; - public DXGI_RGB e325; - public DXGI_RGB e326; - public DXGI_RGB e327; - public DXGI_RGB e328; - public DXGI_RGB e329; - public DXGI_RGB e330; - public DXGI_RGB e331; - public DXGI_RGB e332; - public DXGI_RGB e333; - public DXGI_RGB e334; - public DXGI_RGB e335; - public DXGI_RGB e336; - public DXGI_RGB e337; - public DXGI_RGB e338; - public DXGI_RGB e339; - public DXGI_RGB e340; - public DXGI_RGB e341; - public DXGI_RGB e342; - public DXGI_RGB e343; - public DXGI_RGB e344; - public DXGI_RGB e345; - public DXGI_RGB e346; - public DXGI_RGB e347; - public DXGI_RGB e348; - public DXGI_RGB e349; - public DXGI_RGB e350; - public DXGI_RGB e351; - public DXGI_RGB e352; - public DXGI_RGB e353; - public DXGI_RGB e354; - public DXGI_RGB e355; - public DXGI_RGB e356; - public DXGI_RGB e357; - public DXGI_RGB e358; - public DXGI_RGB e359; - public DXGI_RGB e360; - public DXGI_RGB e361; - public DXGI_RGB e362; - public DXGI_RGB e363; - public DXGI_RGB e364; - public DXGI_RGB e365; - public DXGI_RGB e366; - public DXGI_RGB e367; - public DXGI_RGB e368; - public DXGI_RGB e369; - public DXGI_RGB e370; - public DXGI_RGB e371; - public DXGI_RGB e372; - public DXGI_RGB e373; - public DXGI_RGB e374; - public DXGI_RGB e375; - public DXGI_RGB e376; - public DXGI_RGB e377; - public DXGI_RGB e378; - public DXGI_RGB e379; - public DXGI_RGB e380; - public DXGI_RGB e381; - public DXGI_RGB e382; - public DXGI_RGB e383; - public DXGI_RGB e384; - public DXGI_RGB e385; - public DXGI_RGB e386; - public DXGI_RGB e387; - public DXGI_RGB e388; - public DXGI_RGB e389; - public DXGI_RGB e390; - public DXGI_RGB e391; - public DXGI_RGB e392; - public DXGI_RGB e393; - public DXGI_RGB e394; - public DXGI_RGB e395; - public DXGI_RGB e396; - public DXGI_RGB e397; - public DXGI_RGB e398; - public DXGI_RGB e399; - public DXGI_RGB e400; - public DXGI_RGB e401; - public DXGI_RGB e402; - public DXGI_RGB e403; - public DXGI_RGB e404; - public DXGI_RGB e405; - public DXGI_RGB e406; - public DXGI_RGB e407; - public DXGI_RGB e408; - public DXGI_RGB e409; - public DXGI_RGB e410; - public DXGI_RGB e411; - public DXGI_RGB e412; - public DXGI_RGB e413; - public DXGI_RGB e414; - public DXGI_RGB e415; - public DXGI_RGB e416; - public DXGI_RGB e417; - public DXGI_RGB e418; - public DXGI_RGB e419; - public DXGI_RGB e420; - public DXGI_RGB e421; - public DXGI_RGB e422; - public DXGI_RGB e423; - public DXGI_RGB e424; - public DXGI_RGB e425; - public DXGI_RGB e426; - public DXGI_RGB e427; - public DXGI_RGB e428; - public DXGI_RGB e429; - public DXGI_RGB e430; - public DXGI_RGB e431; - public DXGI_RGB e432; - public DXGI_RGB e433; - public DXGI_RGB e434; - public DXGI_RGB e435; - public DXGI_RGB e436; - public DXGI_RGB e437; - public DXGI_RGB e438; - public DXGI_RGB e439; - public DXGI_RGB e440; - public DXGI_RGB e441; - public DXGI_RGB e442; - public DXGI_RGB e443; - public DXGI_RGB e444; - public DXGI_RGB e445; - public DXGI_RGB e446; - public DXGI_RGB e447; - public DXGI_RGB e448; - public DXGI_RGB e449; - public DXGI_RGB e450; - public DXGI_RGB e451; - public DXGI_RGB e452; - public DXGI_RGB e453; - public DXGI_RGB e454; - public DXGI_RGB e455; - public DXGI_RGB e456; - public DXGI_RGB e457; - public DXGI_RGB e458; - public DXGI_RGB e459; - public DXGI_RGB e460; - public DXGI_RGB e461; - public DXGI_RGB e462; - public DXGI_RGB e463; - public DXGI_RGB e464; - public DXGI_RGB e465; - public DXGI_RGB e466; - public DXGI_RGB e467; - public DXGI_RGB e468; - public DXGI_RGB e469; - public DXGI_RGB e470; - public DXGI_RGB e471; - public DXGI_RGB e472; - public DXGI_RGB e473; - public DXGI_RGB e474; - public DXGI_RGB e475; - public DXGI_RGB e476; - public DXGI_RGB e477; - public DXGI_RGB e478; - public DXGI_RGB e479; - public DXGI_RGB e480; - public DXGI_RGB e481; - public DXGI_RGB e482; - public DXGI_RGB e483; - public DXGI_RGB e484; - public DXGI_RGB e485; - public DXGI_RGB e486; - public DXGI_RGB e487; - public DXGI_RGB e488; - public DXGI_RGB e489; - public DXGI_RGB e490; - public DXGI_RGB e491; - public DXGI_RGB e492; - public DXGI_RGB e493; - public DXGI_RGB e494; - public DXGI_RGB e495; - public DXGI_RGB e496; - public DXGI_RGB e497; - public DXGI_RGB e498; - public DXGI_RGB e499; - public DXGI_RGB e500; - public DXGI_RGB e501; - public DXGI_RGB e502; - public DXGI_RGB e503; - public DXGI_RGB e504; - public DXGI_RGB e505; - public DXGI_RGB e506; - public DXGI_RGB e507; - public DXGI_RGB e508; - public DXGI_RGB e509; - public DXGI_RGB e510; - public DXGI_RGB e511; - public DXGI_RGB e512; - public DXGI_RGB e513; - public DXGI_RGB e514; - public DXGI_RGB e515; - public DXGI_RGB e516; - public DXGI_RGB e517; - public DXGI_RGB e518; - public DXGI_RGB e519; - public DXGI_RGB e520; - public DXGI_RGB e521; - public DXGI_RGB e522; - public DXGI_RGB e523; - public DXGI_RGB e524; - public DXGI_RGB e525; - public DXGI_RGB e526; - public DXGI_RGB e527; - public DXGI_RGB e528; - public DXGI_RGB e529; - public DXGI_RGB e530; - public DXGI_RGB e531; - public DXGI_RGB e532; - public DXGI_RGB e533; - public DXGI_RGB e534; - public DXGI_RGB e535; - public DXGI_RGB e536; - public DXGI_RGB e537; - public DXGI_RGB e538; - public DXGI_RGB e539; - public DXGI_RGB e540; - public DXGI_RGB e541; - public DXGI_RGB e542; - public DXGI_RGB e543; - public DXGI_RGB e544; - public DXGI_RGB e545; - public DXGI_RGB e546; - public DXGI_RGB e547; - public DXGI_RGB e548; - public DXGI_RGB e549; - public DXGI_RGB e550; - public DXGI_RGB e551; - public DXGI_RGB e552; - public DXGI_RGB e553; - public DXGI_RGB e554; - public DXGI_RGB e555; - public DXGI_RGB e556; - public DXGI_RGB e557; - public DXGI_RGB e558; - public DXGI_RGB e559; - public DXGI_RGB e560; - public DXGI_RGB e561; - public DXGI_RGB e562; - public DXGI_RGB e563; - public DXGI_RGB e564; - public DXGI_RGB e565; - public DXGI_RGB e566; - public DXGI_RGB e567; - public DXGI_RGB e568; - public DXGI_RGB e569; - public DXGI_RGB e570; - public DXGI_RGB e571; - public DXGI_RGB e572; - public DXGI_RGB e573; - public DXGI_RGB e574; - public DXGI_RGB e575; - public DXGI_RGB e576; - public DXGI_RGB e577; - public DXGI_RGB e578; - public DXGI_RGB e579; - public DXGI_RGB e580; - public DXGI_RGB e581; - public DXGI_RGB e582; - public DXGI_RGB e583; - public DXGI_RGB e584; - public DXGI_RGB e585; - public DXGI_RGB e586; - public DXGI_RGB e587; - public DXGI_RGB e588; - public DXGI_RGB e589; - public DXGI_RGB e590; - public DXGI_RGB e591; - public DXGI_RGB e592; - public DXGI_RGB e593; - public DXGI_RGB e594; - public DXGI_RGB e595; - public DXGI_RGB e596; - public DXGI_RGB e597; - public DXGI_RGB e598; - public DXGI_RGB e599; - public DXGI_RGB e600; - public DXGI_RGB e601; - public DXGI_RGB e602; - public DXGI_RGB e603; - public DXGI_RGB e604; - public DXGI_RGB e605; - public DXGI_RGB e606; - public DXGI_RGB e607; - public DXGI_RGB e608; - public DXGI_RGB e609; - public DXGI_RGB e610; - public DXGI_RGB e611; - public DXGI_RGB e612; - public DXGI_RGB e613; - public DXGI_RGB e614; - public DXGI_RGB e615; - public DXGI_RGB e616; - public DXGI_RGB e617; - public DXGI_RGB e618; - public DXGI_RGB e619; - public DXGI_RGB e620; - public DXGI_RGB e621; - public DXGI_RGB e622; - public DXGI_RGB e623; - public DXGI_RGB e624; - public DXGI_RGB e625; - public DXGI_RGB e626; - public DXGI_RGB e627; - public DXGI_RGB e628; - public DXGI_RGB e629; - public DXGI_RGB e630; - public DXGI_RGB e631; - public DXGI_RGB e632; - public DXGI_RGB e633; - public DXGI_RGB e634; - public DXGI_RGB e635; - public DXGI_RGB e636; - public DXGI_RGB e637; - public DXGI_RGB e638; - public DXGI_RGB e639; - public DXGI_RGB e640; - public DXGI_RGB e641; - public DXGI_RGB e642; - public DXGI_RGB e643; - public DXGI_RGB e644; - public DXGI_RGB e645; - public DXGI_RGB e646; - public DXGI_RGB e647; - public DXGI_RGB e648; - public DXGI_RGB e649; - public DXGI_RGB e650; - public DXGI_RGB e651; - public DXGI_RGB e652; - public DXGI_RGB e653; - public DXGI_RGB e654; - public DXGI_RGB e655; - public DXGI_RGB e656; - public DXGI_RGB e657; - public DXGI_RGB e658; - public DXGI_RGB e659; - public DXGI_RGB e660; - public DXGI_RGB e661; - public DXGI_RGB e662; - public DXGI_RGB e663; - public DXGI_RGB e664; - public DXGI_RGB e665; - public DXGI_RGB e666; - public DXGI_RGB e667; - public DXGI_RGB e668; - public DXGI_RGB e669; - public DXGI_RGB e670; - public DXGI_RGB e671; - public DXGI_RGB e672; - public DXGI_RGB e673; - public DXGI_RGB e674; - public DXGI_RGB e675; - public DXGI_RGB e676; - public DXGI_RGB e677; - public DXGI_RGB e678; - public DXGI_RGB e679; - public DXGI_RGB e680; - public DXGI_RGB e681; - public DXGI_RGB e682; - public DXGI_RGB e683; - public DXGI_RGB e684; - public DXGI_RGB e685; - public DXGI_RGB e686; - public DXGI_RGB e687; - public DXGI_RGB e688; - public DXGI_RGB e689; - public DXGI_RGB e690; - public DXGI_RGB e691; - public DXGI_RGB e692; - public DXGI_RGB e693; - public DXGI_RGB e694; - public DXGI_RGB e695; - public DXGI_RGB e696; - public DXGI_RGB e697; - public DXGI_RGB e698; - public DXGI_RGB e699; - public DXGI_RGB e700; - public DXGI_RGB e701; - public DXGI_RGB e702; - public DXGI_RGB e703; - public DXGI_RGB e704; - public DXGI_RGB e705; - public DXGI_RGB e706; - public DXGI_RGB e707; - public DXGI_RGB e708; - public DXGI_RGB e709; - public DXGI_RGB e710; - public DXGI_RGB e711; - public DXGI_RGB e712; - public DXGI_RGB e713; - public DXGI_RGB e714; - public DXGI_RGB e715; - public DXGI_RGB e716; - public DXGI_RGB e717; - public DXGI_RGB e718; - public DXGI_RGB e719; - public DXGI_RGB e720; - public DXGI_RGB e721; - public DXGI_RGB e722; - public DXGI_RGB e723; - public DXGI_RGB e724; - public DXGI_RGB e725; - public DXGI_RGB e726; - public DXGI_RGB e727; - public DXGI_RGB e728; - public DXGI_RGB e729; - public DXGI_RGB e730; - public DXGI_RGB e731; - public DXGI_RGB e732; - public DXGI_RGB e733; - public DXGI_RGB e734; - public DXGI_RGB e735; - public DXGI_RGB e736; - public DXGI_RGB e737; - public DXGI_RGB e738; - public DXGI_RGB e739; - public DXGI_RGB e740; - public DXGI_RGB e741; - public DXGI_RGB e742; - public DXGI_RGB e743; - public DXGI_RGB e744; - public DXGI_RGB e745; - public DXGI_RGB e746; - public DXGI_RGB e747; - public DXGI_RGB e748; - public DXGI_RGB e749; - public DXGI_RGB e750; - public DXGI_RGB e751; - public DXGI_RGB e752; - public DXGI_RGB e753; - public DXGI_RGB e754; - public DXGI_RGB e755; - public DXGI_RGB e756; - public DXGI_RGB e757; - public DXGI_RGB e758; - public DXGI_RGB e759; - public DXGI_RGB e760; - public DXGI_RGB e761; - public DXGI_RGB e762; - public DXGI_RGB e763; - public DXGI_RGB e764; - public DXGI_RGB e765; - public DXGI_RGB e766; - public DXGI_RGB e767; - public DXGI_RGB e768; - public DXGI_RGB e769; - public DXGI_RGB e770; - public DXGI_RGB e771; - public DXGI_RGB e772; - public DXGI_RGB e773; - public DXGI_RGB e774; - public DXGI_RGB e775; - public DXGI_RGB e776; - public DXGI_RGB e777; - public DXGI_RGB e778; - public DXGI_RGB e779; - public DXGI_RGB e780; - public DXGI_RGB e781; - public DXGI_RGB e782; - public DXGI_RGB e783; - public DXGI_RGB e784; - public DXGI_RGB e785; - public DXGI_RGB e786; - public DXGI_RGB e787; - public DXGI_RGB e788; - public DXGI_RGB e789; - public DXGI_RGB e790; - public DXGI_RGB e791; - public DXGI_RGB e792; - public DXGI_RGB e793; - public DXGI_RGB e794; - public DXGI_RGB e795; - public DXGI_RGB e796; - public DXGI_RGB e797; - public DXGI_RGB e798; - public DXGI_RGB e799; - public DXGI_RGB e800; - public DXGI_RGB e801; - public DXGI_RGB e802; - public DXGI_RGB e803; - public DXGI_RGB e804; - public DXGI_RGB e805; - public DXGI_RGB e806; - public DXGI_RGB e807; - public DXGI_RGB e808; - public DXGI_RGB e809; - public DXGI_RGB e810; - public DXGI_RGB e811; - public DXGI_RGB e812; - public DXGI_RGB e813; - public DXGI_RGB e814; - public DXGI_RGB e815; - public DXGI_RGB e816; - public DXGI_RGB e817; - public DXGI_RGB e818; - public DXGI_RGB e819; - public DXGI_RGB e820; - public DXGI_RGB e821; - public DXGI_RGB e822; - public DXGI_RGB e823; - public DXGI_RGB e824; - public DXGI_RGB e825; - public DXGI_RGB e826; - public DXGI_RGB e827; - public DXGI_RGB e828; - public DXGI_RGB e829; - public DXGI_RGB e830; - public DXGI_RGB e831; - public DXGI_RGB e832; - public DXGI_RGB e833; - public DXGI_RGB e834; - public DXGI_RGB e835; - public DXGI_RGB e836; - public DXGI_RGB e837; - public DXGI_RGB e838; - public DXGI_RGB e839; - public DXGI_RGB e840; - public DXGI_RGB e841; - public DXGI_RGB e842; - public DXGI_RGB e843; - public DXGI_RGB e844; - public DXGI_RGB e845; - public DXGI_RGB e846; - public DXGI_RGB e847; - public DXGI_RGB e848; - public DXGI_RGB e849; - public DXGI_RGB e850; - public DXGI_RGB e851; - public DXGI_RGB e852; - public DXGI_RGB e853; - public DXGI_RGB e854; - public DXGI_RGB e855; - public DXGI_RGB e856; - public DXGI_RGB e857; - public DXGI_RGB e858; - public DXGI_RGB e859; - public DXGI_RGB e860; - public DXGI_RGB e861; - public DXGI_RGB e862; - public DXGI_RGB e863; - public DXGI_RGB e864; - public DXGI_RGB e865; - public DXGI_RGB e866; - public DXGI_RGB e867; - public DXGI_RGB e868; - public DXGI_RGB e869; - public DXGI_RGB e870; - public DXGI_RGB e871; - public DXGI_RGB e872; - public DXGI_RGB e873; - public DXGI_RGB e874; - public DXGI_RGB e875; - public DXGI_RGB e876; - public DXGI_RGB e877; - public DXGI_RGB e878; - public DXGI_RGB e879; - public DXGI_RGB e880; - public DXGI_RGB e881; - public DXGI_RGB e882; - public DXGI_RGB e883; - public DXGI_RGB e884; - public DXGI_RGB e885; - public DXGI_RGB e886; - public DXGI_RGB e887; - public DXGI_RGB e888; - public DXGI_RGB e889; - public DXGI_RGB e890; - public DXGI_RGB e891; - public DXGI_RGB e892; - public DXGI_RGB e893; - public DXGI_RGB e894; - public DXGI_RGB e895; - public DXGI_RGB e896; - public DXGI_RGB e897; - public DXGI_RGB e898; - public DXGI_RGB e899; - public DXGI_RGB e900; - public DXGI_RGB e901; - public DXGI_RGB e902; - public DXGI_RGB e903; - public DXGI_RGB e904; - public DXGI_RGB e905; - public DXGI_RGB e906; - public DXGI_RGB e907; - public DXGI_RGB e908; - public DXGI_RGB e909; - public DXGI_RGB e910; - public DXGI_RGB e911; - public DXGI_RGB e912; - public DXGI_RGB e913; - public DXGI_RGB e914; - public DXGI_RGB e915; - public DXGI_RGB e916; - public DXGI_RGB e917; - public DXGI_RGB e918; - public DXGI_RGB e919; - public DXGI_RGB e920; - public DXGI_RGB e921; - public DXGI_RGB e922; - public DXGI_RGB e923; - public DXGI_RGB e924; - public DXGI_RGB e925; - public DXGI_RGB e926; - public DXGI_RGB e927; - public DXGI_RGB e928; - public DXGI_RGB e929; - public DXGI_RGB e930; - public DXGI_RGB e931; - public DXGI_RGB e932; - public DXGI_RGB e933; - public DXGI_RGB e934; - public DXGI_RGB e935; - public DXGI_RGB e936; - public DXGI_RGB e937; - public DXGI_RGB e938; - public DXGI_RGB e939; - public DXGI_RGB e940; - public DXGI_RGB e941; - public DXGI_RGB e942; - public DXGI_RGB e943; - public DXGI_RGB e944; - public DXGI_RGB e945; - public DXGI_RGB e946; - public DXGI_RGB e947; - public DXGI_RGB e948; - public DXGI_RGB e949; - public DXGI_RGB e950; - public DXGI_RGB e951; - public DXGI_RGB e952; - public DXGI_RGB e953; - public DXGI_RGB e954; - public DXGI_RGB e955; - public DXGI_RGB e956; - public DXGI_RGB e957; - public DXGI_RGB e958; - public DXGI_RGB e959; - public DXGI_RGB e960; - public DXGI_RGB e961; - public DXGI_RGB e962; - public DXGI_RGB e963; - public DXGI_RGB e964; - public DXGI_RGB e965; - public DXGI_RGB e966; - public DXGI_RGB e967; - public DXGI_RGB e968; - public DXGI_RGB e969; - public DXGI_RGB e970; - public DXGI_RGB e971; - public DXGI_RGB e972; - public DXGI_RGB e973; - public DXGI_RGB e974; - public DXGI_RGB e975; - public DXGI_RGB e976; - public DXGI_RGB e977; - public DXGI_RGB e978; - public DXGI_RGB e979; - public DXGI_RGB e980; - public DXGI_RGB e981; - public DXGI_RGB e982; - public DXGI_RGB e983; - public DXGI_RGB e984; - public DXGI_RGB e985; - public DXGI_RGB e986; - public DXGI_RGB e987; - public DXGI_RGB e988; - public DXGI_RGB e989; - public DXGI_RGB e990; - public DXGI_RGB e991; - public DXGI_RGB e992; - public DXGI_RGB e993; - public DXGI_RGB e994; - public DXGI_RGB e995; - public DXGI_RGB e996; - public DXGI_RGB e997; - public DXGI_RGB e998; - public DXGI_RGB e999; - public DXGI_RGB e1000; - public DXGI_RGB e1001; - public DXGI_RGB e1002; - public DXGI_RGB e1003; - public DXGI_RGB e1004; - public DXGI_RGB e1005; - public DXGI_RGB e1006; - public DXGI_RGB e1007; - public DXGI_RGB e1008; - public DXGI_RGB e1009; - public DXGI_RGB e1010; - public DXGI_RGB e1011; - public DXGI_RGB e1012; - public DXGI_RGB e1013; - public DXGI_RGB e1014; - public DXGI_RGB e1015; - public DXGI_RGB e1016; - public DXGI_RGB e1017; - public DXGI_RGB e1018; - public DXGI_RGB e1019; - public DXGI_RGB e1020; - public DXGI_RGB e1021; - public DXGI_RGB e1022; - public DXGI_RGB e1023; - public DXGI_RGB e1024; - - public ref DXGI_RGB this[int index] - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref AsSpan()[index]; - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 1025); - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_GAMMA_CONTROL_CAPABILITIES.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_GAMMA_CONTROL_CAPABILITIES.cs deleted file mode 100644 index a064b7ad..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_GAMMA_CONTROL_CAPABILITIES.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgitype.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct DXGI_GAMMA_CONTROL_CAPABILITIES - { - public BOOL ScaleAndOffsetSupported; - - public float MaxConvertedValue; - - public float MinConvertedValue; - - public uint NumGammaControlPoints; - - [NativeTypeName("float [1025]")] - public fixed float ControlPointPositions[1025]; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_MODE_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_MODE_DESC.cs deleted file mode 100644 index 538bdb44..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_MODE_DESC.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgitype.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DXGI_MODE_DESC - { - public uint Width; - - public uint Height; - - public DXGI_RATIONAL RefreshRate; - - public DXGI_FORMAT Format; - - public DXGI_MODE_SCANLINE_ORDER ScanlineOrdering; - - public DXGI_MODE_SCALING Scaling; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_MODE_ROTATION.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_MODE_ROTATION.cs deleted file mode 100644 index 5686008f..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_MODE_ROTATION.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgitype.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum DXGI_MODE_ROTATION - { - DXGI_MODE_ROTATION_UNSPECIFIED = 0, - DXGI_MODE_ROTATION_IDENTITY = 1, - DXGI_MODE_ROTATION_ROTATE90 = 2, - DXGI_MODE_ROTATION_ROTATE180 = 3, - DXGI_MODE_ROTATION_ROTATE270 = 4, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_MODE_SCALING.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_MODE_SCALING.cs deleted file mode 100644 index 7af9d69e..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_MODE_SCALING.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgitype.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum DXGI_MODE_SCALING - { - DXGI_MODE_SCALING_UNSPECIFIED = 0, - DXGI_MODE_SCALING_CENTERED = 1, - DXGI_MODE_SCALING_STRETCHED = 2, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_MODE_SCANLINE_ORDER.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_MODE_SCANLINE_ORDER.cs deleted file mode 100644 index 55324e67..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_MODE_SCANLINE_ORDER.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgitype.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum DXGI_MODE_SCANLINE_ORDER - { - DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED = 0, - DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE = 1, - DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST = 2, - DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST = 3, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_RGB.Manual.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_RGB.Manual.cs deleted file mode 100644 index f4218d28..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_RGB.Manual.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgitype.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DXGI_RGB - { - public DXGI_RGB(float red, float green, float blue) - { - Red = red; - Green = green; - Blue = blue; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_RGB.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_RGB.cs deleted file mode 100644 index 5fedbda0..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_RGB.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgitype.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DXGI_RGB - { - public float Red; - - public float Green; - - public float Blue; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_RGBA.cs b/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_RGBA.cs deleted file mode 100644 index e6888f76..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/shared/dxgitype/DXGI_RGBA.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/dxgitype.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DXGI_RGBA - { - public float r; - - public float g; - - public float b; - - public float a; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_ANTIALIAS_MODE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_ANTIALIAS_MODE.cs deleted file mode 100644 index 566f61e4..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_ANTIALIAS_MODE.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_ANTIALIAS_MODE : uint - { - D2D1_ANTIALIAS_MODE_PER_PRIMITIVE = 0, - D2D1_ANTIALIAS_MODE_ALIASED = 1, - D2D1_ANTIALIAS_MODE_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_ARC_SEGMENT.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_ARC_SEGMENT.cs deleted file mode 100644 index 12904b13..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_ARC_SEGMENT.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D1_ARC_SEGMENT - { - [NativeTypeName("D2D1_POINT_2F")] - public D2D_POINT_2F point; - - [NativeTypeName("D2D1_SIZE_F")] - public D2D_SIZE_F size; - - public float rotationAngle; - - public D2D1_SWEEP_DIRECTION sweepDirection; - - public D2D1_ARC_SIZE arcSize; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_ARC_SIZE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_ARC_SIZE.cs deleted file mode 100644 index 3e30b600..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_ARC_SIZE.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_ARC_SIZE : uint - { - D2D1_ARC_SIZE_SMALL = 0, - D2D1_ARC_SIZE_LARGE = 1, - D2D1_ARC_SIZE_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_BEZIER_SEGMENT.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_BEZIER_SEGMENT.cs deleted file mode 100644 index 8cd39589..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_BEZIER_SEGMENT.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D1_BEZIER_SEGMENT - { - [NativeTypeName("D2D1_POINT_2F")] - public D2D_POINT_2F point1; - - [NativeTypeName("D2D1_POINT_2F")] - public D2D_POINT_2F point2; - - [NativeTypeName("D2D1_POINT_2F")] - public D2D_POINT_2F point3; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_BITMAP_BRUSH_PROPERTIES.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_BITMAP_BRUSH_PROPERTIES.cs deleted file mode 100644 index cadb2f55..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_BITMAP_BRUSH_PROPERTIES.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D1_BITMAP_BRUSH_PROPERTIES - { - public D2D1_EXTEND_MODE extendModeX; - - public D2D1_EXTEND_MODE extendModeY; - - public D2D1_BITMAP_INTERPOLATION_MODE interpolationMode; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_BITMAP_INTERPOLATION_MODE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_BITMAP_INTERPOLATION_MODE.cs deleted file mode 100644 index cd61934a..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_BITMAP_INTERPOLATION_MODE.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using static TerraFX.Interop.DirectX.D2D1_INTERPOLATION_MODE_DEFINITION; - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_BITMAP_INTERPOLATION_MODE : uint - { - D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR = D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR, - D2D1_BITMAP_INTERPOLATION_MODE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR, - D2D1_BITMAP_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_BITMAP_PROPERTIES.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_BITMAP_PROPERTIES.cs deleted file mode 100644 index bb5b48bc..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_BITMAP_PROPERTIES.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D1_BITMAP_PROPERTIES - { - public D2D1_PIXEL_FORMAT pixelFormat; - - public float dpiX; - - public float dpiY; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_BRUSH_PROPERTIES.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_BRUSH_PROPERTIES.cs deleted file mode 100644 index 4d1dc412..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_BRUSH_PROPERTIES.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D1_BRUSH_PROPERTIES - { - public float opacity; - - [NativeTypeName("D2D1_MATRIX_3X2_F")] - public D2D_MATRIX_3X2_F transform; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_CAP_STYLE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_CAP_STYLE.cs deleted file mode 100644 index 55df12c4..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_CAP_STYLE.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_CAP_STYLE : uint - { - D2D1_CAP_STYLE_FLAT = 0, - D2D1_CAP_STYLE_SQUARE = 1, - D2D1_CAP_STYLE_ROUND = 2, - D2D1_CAP_STYLE_TRIANGLE = 3, - D2D1_CAP_STYLE_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_COMBINE_MODE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_COMBINE_MODE.cs deleted file mode 100644 index 3bd6228a..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_COMBINE_MODE.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_COMBINE_MODE : uint - { - D2D1_COMBINE_MODE_UNION = 0, - D2D1_COMBINE_MODE_INTERSECT = 1, - D2D1_COMBINE_MODE_XOR = 2, - D2D1_COMBINE_MODE_EXCLUDE = 3, - D2D1_COMBINE_MODE_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS.cs deleted file mode 100644 index 7797432b..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.DirectX -{ - [Flags] - internal enum D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS : uint - { - D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE = 0x00000000, - D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_GDI_COMPATIBLE = 0x00000001, - D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_DASH_STYLE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_DASH_STYLE.cs deleted file mode 100644 index 6b72368a..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_DASH_STYLE.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_DASH_STYLE : uint - { - D2D1_DASH_STYLE_SOLID = 0, - D2D1_DASH_STYLE_DASH = 1, - D2D1_DASH_STYLE_DOT = 2, - D2D1_DASH_STYLE_DASH_DOT = 3, - D2D1_DASH_STYLE_DASH_DOT_DOT = 4, - D2D1_DASH_STYLE_CUSTOM = 5, - D2D1_DASH_STYLE_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_DRAWING_STATE_DESCRIPTION.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_DRAWING_STATE_DESCRIPTION.cs deleted file mode 100644 index 7cb9336a..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_DRAWING_STATE_DESCRIPTION.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D1_DRAWING_STATE_DESCRIPTION - { - public D2D1_ANTIALIAS_MODE antialiasMode; - - public D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode; - - [NativeTypeName("D2D1_TAG")] - public ulong tag1; - - [NativeTypeName("D2D1_TAG")] - public ulong tag2; - - [NativeTypeName("D2D1_MATRIX_3X2_F")] - public D2D_MATRIX_3X2_F transform; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_DRAW_TEXT_OPTIONS.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_DRAW_TEXT_OPTIONS.cs deleted file mode 100644 index 9b76d83b..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_DRAW_TEXT_OPTIONS.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.DirectX -{ - [Flags] - internal enum D2D1_DRAW_TEXT_OPTIONS : uint - { - D2D1_DRAW_TEXT_OPTIONS_NO_SNAP = 0x00000001, - D2D1_DRAW_TEXT_OPTIONS_CLIP = 0x00000002, - D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT = 0x00000004, - D2D1_DRAW_TEXT_OPTIONS_DISABLE_COLOR_BITMAP_SNAPPING = 0x00000008, - D2D1_DRAW_TEXT_OPTIONS_NONE = 0x00000000, - D2D1_DRAW_TEXT_OPTIONS_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_ELLIPSE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_ELLIPSE.cs deleted file mode 100644 index c2853d8e..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_ELLIPSE.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D1_ELLIPSE - { - [NativeTypeName("D2D1_POINT_2F")] - public D2D_POINT_2F point; - - public float radiusX; - - public float radiusY; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_EXTEND_MODE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_EXTEND_MODE.cs deleted file mode 100644 index 166975ee..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_EXTEND_MODE.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_EXTEND_MODE : uint - { - D2D1_EXTEND_MODE_CLAMP = 0, - D2D1_EXTEND_MODE_WRAP = 1, - D2D1_EXTEND_MODE_MIRROR = 2, - D2D1_EXTEND_MODE_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_FIGURE_BEGIN.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_FIGURE_BEGIN.cs deleted file mode 100644 index 185326c7..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_FIGURE_BEGIN.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_FIGURE_BEGIN : uint - { - D2D1_FIGURE_BEGIN_FILLED = 0, - D2D1_FIGURE_BEGIN_HOLLOW = 1, - D2D1_FIGURE_BEGIN_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_FIGURE_END.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_FIGURE_END.cs deleted file mode 100644 index 5374b225..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_FIGURE_END.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_FIGURE_END : uint - { - D2D1_FIGURE_END_OPEN = 0, - D2D1_FIGURE_END_CLOSED = 1, - D2D1_FIGURE_END_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_FILL_MODE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_FILL_MODE.cs deleted file mode 100644 index 47542b5e..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_FILL_MODE.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_FILL_MODE : uint - { - D2D1_FILL_MODE_ALTERNATE = 0, - D2D1_FILL_MODE_WINDING = 1, - D2D1_FILL_MODE_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_GAMMA.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_GAMMA.cs deleted file mode 100644 index d94cf09c..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_GAMMA.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_GAMMA : uint - { - D2D1_GAMMA_2_2 = 0, - D2D1_GAMMA_1_0 = 1, - D2D1_GAMMA_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_GEOMETRY_RELATION.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_GEOMETRY_RELATION.cs deleted file mode 100644 index 6047d188..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_GEOMETRY_RELATION.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_GEOMETRY_RELATION : uint - { - D2D1_GEOMETRY_RELATION_UNKNOWN = 0, - D2D1_GEOMETRY_RELATION_DISJOINT = 1, - D2D1_GEOMETRY_RELATION_IS_CONTAINED = 2, - D2D1_GEOMETRY_RELATION_CONTAINS = 3, - D2D1_GEOMETRY_RELATION_OVERLAP = 4, - D2D1_GEOMETRY_RELATION_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_GEOMETRY_SIMPLIFICATION_OPTION.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_GEOMETRY_SIMPLIFICATION_OPTION.cs deleted file mode 100644 index 3cfd4e29..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_GEOMETRY_SIMPLIFICATION_OPTION.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_GEOMETRY_SIMPLIFICATION_OPTION : uint - { - D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES = 0, - D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES = 1, - D2D1_GEOMETRY_SIMPLIFICATION_OPTION_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_GRADIENT_STOP.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_GRADIENT_STOP.cs deleted file mode 100644 index 9f764ecb..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_GRADIENT_STOP.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D1_GRADIENT_STOP - { - public float position; - - [NativeTypeName("D2D1_COLOR_F")] - public DXGI_RGBA color; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_HWND_RENDER_TARGET_PROPERTIES.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_HWND_RENDER_TARGET_PROPERTIES.cs deleted file mode 100644 index bfc62e9d..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_HWND_RENDER_TARGET_PROPERTIES.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D1_HWND_RENDER_TARGET_PROPERTIES - { - public HWND hwnd; - - [NativeTypeName("D2D1_SIZE_U")] - public D2D_SIZE_U pixelSize; - - public D2D1_PRESENT_OPTIONS presentOptions; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_INTERPOLATION_MODE_DEFINITION.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_INTERPOLATION_MODE_DEFINITION.cs deleted file mode 100644 index 3e872184..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_INTERPOLATION_MODE_DEFINITION.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_INTERPOLATION_MODE_DEFINITION - { - D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR = 0, - D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR = 1, - D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC = 2, - D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR = 3, - D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC = 4, - D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC = 5, - D2D1_INTERPOLATION_MODE_DEFINITION_FANT = 6, - D2D1_INTERPOLATION_MODE_DEFINITION_MIPMAP_LINEAR = 7, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_LAYER_OPTIONS.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_LAYER_OPTIONS.cs deleted file mode 100644 index 7a753875..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_LAYER_OPTIONS.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.DirectX -{ - [Flags] - internal enum D2D1_LAYER_OPTIONS : uint - { - D2D1_LAYER_OPTIONS_NONE = 0x00000000, - D2D1_LAYER_OPTIONS_INITIALIZE_FOR_CLEARTYPE = 0x00000001, - D2D1_LAYER_OPTIONS_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_LAYER_PARAMETERS.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_LAYER_PARAMETERS.cs deleted file mode 100644 index 51423fc5..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_LAYER_PARAMETERS.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D2D1_LAYER_PARAMETERS - { - [NativeTypeName("D2D1_RECT_F")] - public D2D_RECT_F contentBounds; - - public ID2D1Geometry* geometricMask; - - public D2D1_ANTIALIAS_MODE maskAntialiasMode; - - [NativeTypeName("D2D1_MATRIX_3X2_F")] - public D2D_MATRIX_3X2_F maskTransform; - - public float opacity; - - public ID2D1Brush* opacityBrush; - - public D2D1_LAYER_OPTIONS layerOptions; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES.cs deleted file mode 100644 index e079f17d..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES - { - [NativeTypeName("D2D1_POINT_2F")] - public D2D_POINT_2F startPoint; - - [NativeTypeName("D2D1_POINT_2F")] - public D2D_POINT_2F endPoint; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_LINE_JOIN.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_LINE_JOIN.cs deleted file mode 100644 index 4d795ddd..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_LINE_JOIN.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_LINE_JOIN : uint - { - D2D1_LINE_JOIN_MITER = 0, - D2D1_LINE_JOIN_BEVEL = 1, - D2D1_LINE_JOIN_ROUND = 2, - D2D1_LINE_JOIN_MITER_OR_BEVEL = 3, - D2D1_LINE_JOIN_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_OPACITY_MASK_CONTENT.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_OPACITY_MASK_CONTENT.cs deleted file mode 100644 index 08479434..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_OPACITY_MASK_CONTENT.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_OPACITY_MASK_CONTENT : uint - { - D2D1_OPACITY_MASK_CONTENT_GRAPHICS = 0, - D2D1_OPACITY_MASK_CONTENT_TEXT_NATURAL = 1, - D2D1_OPACITY_MASK_CONTENT_TEXT_GDI_COMPATIBLE = 2, - D2D1_OPACITY_MASK_CONTENT_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_PATH_SEGMENT.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_PATH_SEGMENT.cs deleted file mode 100644 index 40f36439..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_PATH_SEGMENT.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.DirectX -{ - [Flags] - internal enum D2D1_PATH_SEGMENT : uint - { - D2D1_PATH_SEGMENT_NONE = 0x00000000, - D2D1_PATH_SEGMENT_FORCE_UNSTROKED = 0x00000001, - D2D1_PATH_SEGMENT_FORCE_ROUND_LINE_JOIN = 0x00000002, - D2D1_PATH_SEGMENT_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_PRESENT_OPTIONS.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_PRESENT_OPTIONS.cs deleted file mode 100644 index 79ea752b..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_PRESENT_OPTIONS.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.DirectX -{ - [Flags] - internal enum D2D1_PRESENT_OPTIONS : uint - { - D2D1_PRESENT_OPTIONS_NONE = 0x00000000, - D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS = 0x00000001, - D2D1_PRESENT_OPTIONS_IMMEDIATELY = 0x00000002, - D2D1_PRESENT_OPTIONS_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_QUADRATIC_BEZIER_SEGMENT.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_QUADRATIC_BEZIER_SEGMENT.cs deleted file mode 100644 index d98337cd..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_QUADRATIC_BEZIER_SEGMENT.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D1_QUADRATIC_BEZIER_SEGMENT - { - [NativeTypeName("D2D1_POINT_2F")] - public D2D_POINT_2F point1; - - [NativeTypeName("D2D1_POINT_2F")] - public D2D_POINT_2F point2; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES.cs deleted file mode 100644 index 3be39dd3..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES - { - [NativeTypeName("D2D1_POINT_2F")] - public D2D_POINT_2F center; - - [NativeTypeName("D2D1_POINT_2F")] - public D2D_POINT_2F gradientOriginOffset; - - public float radiusX; - - public float radiusY; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_RENDER_TARGET_PROPERTIES.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_RENDER_TARGET_PROPERTIES.cs deleted file mode 100644 index b62b1053..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_RENDER_TARGET_PROPERTIES.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D1_RENDER_TARGET_PROPERTIES - { - public D2D1_RENDER_TARGET_TYPE type; - - public D2D1_PIXEL_FORMAT pixelFormat; - - public float dpiX; - - public float dpiY; - - public D2D1_RENDER_TARGET_USAGE usage; - - public D2D1_FEATURE_LEVEL minLevel; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_RENDER_TARGET_TYPE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_RENDER_TARGET_TYPE.cs deleted file mode 100644 index f4828c6f..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_RENDER_TARGET_TYPE.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_RENDER_TARGET_TYPE : uint - { - D2D1_RENDER_TARGET_TYPE_DEFAULT = 0, - D2D1_RENDER_TARGET_TYPE_SOFTWARE = 1, - D2D1_RENDER_TARGET_TYPE_HARDWARE = 2, - D2D1_RENDER_TARGET_TYPE_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_RENDER_TARGET_USAGE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_RENDER_TARGET_USAGE.cs deleted file mode 100644 index 2240702a..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_RENDER_TARGET_USAGE.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.DirectX -{ - [Flags] - internal enum D2D1_RENDER_TARGET_USAGE : uint - { - D2D1_RENDER_TARGET_USAGE_NONE = 0x00000000, - D2D1_RENDER_TARGET_USAGE_FORCE_BITMAP_REMOTING = 0x00000001, - D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE = 0x00000002, - D2D1_RENDER_TARGET_USAGE_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_ROUNDED_RECT.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_ROUNDED_RECT.cs deleted file mode 100644 index e19bff4a..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_ROUNDED_RECT.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D1_ROUNDED_RECT - { - [NativeTypeName("D2D1_RECT_F")] - public D2D_RECT_F rect; - - public float radiusX; - - public float radiusY; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_STROKE_STYLE_PROPERTIES.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_STROKE_STYLE_PROPERTIES.cs deleted file mode 100644 index 1f51ece4..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_STROKE_STYLE_PROPERTIES.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D1_STROKE_STYLE_PROPERTIES - { - public D2D1_CAP_STYLE startCap; - - public D2D1_CAP_STYLE endCap; - - public D2D1_CAP_STYLE dashCap; - - public D2D1_LINE_JOIN lineJoin; - - public float miterLimit; - - public D2D1_DASH_STYLE dashStyle; - - public float dashOffset; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_SWEEP_DIRECTION.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_SWEEP_DIRECTION.cs deleted file mode 100644 index 3eafbce5..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_SWEEP_DIRECTION.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_SWEEP_DIRECTION : uint - { - D2D1_SWEEP_DIRECTION_COUNTER_CLOCKWISE = 0, - D2D1_SWEEP_DIRECTION_CLOCKWISE = 1, - D2D1_SWEEP_DIRECTION_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_TEXT_ANTIALIAS_MODE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_TEXT_ANTIALIAS_MODE.cs deleted file mode 100644 index 96fc7718..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_TEXT_ANTIALIAS_MODE.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_TEXT_ANTIALIAS_MODE : uint - { - D2D1_TEXT_ANTIALIAS_MODE_DEFAULT = 0, - D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE = 1, - D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE = 2, - D2D1_TEXT_ANTIALIAS_MODE_ALIASED = 3, - D2D1_TEXT_ANTIALIAS_MODE_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_TRIANGLE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_TRIANGLE.cs deleted file mode 100644 index 2885e45f..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_TRIANGLE.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D1_TRIANGLE - { - [NativeTypeName("D2D1_POINT_2F")] - public D2D_POINT_2F point1; - - [NativeTypeName("D2D1_POINT_2F")] - public D2D_POINT_2F point2; - - [NativeTypeName("D2D1_POINT_2F")] - public D2D_POINT_2F point3; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_WINDOW_STATE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_WINDOW_STATE.cs deleted file mode 100644 index f8001434..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/D2D1_WINDOW_STATE.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.DirectX -{ - [Flags] - internal enum D2D1_WINDOW_STATE : uint - { - D2D1_WINDOW_STATE_NONE = 0x0000000, - D2D1_WINDOW_STATE_OCCLUDED = 0x0000001, - D2D1_WINDOW_STATE_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Bitmap.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Bitmap.cs deleted file mode 100644 index 3acb488c..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Bitmap.cs +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("A2296057-EA42-4099-983B-539FB6505426")] - [NativeTypeName("struct ID2D1Bitmap : ID2D1Image")] - [NativeInheritance("ID2D1Image")] - internal unsafe partial struct ID2D1Bitmap : ID2D1Bitmap.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1Bitmap*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1Bitmap*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1Bitmap*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1Bitmap*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - [return: NativeTypeName("D2D1_SIZE_F")] - public D2D_SIZE_F GetSize() - { - D2D_SIZE_F result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1Bitmap*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - [return: NativeTypeName("D2D1_SIZE_U")] - public D2D_SIZE_U GetPixelSize() - { - D2D_SIZE_U result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1Bitmap*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public D2D1_PIXEL_FORMAT GetPixelFormat() - { - D2D1_PIXEL_FORMAT result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1Bitmap*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public void GetDpi(float* dpiX, float* dpiY) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1Bitmap*)Unsafe.AsPointer(ref this), dpiX, dpiY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT CopyFromBitmap([NativeTypeName("const D2D1_POINT_2U *")] D2D_POINT_2U* destPoint, ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_RECT_U *")] D2D_RECT_U* srcRect) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1Bitmap*)Unsafe.AsPointer(ref this), destPoint, bitmap, srcRect); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT CopyFromRenderTarget([NativeTypeName("const D2D1_POINT_2U *")] D2D_POINT_2U* destPoint, ID2D1RenderTarget* renderTarget, [NativeTypeName("const D2D1_RECT_U *")] D2D_RECT_U* srcRect) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1Bitmap*)Unsafe.AsPointer(ref this), destPoint, renderTarget, srcRect); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT CopyFromMemory([NativeTypeName("const D2D1_RECT_U *")] D2D_RECT_U* dstRect, [NativeTypeName("const void *")] void* srcData, [NativeTypeName("UINT32")] uint pitch) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1Bitmap*)Unsafe.AsPointer(ref this), dstRect, srcData, pitch); - } - - public interface Interface : ID2D1Image.Interface - { - [VtblIndex(4)] - [return: NativeTypeName("D2D1_SIZE_F")] - D2D_SIZE_F GetSize(); - - [VtblIndex(5)] - [return: NativeTypeName("D2D1_SIZE_U")] - D2D_SIZE_U GetPixelSize(); - - [VtblIndex(6)] - D2D1_PIXEL_FORMAT GetPixelFormat(); - - [VtblIndex(7)] - void GetDpi(float* dpiX, float* dpiY); - - [VtblIndex(8)] - HRESULT CopyFromBitmap([NativeTypeName("const D2D1_POINT_2U *")] D2D_POINT_2U* destPoint, ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_RECT_U *")] D2D_RECT_U* srcRect); - - [VtblIndex(9)] - HRESULT CopyFromRenderTarget([NativeTypeName("const D2D1_POINT_2U *")] D2D_POINT_2U* destPoint, ID2D1RenderTarget* renderTarget, [NativeTypeName("const D2D1_RECT_U *")] D2D_RECT_U* srcRect); - - [VtblIndex(10)] - HRESULT CopyFromMemory([NativeTypeName("const D2D1_RECT_U *")] D2D_RECT_U* dstRect, [NativeTypeName("const void *")] void* srcData, [NativeTypeName("UINT32")] uint pitch); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("D2D1_SIZE_F () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSize; - - [NativeTypeName("D2D1_SIZE_U () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelSize; - - [NativeTypeName("D2D1_PIXEL_FORMAT () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelFormat; - - [NativeTypeName("void (FLOAT *, FLOAT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDpi; - - [NativeTypeName("HRESULT (const D2D1_POINT_2U *, ID2D1Bitmap *, const D2D1_RECT_U *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyFromBitmap; - - [NativeTypeName("HRESULT (const D2D1_POINT_2U *, ID2D1RenderTarget *, const D2D1_RECT_U *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyFromRenderTarget; - - [NativeTypeName("HRESULT (const D2D1_RECT_U *, const void *, UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyFromMemory; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1BitmapBrush.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1BitmapBrush.cs deleted file mode 100644 index 027f9293..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1BitmapBrush.cs +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD906AA-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1BitmapBrush : ID2D1Brush")] - [NativeInheritance("ID2D1Brush")] - internal unsafe partial struct ID2D1BitmapBrush : ID2D1BitmapBrush.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1BitmapBrush*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1BitmapBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1BitmapBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1BitmapBrush*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public void SetOpacity(float opacity) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1BitmapBrush*)Unsafe.AsPointer(ref this), opacity); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public void SetTransform([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1BitmapBrush*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public float GetOpacity() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1BitmapBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public void GetTransform([NativeTypeName("D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1BitmapBrush*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public void SetExtendModeX(D2D1_EXTEND_MODE extendModeX) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1BitmapBrush*)Unsafe.AsPointer(ref this), extendModeX); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public void SetExtendModeY(D2D1_EXTEND_MODE extendModeY) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1BitmapBrush*)Unsafe.AsPointer(ref this), extendModeY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public void SetInterpolationMode(D2D1_BITMAP_INTERPOLATION_MODE interpolationMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1BitmapBrush*)Unsafe.AsPointer(ref this), interpolationMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public void SetBitmap(ID2D1Bitmap* bitmap) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1BitmapBrush*)Unsafe.AsPointer(ref this), bitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public D2D1_EXTEND_MODE GetExtendModeX() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1BitmapBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public D2D1_EXTEND_MODE GetExtendModeY() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1BitmapBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public D2D1_BITMAP_INTERPOLATION_MODE GetInterpolationMode() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1BitmapBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public void GetBitmap(ID2D1Bitmap** bitmap) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1BitmapBrush*)Unsafe.AsPointer(ref this), bitmap); - } - - public interface Interface : ID2D1Brush.Interface - { - [VtblIndex(8)] - void SetExtendModeX(D2D1_EXTEND_MODE extendModeX); - - [VtblIndex(9)] - void SetExtendModeY(D2D1_EXTEND_MODE extendModeY); - - [VtblIndex(10)] - void SetInterpolationMode(D2D1_BITMAP_INTERPOLATION_MODE interpolationMode); - - [VtblIndex(11)] - void SetBitmap(ID2D1Bitmap* bitmap); - - [VtblIndex(12)] - D2D1_EXTEND_MODE GetExtendModeX(); - - [VtblIndex(13)] - D2D1_EXTEND_MODE GetExtendModeY(); - - [VtblIndex(14)] - D2D1_BITMAP_INTERPOLATION_MODE GetInterpolationMode(); - - [VtblIndex(15)] - void GetBitmap(ID2D1Bitmap** bitmap); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("void (FLOAT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetOpacity; - - [NativeTypeName("void (const D2D1_MATRIX_3X2_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTransform; - - [NativeTypeName("FLOAT () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetOpacity; - - [NativeTypeName("void (D2D1_MATRIX_3X2_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTransform; - - [NativeTypeName("void (D2D1_EXTEND_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetExtendModeX; - - [NativeTypeName("void (D2D1_EXTEND_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetExtendModeY; - - [NativeTypeName("void (D2D1_BITMAP_INTERPOLATION_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetInterpolationMode; - - [NativeTypeName("void (ID2D1Bitmap *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetBitmap; - - [NativeTypeName("D2D1_EXTEND_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetExtendModeX; - - [NativeTypeName("D2D1_EXTEND_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetExtendModeY; - - [NativeTypeName("D2D1_BITMAP_INTERPOLATION_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetInterpolationMode; - - [NativeTypeName("void (ID2D1Bitmap **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBitmap; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1BitmapRenderTarget.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1BitmapRenderTarget.cs deleted file mode 100644 index 23ab9641..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1BitmapRenderTarget.cs +++ /dev/null @@ -1,698 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; -using static TerraFX.Interop.DirectX.D2D1_BITMAP_INTERPOLATION_MODE; -using static TerraFX.Interop.DirectX.D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS; -using static TerraFX.Interop.DirectX.D2D1_DRAW_TEXT_OPTIONS; -using static TerraFX.Interop.DirectX.D2D1_EXTEND_MODE; -using static TerraFX.Interop.DirectX.D2D1_GAMMA; -using static TerraFX.Interop.DirectX.DWRITE_MEASURING_MODE; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD90695-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1BitmapRenderTarget : ID2D1RenderTarget")] - [NativeInheritance("ID2D1RenderTarget")] - internal unsafe partial struct ID2D1BitmapRenderTarget : ID2D1BitmapRenderTarget.Interface - { - public void** lpVtbl; - - public HRESULT CreateBitmap([NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U size, [NativeTypeName("const D2D1_BITMAP_PROPERTIES &")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap) - { - return CreateBitmap(size, null, 0, bitmapProperties, bitmap); - } - - public HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource* wicBitmapSource, ID2D1Bitmap** bitmap) - { - return CreateBitmapFromWicBitmap(wicBitmapSource, null, bitmap); - } - - public HRESULT CreateBitmapBrush(ID2D1Bitmap* bitmap, ID2D1BitmapBrush** bitmapBrush) - { - return CreateBitmapBrush(bitmap, null, null, bitmapBrush); - } - - public HRESULT CreateBitmapBrush(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_BITMAP_BRUSH_PROPERTIES &")] D2D1_BITMAP_BRUSH_PROPERTIES* bitmapBrushProperties, ID2D1BitmapBrush** bitmapBrush) - { - return CreateBitmapBrush(bitmap, bitmapBrushProperties, null, bitmapBrush); - } - - public HRESULT CreateSolidColorBrush([NativeTypeName("const D2D1_COLOR_F &")] DXGI_RGBA* color, ID2D1SolidColorBrush** solidColorBrush) - { - return CreateSolidColorBrush(color, null, solidColorBrush); - } - - public HRESULT CreateGradientStopCollection([NativeTypeName("const D2D1_GRADIENT_STOP *")] D2D1_GRADIENT_STOP* gradientStops, [NativeTypeName("UINT32")] uint gradientStopsCount, ID2D1GradientStopCollection** gradientStopCollection) - { - return CreateGradientStopCollection(gradientStops, gradientStopsCount, D2D1_GAMMA_2_2, D2D1_EXTEND_MODE_CLAMP, gradientStopCollection); - } - - public HRESULT CreateLinearGradientBrush([NativeTypeName("const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES &")] D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES* linearGradientBrushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1LinearGradientBrush** linearGradientBrush) - { - return CreateLinearGradientBrush(linearGradientBrushProperties, null, gradientStopCollection, linearGradientBrush); - } - - public HRESULT CreateRadialGradientBrush([NativeTypeName("const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES &")] D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES* radialGradientBrushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1RadialGradientBrush** radialGradientBrush) - { - return CreateRadialGradientBrush(radialGradientBrushProperties, null, gradientStopCollection, radialGradientBrush); - } - - public HRESULT CreateCompatibleRenderTarget(ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(null, null, null, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); - } - - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F desiredSize, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(&desiredSize, null, null, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); - } - - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F desiredSize, [NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U desiredPixelSize, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, null, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); - } - - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F desiredSize, [NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U desiredPixelSize, D2D1_PIXEL_FORMAT desiredFormat, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, &desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); - } - - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F desiredSize, [NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U desiredPixelSize, D2D1_PIXEL_FORMAT desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, &desiredFormat, options, bitmapRenderTarget); - } - - public HRESULT CreateLayer([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F size, ID2D1Layer** layer) - { - return CreateLayer(&size, layer); - } - - public HRESULT CreateLayer(ID2D1Layer** layer) - { - return CreateLayer(null, layer); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT CreateBitmap([NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U size, [NativeTypeName("const void *")] void* srcData, [NativeTypeName("UINT32")] uint pitch, [NativeTypeName("const D2D1_BITMAP_PROPERTIES *")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource* wicBitmapSource, [NativeTypeName("const D2D1_BITMAP_PROPERTIES *")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), wicBitmapSource, bitmapProperties, bitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT CreateSharedBitmap([NativeTypeName("const IID &")] Guid* riid, void* data, [NativeTypeName("const D2D1_BITMAP_PROPERTIES *")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), riid, data, bitmapProperties, bitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT CreateBitmapBrush(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_BITMAP_BRUSH_PROPERTIES *")] D2D1_BITMAP_BRUSH_PROPERTIES* bitmapBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1BitmapBrush** bitmapBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), bitmap, bitmapBrushProperties, brushProperties, bitmapBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT CreateSolidColorBrush([NativeTypeName("const D2D1_COLOR_F *")] DXGI_RGBA* color, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1SolidColorBrush** solidColorBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), color, brushProperties, solidColorBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT CreateGradientStopCollection([NativeTypeName("const D2D1_GRADIENT_STOP *")] D2D1_GRADIENT_STOP* gradientStops, [NativeTypeName("UINT32")] uint gradientStopsCount, D2D1_GAMMA colorInterpolationGamma, D2D1_EXTEND_MODE extendMode, ID2D1GradientStopCollection** gradientStopCollection) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), gradientStops, gradientStopsCount, colorInterpolationGamma, extendMode, gradientStopCollection); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT CreateLinearGradientBrush([NativeTypeName("const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *")] D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES* linearGradientBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1LinearGradientBrush** linearGradientBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), linearGradientBrushProperties, brushProperties, gradientStopCollection, linearGradientBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CreateRadialGradientBrush([NativeTypeName("const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *")] D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES* radialGradientBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1RadialGradientBrush** radialGradientBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), radialGradientBrushProperties, brushProperties, gradientStopCollection, radialGradientBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("const D2D1_SIZE_F *")] D2D_SIZE_F* desiredSize, [NativeTypeName("const D2D1_SIZE_U *")] D2D_SIZE_U* desiredPixelSize, [NativeTypeName("const D2D1_PIXEL_FORMAT *")] D2D1_PIXEL_FORMAT* desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT CreateLayer([NativeTypeName("const D2D1_SIZE_F *")] D2D_SIZE_F* size, ID2D1Layer** layer) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), size, layer); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT CreateMesh(ID2D1Mesh** mesh) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), mesh); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public void DrawLine([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point0, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point1, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public void DrawRectangle([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* rect, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), rect, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public void FillRectangle([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* rect, ID2D1Brush* brush) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), rect, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public void DrawRoundedRectangle([NativeTypeName("const D2D1_ROUNDED_RECT *")] D2D1_ROUNDED_RECT* roundedRect, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), roundedRect, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(19)] - public void FillRoundedRectangle([NativeTypeName("const D2D1_ROUNDED_RECT *")] D2D1_ROUNDED_RECT* roundedRect, ID2D1Brush* brush) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), roundedRect, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(20)] - public void DrawEllipse([NativeTypeName("const D2D1_ELLIPSE *")] D2D1_ELLIPSE* ellipse, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), ellipse, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(21)] - public void FillEllipse([NativeTypeName("const D2D1_ELLIPSE *")] D2D1_ELLIPSE* ellipse, ID2D1Brush* brush) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), ellipse, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(22)] - public void DrawGeometry(ID2D1Geometry* geometry, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), geometry, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(23)] - public void FillGeometry(ID2D1Geometry* geometry, ID2D1Brush* brush, ID2D1Brush* opacityBrush = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[23]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), geometry, brush, opacityBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(24)] - public void FillMesh(ID2D1Mesh* mesh, ID2D1Brush* brush) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[24]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), mesh, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(25)] - public void FillOpacityMask(ID2D1Bitmap* opacityMask, ID2D1Brush* brush, D2D1_OPACITY_MASK_CONTENT content, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* destinationRectangle = null, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[25]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), opacityMask, brush, content, destinationRectangle, sourceRectangle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(26)] - public void DrawBitmap(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* destinationRectangle = null, float opacity = 1.0f, D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[26]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(27)] - public void DrawText([NativeTypeName("const WCHAR *")] ushort* @string, [NativeTypeName("UINT32")] uint stringLength, IDWriteTextFormat* textFormat, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* layoutRect, ID2D1Brush* defaultFillBrush, D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[27]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), @string, stringLength, textFormat, layoutRect, defaultFillBrush, options, measuringMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(28)] - public void DrawTextLayout([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F origin, IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(29)] - public void DrawGlyphRun([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F baselineOrigin, [NativeTypeName("const DWRITE_GLYPH_RUN *")] DWRITE_GLYPH_RUN* glyphRun, ID2D1Brush* foregroundBrush, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(30)] - public void SetTransform([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[30]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(31)] - public void GetTransform([NativeTypeName("D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[31]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(32)] - public void SetAntialiasMode(D2D1_ANTIALIAS_MODE antialiasMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[32]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), antialiasMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(33)] - public D2D1_ANTIALIAS_MODE GetAntialiasMode() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[33]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(34)] - public void SetTextAntialiasMode(D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[34]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), textAntialiasMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(35)] - public D2D1_TEXT_ANTIALIAS_MODE GetTextAntialiasMode() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[35]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(36)] - public void SetTextRenderingParams(IDWriteRenderingParams* textRenderingParams = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[36]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), textRenderingParams); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(37)] - public void GetTextRenderingParams(IDWriteRenderingParams** textRenderingParams) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[37]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), textRenderingParams); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(38)] - public void SetTags([NativeTypeName("D2D1_TAG")] ulong tag1, [NativeTypeName("D2D1_TAG")] ulong tag2) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[38]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(39)] - public void GetTags([NativeTypeName("D2D1_TAG *")] ulong* tag1 = null, [NativeTypeName("D2D1_TAG *")] ulong* tag2 = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[39]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(40)] - public void PushLayer([NativeTypeName("const D2D1_LAYER_PARAMETERS *")] D2D1_LAYER_PARAMETERS* layerParameters, ID2D1Layer* layer) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[40]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), layerParameters, layer); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(41)] - public void PopLayer() - { - ((delegate* unmanaged[Stdcall])(lpVtbl[41]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(42)] - public HRESULT Flush([NativeTypeName("D2D1_TAG *")] ulong* tag1 = null, [NativeTypeName("D2D1_TAG *")] ulong* tag2 = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[42]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(43)] - public void SaveDrawingState(ID2D1DrawingStateBlock* drawingStateBlock) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), drawingStateBlock); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(44)] - public void RestoreDrawingState(ID2D1DrawingStateBlock* drawingStateBlock) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[44]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), drawingStateBlock); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(45)] - public void PushAxisAlignedClip([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* clipRect, D2D1_ANTIALIAS_MODE antialiasMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[45]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), clipRect, antialiasMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(46)] - public void PopAxisAlignedClip() - { - ((delegate* unmanaged[Stdcall])(lpVtbl[46]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(47)] - public void Clear([NativeTypeName("const D2D1_COLOR_F *")] DXGI_RGBA* clearColor = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[47]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), clearColor); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(48)] - public void BeginDraw() - { - ((delegate* unmanaged[Stdcall])(lpVtbl[48]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(49)] - public HRESULT EndDraw([NativeTypeName("D2D1_TAG *")] ulong* tag1 = null, [NativeTypeName("D2D1_TAG *")] ulong* tag2 = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[49]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(50)] - public D2D1_PIXEL_FORMAT GetPixelFormat() - { - D2D1_PIXEL_FORMAT result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[50]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(51)] - public void SetDpi(float dpiX, float dpiY) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[51]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), dpiX, dpiY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(52)] - public void GetDpi(float* dpiX, float* dpiY) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[52]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), dpiX, dpiY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(53)] - [return: NativeTypeName("D2D1_SIZE_F")] - public D2D_SIZE_F GetSize() - { - D2D_SIZE_F result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(54)] - [return: NativeTypeName("D2D1_SIZE_U")] - public D2D_SIZE_U GetPixelSize() - { - D2D_SIZE_U result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(55)] - [return: NativeTypeName("UINT32")] - public uint GetMaximumBitmapSize() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[55]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(56)] - public BOOL IsSupported([NativeTypeName("const D2D1_RENDER_TARGET_PROPERTIES *")] D2D1_RENDER_TARGET_PROPERTIES* renderTargetProperties) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[56]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), renderTargetProperties); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(57)] - public HRESULT GetBitmap(ID2D1Bitmap** bitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[57]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), bitmap); - } - - public interface Interface : ID2D1RenderTarget.Interface - { - [VtblIndex(57)] - HRESULT GetBitmap(ID2D1Bitmap** bitmap); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("HRESULT (D2D1_SIZE_U, const void *, UINT32, const D2D1_BITMAP_PROPERTIES *, ID2D1Bitmap **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmap1; - - [NativeTypeName("HRESULT (IWICBitmapSource *, const D2D1_BITMAP_PROPERTIES *, ID2D1Bitmap **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapFromWicBitmap1; - - [NativeTypeName("HRESULT (const IID &, void *, const D2D1_BITMAP_PROPERTIES *, ID2D1Bitmap **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSharedBitmap; - - [NativeTypeName("HRESULT (ID2D1Bitmap *, const D2D1_BITMAP_BRUSH_PROPERTIES *, const D2D1_BRUSH_PROPERTIES *, ID2D1BitmapBrush **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapBrush2; - - [NativeTypeName("HRESULT (const D2D1_COLOR_F *, const D2D1_BRUSH_PROPERTIES *, ID2D1SolidColorBrush **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSolidColorBrush1; - - [NativeTypeName("HRESULT (const D2D1_GRADIENT_STOP *, UINT32, D2D1_GAMMA, D2D1_EXTEND_MODE, ID2D1GradientStopCollection **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateGradientStopCollection1; - - [NativeTypeName("HRESULT (const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *, const D2D1_BRUSH_PROPERTIES *, ID2D1GradientStopCollection *, ID2D1LinearGradientBrush **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateLinearGradientBrush1; - - [NativeTypeName("HRESULT (const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *, const D2D1_BRUSH_PROPERTIES *, ID2D1GradientStopCollection *, ID2D1RadialGradientBrush **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateRadialGradientBrush1; - - [NativeTypeName("HRESULT (const D2D1_SIZE_F *, const D2D1_SIZE_U *, const D2D1_PIXEL_FORMAT *, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS, ID2D1BitmapRenderTarget **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateCompatibleRenderTarget5; - - [NativeTypeName("HRESULT (const D2D1_SIZE_F *, ID2D1Layer **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateLayer2; - - [NativeTypeName("HRESULT (ID2D1Mesh **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateMesh; - - [NativeTypeName("void (D2D1_POINT_2F, D2D1_POINT_2F, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawLine; - - [NativeTypeName("void (const D2D1_RECT_F *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawRectangle; - - [NativeTypeName("void (const D2D1_RECT_F *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillRectangle; - - [NativeTypeName("void (const D2D1_ROUNDED_RECT *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawRoundedRectangle; - - [NativeTypeName("void (const D2D1_ROUNDED_RECT *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillRoundedRectangle; - - [NativeTypeName("void (const D2D1_ELLIPSE *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawEllipse; - - [NativeTypeName("void (const D2D1_ELLIPSE *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillEllipse; - - [NativeTypeName("void (ID2D1Geometry *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawGeometry; - - [NativeTypeName("void (ID2D1Geometry *, ID2D1Brush *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillGeometry; - - [NativeTypeName("void (ID2D1Mesh *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillMesh; - - [NativeTypeName("void (ID2D1Bitmap *, ID2D1Brush *, D2D1_OPACITY_MASK_CONTENT, const D2D1_RECT_F *, const D2D1_RECT_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillOpacityMask; - - [NativeTypeName("void (ID2D1Bitmap *, const D2D1_RECT_F *, FLOAT, D2D1_BITMAP_INTERPOLATION_MODE, const D2D1_RECT_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawBitmap; - - [NativeTypeName("void (const WCHAR *, UINT32, IDWriteTextFormat *, const D2D1_RECT_F *, ID2D1Brush *, D2D1_DRAW_TEXT_OPTIONS, DWRITE_MEASURING_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawText; - - [NativeTypeName("void (D2D1_POINT_2F, IDWriteTextLayout *, ID2D1Brush *, D2D1_DRAW_TEXT_OPTIONS) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawTextLayout; - - [NativeTypeName("void (D2D1_POINT_2F, const DWRITE_GLYPH_RUN *, ID2D1Brush *, DWRITE_MEASURING_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawGlyphRun; - - [NativeTypeName("void (const D2D1_MATRIX_3X2_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTransform; - - [NativeTypeName("void (D2D1_MATRIX_3X2_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTransform; - - [NativeTypeName("void (D2D1_ANTIALIAS_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetAntialiasMode; - - [NativeTypeName("D2D1_ANTIALIAS_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetAntialiasMode; - - [NativeTypeName("void (D2D1_TEXT_ANTIALIAS_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTextAntialiasMode; - - [NativeTypeName("D2D1_TEXT_ANTIALIAS_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTextAntialiasMode; - - [NativeTypeName("void (IDWriteRenderingParams *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTextRenderingParams; - - [NativeTypeName("void (IDWriteRenderingParams **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTextRenderingParams; - - [NativeTypeName("void (D2D1_TAG, D2D1_TAG) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTags; - - [NativeTypeName("void (D2D1_TAG *, D2D1_TAG *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTags; - - [NativeTypeName("void (const D2D1_LAYER_PARAMETERS *, ID2D1Layer *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PushLayer; - - [NativeTypeName("void () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PopLayer; - - [NativeTypeName("HRESULT (D2D1_TAG *, D2D1_TAG *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Flush; - - [NativeTypeName("void (ID2D1DrawingStateBlock *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SaveDrawingState; - - [NativeTypeName("void (ID2D1DrawingStateBlock *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RestoreDrawingState; - - [NativeTypeName("void (const D2D1_RECT_F *, D2D1_ANTIALIAS_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PushAxisAlignedClip; - - [NativeTypeName("void () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PopAxisAlignedClip; - - [NativeTypeName("void (const D2D1_COLOR_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Clear; - - [NativeTypeName("void () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] BeginDraw; - - [NativeTypeName("HRESULT (D2D1_TAG *, D2D1_TAG *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EndDraw; - - [NativeTypeName("D2D1_PIXEL_FORMAT () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelFormat; - - [NativeTypeName("void (FLOAT, FLOAT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetDpi; - - [NativeTypeName("void (FLOAT *, FLOAT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDpi; - - [NativeTypeName("D2D1_SIZE_F () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSize; - - [NativeTypeName("D2D1_SIZE_U () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelSize; - - [NativeTypeName("UINT32 () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMaximumBitmapSize; - - [NativeTypeName("BOOL (const D2D1_RENDER_TARGET_PROPERTIES *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsSupported; - - [NativeTypeName("HRESULT (ID2D1Bitmap **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBitmap; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Brush.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Brush.cs deleted file mode 100644 index 4b768469..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Brush.cs +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD906A8-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1Brush : ID2D1Resource")] - [NativeInheritance("ID2D1Resource")] - internal unsafe partial struct ID2D1Brush : ID2D1Brush.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1Brush*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1Brush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1Brush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1Brush*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public void SetOpacity(float opacity) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1Brush*)Unsafe.AsPointer(ref this), opacity); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public void SetTransform([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1Brush*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public float GetOpacity() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1Brush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public void GetTransform([NativeTypeName("D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1Brush*)Unsafe.AsPointer(ref this), transform); - } - - public interface Interface : ID2D1Resource.Interface - { - [VtblIndex(4)] - void SetOpacity(float opacity); - - [VtblIndex(5)] - void SetTransform([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform); - - [VtblIndex(6)] - float GetOpacity(); - - [VtblIndex(7)] - void GetTransform([NativeTypeName("D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("void (FLOAT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetOpacity; - - [NativeTypeName("void (const D2D1_MATRIX_3X2_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTransform; - - [NativeTypeName("FLOAT () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetOpacity; - - [NativeTypeName("void (D2D1_MATRIX_3X2_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTransform; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1DCRenderTarget.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1DCRenderTarget.cs deleted file mode 100644 index 358372ea..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1DCRenderTarget.cs +++ /dev/null @@ -1,698 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; -using static TerraFX.Interop.DirectX.D2D1_BITMAP_INTERPOLATION_MODE; -using static TerraFX.Interop.DirectX.D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS; -using static TerraFX.Interop.DirectX.D2D1_DRAW_TEXT_OPTIONS; -using static TerraFX.Interop.DirectX.D2D1_EXTEND_MODE; -using static TerraFX.Interop.DirectX.D2D1_GAMMA; -using static TerraFX.Interop.DirectX.DWRITE_MEASURING_MODE; - -namespace TerraFX.Interop.DirectX -{ - [Guid("1C51BC64-DE61-46FD-9899-63A5D8F03950")] - [NativeTypeName("struct ID2D1DCRenderTarget : ID2D1RenderTarget")] - [NativeInheritance("ID2D1RenderTarget")] - internal unsafe partial struct ID2D1DCRenderTarget : ID2D1DCRenderTarget.Interface - { - public void** lpVtbl; - - public HRESULT CreateBitmap([NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U size, [NativeTypeName("const D2D1_BITMAP_PROPERTIES &")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap) - { - return CreateBitmap(size, null, 0, bitmapProperties, bitmap); - } - - public HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource* wicBitmapSource, ID2D1Bitmap** bitmap) - { - return CreateBitmapFromWicBitmap(wicBitmapSource, null, bitmap); - } - - public HRESULT CreateBitmapBrush(ID2D1Bitmap* bitmap, ID2D1BitmapBrush** bitmapBrush) - { - return CreateBitmapBrush(bitmap, null, null, bitmapBrush); - } - - public HRESULT CreateBitmapBrush(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_BITMAP_BRUSH_PROPERTIES &")] D2D1_BITMAP_BRUSH_PROPERTIES* bitmapBrushProperties, ID2D1BitmapBrush** bitmapBrush) - { - return CreateBitmapBrush(bitmap, bitmapBrushProperties, null, bitmapBrush); - } - - public HRESULT CreateSolidColorBrush([NativeTypeName("const D2D1_COLOR_F &")] DXGI_RGBA* color, ID2D1SolidColorBrush** solidColorBrush) - { - return CreateSolidColorBrush(color, null, solidColorBrush); - } - - public HRESULT CreateGradientStopCollection([NativeTypeName("const D2D1_GRADIENT_STOP *")] D2D1_GRADIENT_STOP* gradientStops, [NativeTypeName("UINT32")] uint gradientStopsCount, ID2D1GradientStopCollection** gradientStopCollection) - { - return CreateGradientStopCollection(gradientStops, gradientStopsCount, D2D1_GAMMA_2_2, D2D1_EXTEND_MODE_CLAMP, gradientStopCollection); - } - - public HRESULT CreateLinearGradientBrush([NativeTypeName("const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES &")] D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES* linearGradientBrushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1LinearGradientBrush** linearGradientBrush) - { - return CreateLinearGradientBrush(linearGradientBrushProperties, null, gradientStopCollection, linearGradientBrush); - } - - public HRESULT CreateRadialGradientBrush([NativeTypeName("const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES &")] D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES* radialGradientBrushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1RadialGradientBrush** radialGradientBrush) - { - return CreateRadialGradientBrush(radialGradientBrushProperties, null, gradientStopCollection, radialGradientBrush); - } - - public HRESULT CreateCompatibleRenderTarget(ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(null, null, null, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); - } - - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F desiredSize, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(&desiredSize, null, null, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); - } - - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F desiredSize, [NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U desiredPixelSize, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, null, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); - } - - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F desiredSize, [NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U desiredPixelSize, D2D1_PIXEL_FORMAT desiredFormat, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, &desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); - } - - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F desiredSize, [NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U desiredPixelSize, D2D1_PIXEL_FORMAT desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, &desiredFormat, options, bitmapRenderTarget); - } - - public HRESULT CreateLayer([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F size, ID2D1Layer** layer) - { - return CreateLayer(&size, layer); - } - - public HRESULT CreateLayer(ID2D1Layer** layer) - { - return CreateLayer(null, layer); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT CreateBitmap([NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U size, [NativeTypeName("const void *")] void* srcData, [NativeTypeName("UINT32")] uint pitch, [NativeTypeName("const D2D1_BITMAP_PROPERTIES *")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource* wicBitmapSource, [NativeTypeName("const D2D1_BITMAP_PROPERTIES *")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), wicBitmapSource, bitmapProperties, bitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT CreateSharedBitmap([NativeTypeName("const IID &")] Guid* riid, void* data, [NativeTypeName("const D2D1_BITMAP_PROPERTIES *")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), riid, data, bitmapProperties, bitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT CreateBitmapBrush(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_BITMAP_BRUSH_PROPERTIES *")] D2D1_BITMAP_BRUSH_PROPERTIES* bitmapBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1BitmapBrush** bitmapBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), bitmap, bitmapBrushProperties, brushProperties, bitmapBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT CreateSolidColorBrush([NativeTypeName("const D2D1_COLOR_F *")] DXGI_RGBA* color, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1SolidColorBrush** solidColorBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), color, brushProperties, solidColorBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT CreateGradientStopCollection([NativeTypeName("const D2D1_GRADIENT_STOP *")] D2D1_GRADIENT_STOP* gradientStops, [NativeTypeName("UINT32")] uint gradientStopsCount, D2D1_GAMMA colorInterpolationGamma, D2D1_EXTEND_MODE extendMode, ID2D1GradientStopCollection** gradientStopCollection) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), gradientStops, gradientStopsCount, colorInterpolationGamma, extendMode, gradientStopCollection); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT CreateLinearGradientBrush([NativeTypeName("const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *")] D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES* linearGradientBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1LinearGradientBrush** linearGradientBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), linearGradientBrushProperties, brushProperties, gradientStopCollection, linearGradientBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CreateRadialGradientBrush([NativeTypeName("const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *")] D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES* radialGradientBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1RadialGradientBrush** radialGradientBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), radialGradientBrushProperties, brushProperties, gradientStopCollection, radialGradientBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("const D2D1_SIZE_F *")] D2D_SIZE_F* desiredSize, [NativeTypeName("const D2D1_SIZE_U *")] D2D_SIZE_U* desiredPixelSize, [NativeTypeName("const D2D1_PIXEL_FORMAT *")] D2D1_PIXEL_FORMAT* desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT CreateLayer([NativeTypeName("const D2D1_SIZE_F *")] D2D_SIZE_F* size, ID2D1Layer** layer) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), size, layer); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT CreateMesh(ID2D1Mesh** mesh) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), mesh); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public void DrawLine([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point0, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point1, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public void DrawRectangle([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* rect, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), rect, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public void FillRectangle([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* rect, ID2D1Brush* brush) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), rect, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public void DrawRoundedRectangle([NativeTypeName("const D2D1_ROUNDED_RECT *")] D2D1_ROUNDED_RECT* roundedRect, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), roundedRect, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(19)] - public void FillRoundedRectangle([NativeTypeName("const D2D1_ROUNDED_RECT *")] D2D1_ROUNDED_RECT* roundedRect, ID2D1Brush* brush) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), roundedRect, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(20)] - public void DrawEllipse([NativeTypeName("const D2D1_ELLIPSE *")] D2D1_ELLIPSE* ellipse, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), ellipse, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(21)] - public void FillEllipse([NativeTypeName("const D2D1_ELLIPSE *")] D2D1_ELLIPSE* ellipse, ID2D1Brush* brush) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), ellipse, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(22)] - public void DrawGeometry(ID2D1Geometry* geometry, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), geometry, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(23)] - public void FillGeometry(ID2D1Geometry* geometry, ID2D1Brush* brush, ID2D1Brush* opacityBrush = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[23]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), geometry, brush, opacityBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(24)] - public void FillMesh(ID2D1Mesh* mesh, ID2D1Brush* brush) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[24]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), mesh, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(25)] - public void FillOpacityMask(ID2D1Bitmap* opacityMask, ID2D1Brush* brush, D2D1_OPACITY_MASK_CONTENT content, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* destinationRectangle = null, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[25]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), opacityMask, brush, content, destinationRectangle, sourceRectangle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(26)] - public void DrawBitmap(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* destinationRectangle = null, float opacity = 1.0f, D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[26]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(27)] - public void DrawText([NativeTypeName("const WCHAR *")] ushort* @string, [NativeTypeName("UINT32")] uint stringLength, IDWriteTextFormat* textFormat, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* layoutRect, ID2D1Brush* defaultFillBrush, D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[27]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), @string, stringLength, textFormat, layoutRect, defaultFillBrush, options, measuringMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(28)] - public void DrawTextLayout([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F origin, IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(29)] - public void DrawGlyphRun([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F baselineOrigin, [NativeTypeName("const DWRITE_GLYPH_RUN *")] DWRITE_GLYPH_RUN* glyphRun, ID2D1Brush* foregroundBrush, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(30)] - public void SetTransform([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[30]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(31)] - public void GetTransform([NativeTypeName("D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[31]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(32)] - public void SetAntialiasMode(D2D1_ANTIALIAS_MODE antialiasMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[32]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), antialiasMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(33)] - public D2D1_ANTIALIAS_MODE GetAntialiasMode() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[33]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(34)] - public void SetTextAntialiasMode(D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[34]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), textAntialiasMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(35)] - public D2D1_TEXT_ANTIALIAS_MODE GetTextAntialiasMode() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[35]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(36)] - public void SetTextRenderingParams(IDWriteRenderingParams* textRenderingParams = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[36]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), textRenderingParams); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(37)] - public void GetTextRenderingParams(IDWriteRenderingParams** textRenderingParams) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[37]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), textRenderingParams); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(38)] - public void SetTags([NativeTypeName("D2D1_TAG")] ulong tag1, [NativeTypeName("D2D1_TAG")] ulong tag2) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[38]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(39)] - public void GetTags([NativeTypeName("D2D1_TAG *")] ulong* tag1 = null, [NativeTypeName("D2D1_TAG *")] ulong* tag2 = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[39]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(40)] - public void PushLayer([NativeTypeName("const D2D1_LAYER_PARAMETERS *")] D2D1_LAYER_PARAMETERS* layerParameters, ID2D1Layer* layer) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[40]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), layerParameters, layer); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(41)] - public void PopLayer() - { - ((delegate* unmanaged[Stdcall])(lpVtbl[41]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(42)] - public HRESULT Flush([NativeTypeName("D2D1_TAG *")] ulong* tag1 = null, [NativeTypeName("D2D1_TAG *")] ulong* tag2 = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[42]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(43)] - public void SaveDrawingState(ID2D1DrawingStateBlock* drawingStateBlock) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), drawingStateBlock); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(44)] - public void RestoreDrawingState(ID2D1DrawingStateBlock* drawingStateBlock) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[44]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), drawingStateBlock); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(45)] - public void PushAxisAlignedClip([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* clipRect, D2D1_ANTIALIAS_MODE antialiasMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[45]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), clipRect, antialiasMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(46)] - public void PopAxisAlignedClip() - { - ((delegate* unmanaged[Stdcall])(lpVtbl[46]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(47)] - public void Clear([NativeTypeName("const D2D1_COLOR_F *")] DXGI_RGBA* clearColor = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[47]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), clearColor); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(48)] - public void BeginDraw() - { - ((delegate* unmanaged[Stdcall])(lpVtbl[48]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(49)] - public HRESULT EndDraw([NativeTypeName("D2D1_TAG *")] ulong* tag1 = null, [NativeTypeName("D2D1_TAG *")] ulong* tag2 = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[49]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(50)] - public D2D1_PIXEL_FORMAT GetPixelFormat() - { - D2D1_PIXEL_FORMAT result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[50]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(51)] - public void SetDpi(float dpiX, float dpiY) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[51]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), dpiX, dpiY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(52)] - public void GetDpi(float* dpiX, float* dpiY) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[52]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), dpiX, dpiY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(53)] - [return: NativeTypeName("D2D1_SIZE_F")] - public D2D_SIZE_F GetSize() - { - D2D_SIZE_F result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(54)] - [return: NativeTypeName("D2D1_SIZE_U")] - public D2D_SIZE_U GetPixelSize() - { - D2D_SIZE_U result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(55)] - [return: NativeTypeName("UINT32")] - public uint GetMaximumBitmapSize() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[55]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(56)] - public BOOL IsSupported([NativeTypeName("const D2D1_RENDER_TARGET_PROPERTIES *")] D2D1_RENDER_TARGET_PROPERTIES* renderTargetProperties) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[56]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), renderTargetProperties); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(57)] - public HRESULT BindDC([NativeTypeName("const HDC")] HDC hDC, [NativeTypeName("const RECT *")] RECT* pSubRect) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[57]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), hDC, pSubRect); - } - - public interface Interface : ID2D1RenderTarget.Interface - { - [VtblIndex(57)] - HRESULT BindDC([NativeTypeName("const HDC")] HDC hDC, [NativeTypeName("const RECT *")] RECT* pSubRect); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("HRESULT (D2D1_SIZE_U, const void *, UINT32, const D2D1_BITMAP_PROPERTIES *, ID2D1Bitmap **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmap1; - - [NativeTypeName("HRESULT (IWICBitmapSource *, const D2D1_BITMAP_PROPERTIES *, ID2D1Bitmap **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapFromWicBitmap1; - - [NativeTypeName("HRESULT (const IID &, void *, const D2D1_BITMAP_PROPERTIES *, ID2D1Bitmap **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSharedBitmap; - - [NativeTypeName("HRESULT (ID2D1Bitmap *, const D2D1_BITMAP_BRUSH_PROPERTIES *, const D2D1_BRUSH_PROPERTIES *, ID2D1BitmapBrush **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapBrush2; - - [NativeTypeName("HRESULT (const D2D1_COLOR_F *, const D2D1_BRUSH_PROPERTIES *, ID2D1SolidColorBrush **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSolidColorBrush1; - - [NativeTypeName("HRESULT (const D2D1_GRADIENT_STOP *, UINT32, D2D1_GAMMA, D2D1_EXTEND_MODE, ID2D1GradientStopCollection **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateGradientStopCollection1; - - [NativeTypeName("HRESULT (const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *, const D2D1_BRUSH_PROPERTIES *, ID2D1GradientStopCollection *, ID2D1LinearGradientBrush **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateLinearGradientBrush1; - - [NativeTypeName("HRESULT (const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *, const D2D1_BRUSH_PROPERTIES *, ID2D1GradientStopCollection *, ID2D1RadialGradientBrush **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateRadialGradientBrush1; - - [NativeTypeName("HRESULT (const D2D1_SIZE_F *, const D2D1_SIZE_U *, const D2D1_PIXEL_FORMAT *, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS, ID2D1BitmapRenderTarget **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateCompatibleRenderTarget5; - - [NativeTypeName("HRESULT (const D2D1_SIZE_F *, ID2D1Layer **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateLayer2; - - [NativeTypeName("HRESULT (ID2D1Mesh **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateMesh; - - [NativeTypeName("void (D2D1_POINT_2F, D2D1_POINT_2F, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawLine; - - [NativeTypeName("void (const D2D1_RECT_F *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawRectangle; - - [NativeTypeName("void (const D2D1_RECT_F *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillRectangle; - - [NativeTypeName("void (const D2D1_ROUNDED_RECT *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawRoundedRectangle; - - [NativeTypeName("void (const D2D1_ROUNDED_RECT *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillRoundedRectangle; - - [NativeTypeName("void (const D2D1_ELLIPSE *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawEllipse; - - [NativeTypeName("void (const D2D1_ELLIPSE *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillEllipse; - - [NativeTypeName("void (ID2D1Geometry *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawGeometry; - - [NativeTypeName("void (ID2D1Geometry *, ID2D1Brush *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillGeometry; - - [NativeTypeName("void (ID2D1Mesh *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillMesh; - - [NativeTypeName("void (ID2D1Bitmap *, ID2D1Brush *, D2D1_OPACITY_MASK_CONTENT, const D2D1_RECT_F *, const D2D1_RECT_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillOpacityMask; - - [NativeTypeName("void (ID2D1Bitmap *, const D2D1_RECT_F *, FLOAT, D2D1_BITMAP_INTERPOLATION_MODE, const D2D1_RECT_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawBitmap; - - [NativeTypeName("void (const WCHAR *, UINT32, IDWriteTextFormat *, const D2D1_RECT_F *, ID2D1Brush *, D2D1_DRAW_TEXT_OPTIONS, DWRITE_MEASURING_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawText; - - [NativeTypeName("void (D2D1_POINT_2F, IDWriteTextLayout *, ID2D1Brush *, D2D1_DRAW_TEXT_OPTIONS) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawTextLayout; - - [NativeTypeName("void (D2D1_POINT_2F, const DWRITE_GLYPH_RUN *, ID2D1Brush *, DWRITE_MEASURING_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawGlyphRun; - - [NativeTypeName("void (const D2D1_MATRIX_3X2_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTransform; - - [NativeTypeName("void (D2D1_MATRIX_3X2_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTransform; - - [NativeTypeName("void (D2D1_ANTIALIAS_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetAntialiasMode; - - [NativeTypeName("D2D1_ANTIALIAS_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetAntialiasMode; - - [NativeTypeName("void (D2D1_TEXT_ANTIALIAS_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTextAntialiasMode; - - [NativeTypeName("D2D1_TEXT_ANTIALIAS_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTextAntialiasMode; - - [NativeTypeName("void (IDWriteRenderingParams *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTextRenderingParams; - - [NativeTypeName("void (IDWriteRenderingParams **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTextRenderingParams; - - [NativeTypeName("void (D2D1_TAG, D2D1_TAG) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTags; - - [NativeTypeName("void (D2D1_TAG *, D2D1_TAG *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTags; - - [NativeTypeName("void (const D2D1_LAYER_PARAMETERS *, ID2D1Layer *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PushLayer; - - [NativeTypeName("void () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PopLayer; - - [NativeTypeName("HRESULT (D2D1_TAG *, D2D1_TAG *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Flush; - - [NativeTypeName("void (ID2D1DrawingStateBlock *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SaveDrawingState; - - [NativeTypeName("void (ID2D1DrawingStateBlock *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RestoreDrawingState; - - [NativeTypeName("void (const D2D1_RECT_F *, D2D1_ANTIALIAS_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PushAxisAlignedClip; - - [NativeTypeName("void () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PopAxisAlignedClip; - - [NativeTypeName("void (const D2D1_COLOR_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Clear; - - [NativeTypeName("void () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] BeginDraw; - - [NativeTypeName("HRESULT (D2D1_TAG *, D2D1_TAG *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EndDraw; - - [NativeTypeName("D2D1_PIXEL_FORMAT () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelFormat; - - [NativeTypeName("void (FLOAT, FLOAT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetDpi; - - [NativeTypeName("void (FLOAT *, FLOAT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDpi; - - [NativeTypeName("D2D1_SIZE_F () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSize; - - [NativeTypeName("D2D1_SIZE_U () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelSize; - - [NativeTypeName("UINT32 () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMaximumBitmapSize; - - [NativeTypeName("BOOL (const D2D1_RENDER_TARGET_PROPERTIES *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsSupported; - - [NativeTypeName("HRESULT (const HDC, const RECT *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] BindDC; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1DrawingStateBlock.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1DrawingStateBlock.cs deleted file mode 100644 index 97d10a4c..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1DrawingStateBlock.cs +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("28506E39-EBF6-46A1-BB47-FD85565AB957")] - [NativeTypeName("struct ID2D1DrawingStateBlock : ID2D1Resource")] - [NativeInheritance("ID2D1Resource")] - internal unsafe partial struct ID2D1DrawingStateBlock : ID2D1DrawingStateBlock.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1DrawingStateBlock*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1DrawingStateBlock*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1DrawingStateBlock*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1DrawingStateBlock*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public void GetDescription(D2D1_DRAWING_STATE_DESCRIPTION* stateDescription) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1DrawingStateBlock*)Unsafe.AsPointer(ref this), stateDescription); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public void SetDescription([NativeTypeName("const D2D1_DRAWING_STATE_DESCRIPTION *")] D2D1_DRAWING_STATE_DESCRIPTION* stateDescription) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1DrawingStateBlock*)Unsafe.AsPointer(ref this), stateDescription); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public void SetTextRenderingParams(IDWriteRenderingParams* textRenderingParams = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1DrawingStateBlock*)Unsafe.AsPointer(ref this), textRenderingParams); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public void GetTextRenderingParams(IDWriteRenderingParams** textRenderingParams) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1DrawingStateBlock*)Unsafe.AsPointer(ref this), textRenderingParams); - } - - public interface Interface : ID2D1Resource.Interface - { - [VtblIndex(4)] - void GetDescription(D2D1_DRAWING_STATE_DESCRIPTION* stateDescription); - - [VtblIndex(5)] - void SetDescription([NativeTypeName("const D2D1_DRAWING_STATE_DESCRIPTION *")] D2D1_DRAWING_STATE_DESCRIPTION* stateDescription); - - [VtblIndex(6)] - void SetTextRenderingParams(IDWriteRenderingParams* textRenderingParams = null); - - [VtblIndex(7)] - void GetTextRenderingParams(IDWriteRenderingParams** textRenderingParams); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("void (D2D1_DRAWING_STATE_DESCRIPTION *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDescription; - - [NativeTypeName("void (const D2D1_DRAWING_STATE_DESCRIPTION *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetDescription; - - [NativeTypeName("void (IDWriteRenderingParams *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTextRenderingParams; - - [NativeTypeName("void (IDWriteRenderingParams **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTextRenderingParams; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1EllipseGeometry.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1EllipseGeometry.cs deleted file mode 100644 index 63154746..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1EllipseGeometry.cs +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD906A4-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1EllipseGeometry : ID2D1Geometry")] - [NativeInheritance("ID2D1Geometry")] - internal unsafe partial struct ID2D1EllipseGeometry : ID2D1EllipseGeometry.Interface - { - public void** lpVtbl; - - public HRESULT GetWidenedBounds(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return GetWidenedBounds(strokeWidth, strokeStyle, worldTransform, (0.25f), bounds); - } - - public HRESULT StrokeContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, BOOL* contains) - { - return StrokeContainsPoint(point, strokeWidth, strokeStyle, worldTransform, (0.25f), contains); - } - - public HRESULT FillContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, BOOL* contains) - { - return FillContainsPoint(point, worldTransform, (0.25f), contains); - } - - public HRESULT CompareWithGeometry(ID2D1Geometry* inputGeometry, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, D2D1_GEOMETRY_RELATION* relation) - { - return CompareWithGeometry(inputGeometry, inputGeometryTransform, (0.25f), relation); - } - - public HRESULT Simplify(D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return Simplify(simplificationOption, worldTransform, (0.25f), geometrySink); - } - - public HRESULT Tessellate([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1TessellationSink* tessellationSink) - { - return Tessellate(worldTransform, (0.25f), tessellationSink); - } - - public HRESULT CombineWithGeometry(ID2D1Geometry* inputGeometry, D2D1_COMBINE_MODE combineMode, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return CombineWithGeometry(inputGeometry, combineMode, inputGeometryTransform, (0.25f), geometrySink); - } - - public HRESULT Outline([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return Outline(worldTransform, (0.25f), geometrySink); - } - - public HRESULT ComputeArea([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float* area) - { - return ComputeArea(worldTransform, (0.25f), area); - } - - public HRESULT ComputeLength([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float* length) - { - return ComputeLength(worldTransform, (0.25f), length); - } - - public HRESULT ComputePointAtLength(float length, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* point, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* unitTangentVector) - { - return ComputePointAtLength(length, worldTransform, (0.25f), point, unitTangentVector); - } - - public HRESULT Widen(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return Widen(strokeWidth, strokeStyle, worldTransform, (0.25f), geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetBounds([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), worldTransform, bounds); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetWidenedBounds(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), strokeWidth, strokeStyle, worldTransform, flatteningTolerance, bounds); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT StrokeContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, BOOL* contains) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT FillContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, BOOL* contains) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT CompareWithGeometry(ID2D1Geometry* inputGeometry, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, float flatteningTolerance, D2D1_GEOMETRY_RELATION* relation) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), inputGeometry, inputGeometryTransform, flatteningTolerance, relation); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT Simplify(D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), simplificationOption, worldTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT Tessellate([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1TessellationSink* tessellationSink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, tessellationSink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CombineWithGeometry(ID2D1Geometry* inputGeometry, D2D1_COMBINE_MODE combineMode, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), inputGeometry, combineMode, inputGeometryTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT Outline([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT ComputeArea([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, float* area) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, area); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT ComputeLength([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, float* length) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, length); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT ComputePointAtLength(float length, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* point, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* unitTangentVector) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT Widen(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), strokeWidth, strokeStyle, worldTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public void GetEllipse(D2D1_ELLIPSE* ellipse) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), ellipse); - } - - public interface Interface : ID2D1Geometry.Interface - { - [VtblIndex(17)] - void GetEllipse(D2D1_ELLIPSE* ellipse); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, D2D1_RECT_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBounds; - - [NativeTypeName("HRESULT (FLOAT, ID2D1StrokeStyle *, const D2D1_MATRIX_3X2_F *, FLOAT, D2D1_RECT_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetWidenedBounds1; - - [NativeTypeName("HRESULT (D2D1_POINT_2F, FLOAT, ID2D1StrokeStyle *, const D2D1_MATRIX_3X2_F *, FLOAT, BOOL *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] StrokeContainsPoint1; - - [NativeTypeName("HRESULT (D2D1_POINT_2F, const D2D1_MATRIX_3X2_F *, FLOAT, BOOL *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillContainsPoint1; - - [NativeTypeName("HRESULT (ID2D1Geometry *, const D2D1_MATRIX_3X2_F *, FLOAT, D2D1_GEOMETRY_RELATION *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CompareWithGeometry1; - - [NativeTypeName("HRESULT (D2D1_GEOMETRY_SIMPLIFICATION_OPTION, const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Simplify1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1TessellationSink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Tessellate1; - - [NativeTypeName("HRESULT (ID2D1Geometry *, D2D1_COMBINE_MODE, const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CombineWithGeometry1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Outline1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, FLOAT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ComputeArea1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, FLOAT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ComputeLength1; - - [NativeTypeName("HRESULT (FLOAT, const D2D1_MATRIX_3X2_F *, FLOAT, D2D1_POINT_2F *, D2D1_POINT_2F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ComputePointAtLength1; - - [NativeTypeName("HRESULT (FLOAT, ID2D1StrokeStyle *, const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Widen1; - - [NativeTypeName("void (D2D1_ELLIPSE *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetEllipse; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Factory.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Factory.cs deleted file mode 100644 index 22d2f866..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Factory.cs +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("06152247-6F50-465A-9245-118BFD3B6007")] - [NativeTypeName("struct ID2D1Factory : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct ID2D1Factory : ID2D1Factory.Interface - { - public void** lpVtbl; - - public HRESULT CreateDrawingStateBlock([NativeTypeName("const D2D1_DRAWING_STATE_DESCRIPTION &")] D2D1_DRAWING_STATE_DESCRIPTION* drawingStateDescription, ID2D1DrawingStateBlock** drawingStateBlock) - { - return CreateDrawingStateBlock(drawingStateDescription, null, drawingStateBlock); - } - - public HRESULT CreateDrawingStateBlock(ID2D1DrawingStateBlock** drawingStateBlock) - { - return CreateDrawingStateBlock(null, null, drawingStateBlock); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1Factory*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1Factory*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1Factory*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT ReloadSystemMetrics() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1Factory*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public void GetDesktopDpi(float* dpiX, float* dpiY) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1Factory*)Unsafe.AsPointer(ref this), dpiX, dpiY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT CreateRectangleGeometry([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* rectangle, ID2D1RectangleGeometry** rectangleGeometry) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1Factory*)Unsafe.AsPointer(ref this), rectangle, rectangleGeometry); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT CreateRoundedRectangleGeometry([NativeTypeName("const D2D1_ROUNDED_RECT *")] D2D1_ROUNDED_RECT* roundedRectangle, ID2D1RoundedRectangleGeometry** roundedRectangleGeometry) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1Factory*)Unsafe.AsPointer(ref this), roundedRectangle, roundedRectangleGeometry); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT CreateEllipseGeometry([NativeTypeName("const D2D1_ELLIPSE *")] D2D1_ELLIPSE* ellipse, ID2D1EllipseGeometry** ellipseGeometry) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1Factory*)Unsafe.AsPointer(ref this), ellipse, ellipseGeometry); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT CreateGeometryGroup(D2D1_FILL_MODE fillMode, ID2D1Geometry** geometries, [NativeTypeName("UINT32")] uint geometriesCount, ID2D1GeometryGroup** geometryGroup) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1Factory*)Unsafe.AsPointer(ref this), fillMode, geometries, geometriesCount, geometryGroup); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT CreateTransformedGeometry(ID2D1Geometry* sourceGeometry, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform, ID2D1TransformedGeometry** transformedGeometry) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1Factory*)Unsafe.AsPointer(ref this), sourceGeometry, transform, transformedGeometry); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT CreatePathGeometry(ID2D1PathGeometry** pathGeometry) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1Factory*)Unsafe.AsPointer(ref this), pathGeometry); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CreateStrokeStyle([NativeTypeName("const D2D1_STROKE_STYLE_PROPERTIES *")] D2D1_STROKE_STYLE_PROPERTIES* strokeStyleProperties, [NativeTypeName("const FLOAT *")] float* dashes, [NativeTypeName("UINT32")] uint dashesCount, ID2D1StrokeStyle** strokeStyle) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1Factory*)Unsafe.AsPointer(ref this), strokeStyleProperties, dashes, dashesCount, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT CreateDrawingStateBlock([NativeTypeName("const D2D1_DRAWING_STATE_DESCRIPTION *")] D2D1_DRAWING_STATE_DESCRIPTION* drawingStateDescription, IDWriteRenderingParams* textRenderingParams, ID2D1DrawingStateBlock** drawingStateBlock) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1Factory*)Unsafe.AsPointer(ref this), drawingStateDescription, textRenderingParams, drawingStateBlock); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT CreateWicBitmapRenderTarget(IWICBitmap* target, [NativeTypeName("const D2D1_RENDER_TARGET_PROPERTIES *")] D2D1_RENDER_TARGET_PROPERTIES* renderTargetProperties, ID2D1RenderTarget** renderTarget) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1Factory*)Unsafe.AsPointer(ref this), target, renderTargetProperties, renderTarget); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT CreateHwndRenderTarget([NativeTypeName("const D2D1_RENDER_TARGET_PROPERTIES *")] D2D1_RENDER_TARGET_PROPERTIES* renderTargetProperties, [NativeTypeName("const D2D1_HWND_RENDER_TARGET_PROPERTIES *")] D2D1_HWND_RENDER_TARGET_PROPERTIES* hwndRenderTargetProperties, ID2D1HwndRenderTarget** hwndRenderTarget) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1Factory*)Unsafe.AsPointer(ref this), renderTargetProperties, hwndRenderTargetProperties, hwndRenderTarget); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT CreateDxgiSurfaceRenderTarget(IDXGISurface* dxgiSurface, [NativeTypeName("const D2D1_RENDER_TARGET_PROPERTIES *")] D2D1_RENDER_TARGET_PROPERTIES* renderTargetProperties, ID2D1RenderTarget** renderTarget) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1Factory*)Unsafe.AsPointer(ref this), dxgiSurface, renderTargetProperties, renderTarget); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT CreateDCRenderTarget([NativeTypeName("const D2D1_RENDER_TARGET_PROPERTIES *")] D2D1_RENDER_TARGET_PROPERTIES* renderTargetProperties, ID2D1DCRenderTarget** dcRenderTarget) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((ID2D1Factory*)Unsafe.AsPointer(ref this), renderTargetProperties, dcRenderTarget); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT ReloadSystemMetrics(); - - [VtblIndex(4)] - void GetDesktopDpi(float* dpiX, float* dpiY); - - [VtblIndex(5)] - HRESULT CreateRectangleGeometry([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* rectangle, ID2D1RectangleGeometry** rectangleGeometry); - - [VtblIndex(6)] - HRESULT CreateRoundedRectangleGeometry([NativeTypeName("const D2D1_ROUNDED_RECT *")] D2D1_ROUNDED_RECT* roundedRectangle, ID2D1RoundedRectangleGeometry** roundedRectangleGeometry); - - [VtblIndex(7)] - HRESULT CreateEllipseGeometry([NativeTypeName("const D2D1_ELLIPSE *")] D2D1_ELLIPSE* ellipse, ID2D1EllipseGeometry** ellipseGeometry); - - [VtblIndex(8)] - HRESULT CreateGeometryGroup(D2D1_FILL_MODE fillMode, ID2D1Geometry** geometries, [NativeTypeName("UINT32")] uint geometriesCount, ID2D1GeometryGroup** geometryGroup); - - [VtblIndex(9)] - HRESULT CreateTransformedGeometry(ID2D1Geometry* sourceGeometry, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform, ID2D1TransformedGeometry** transformedGeometry); - - [VtblIndex(10)] - HRESULT CreatePathGeometry(ID2D1PathGeometry** pathGeometry); - - [VtblIndex(11)] - HRESULT CreateStrokeStyle([NativeTypeName("const D2D1_STROKE_STYLE_PROPERTIES *")] D2D1_STROKE_STYLE_PROPERTIES* strokeStyleProperties, [NativeTypeName("const FLOAT *")] float* dashes, [NativeTypeName("UINT32")] uint dashesCount, ID2D1StrokeStyle** strokeStyle); - - [VtblIndex(12)] - HRESULT CreateDrawingStateBlock([NativeTypeName("const D2D1_DRAWING_STATE_DESCRIPTION *")] D2D1_DRAWING_STATE_DESCRIPTION* drawingStateDescription, IDWriteRenderingParams* textRenderingParams, ID2D1DrawingStateBlock** drawingStateBlock); - - [VtblIndex(13)] - HRESULT CreateWicBitmapRenderTarget(IWICBitmap* target, [NativeTypeName("const D2D1_RENDER_TARGET_PROPERTIES *")] D2D1_RENDER_TARGET_PROPERTIES* renderTargetProperties, ID2D1RenderTarget** renderTarget); - - [VtblIndex(14)] - HRESULT CreateHwndRenderTarget([NativeTypeName("const D2D1_RENDER_TARGET_PROPERTIES *")] D2D1_RENDER_TARGET_PROPERTIES* renderTargetProperties, [NativeTypeName("const D2D1_HWND_RENDER_TARGET_PROPERTIES *")] D2D1_HWND_RENDER_TARGET_PROPERTIES* hwndRenderTargetProperties, ID2D1HwndRenderTarget** hwndRenderTarget); - - [VtblIndex(15)] - HRESULT CreateDxgiSurfaceRenderTarget(IDXGISurface* dxgiSurface, [NativeTypeName("const D2D1_RENDER_TARGET_PROPERTIES *")] D2D1_RENDER_TARGET_PROPERTIES* renderTargetProperties, ID2D1RenderTarget** renderTarget); - - [VtblIndex(16)] - HRESULT CreateDCRenderTarget([NativeTypeName("const D2D1_RENDER_TARGET_PROPERTIES *")] D2D1_RENDER_TARGET_PROPERTIES* renderTargetProperties, ID2D1DCRenderTarget** dcRenderTarget); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ReloadSystemMetrics; - - [NativeTypeName("void (FLOAT *, FLOAT *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDesktopDpi; - - [NativeTypeName("HRESULT (const D2D1_RECT_F *, ID2D1RectangleGeometry **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateRectangleGeometry; - - [NativeTypeName("HRESULT (const D2D1_ROUNDED_RECT *, ID2D1RoundedRectangleGeometry **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateRoundedRectangleGeometry; - - [NativeTypeName("HRESULT (const D2D1_ELLIPSE *, ID2D1EllipseGeometry **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateEllipseGeometry; - - [NativeTypeName("HRESULT (D2D1_FILL_MODE, ID2D1Geometry **, UINT32, ID2D1GeometryGroup **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateGeometryGroup; - - [NativeTypeName("HRESULT (ID2D1Geometry *, const D2D1_MATRIX_3X2_F *, ID2D1TransformedGeometry **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateTransformedGeometry; - - [NativeTypeName("HRESULT (ID2D1PathGeometry **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreatePathGeometry; - - [NativeTypeName("HRESULT (const D2D1_STROKE_STYLE_PROPERTIES *, const FLOAT *, UINT32, ID2D1StrokeStyle **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateStrokeStyle; - - [NativeTypeName("HRESULT (const D2D1_DRAWING_STATE_DESCRIPTION *, IDWriteRenderingParams *, ID2D1DrawingStateBlock **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateDrawingStateBlock2; - - [NativeTypeName("HRESULT (IWICBitmap *, const D2D1_RENDER_TARGET_PROPERTIES *, ID2D1RenderTarget **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateWicBitmapRenderTarget; - - [NativeTypeName("HRESULT (const D2D1_RENDER_TARGET_PROPERTIES *, const D2D1_HWND_RENDER_TARGET_PROPERTIES *, ID2D1HwndRenderTarget **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateHwndRenderTarget; - - [NativeTypeName("HRESULT (IDXGISurface *, const D2D1_RENDER_TARGET_PROPERTIES *, ID2D1RenderTarget **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateDxgiSurfaceRenderTarget; - - [NativeTypeName("HRESULT (const D2D1_RENDER_TARGET_PROPERTIES *, ID2D1DCRenderTarget **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateDCRenderTarget; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Geometry.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Geometry.cs deleted file mode 100644 index 5d0ce3cb..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Geometry.cs +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD906A1-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1Geometry : ID2D1Resource")] - [NativeInheritance("ID2D1Resource")] - internal unsafe partial struct ID2D1Geometry : ID2D1Geometry.Interface - { - public void** lpVtbl; - - public HRESULT GetWidenedBounds(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return GetWidenedBounds(strokeWidth, strokeStyle, worldTransform, (0.25f), bounds); - } - - public HRESULT StrokeContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, BOOL* contains) - { - return StrokeContainsPoint(point, strokeWidth, strokeStyle, worldTransform, (0.25f), contains); - } - - public HRESULT FillContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, BOOL* contains) - { - return FillContainsPoint(point, worldTransform, (0.25f), contains); - } - - public HRESULT CompareWithGeometry(ID2D1Geometry* inputGeometry, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, D2D1_GEOMETRY_RELATION* relation) - { - return CompareWithGeometry(inputGeometry, inputGeometryTransform, (0.25f), relation); - } - - public HRESULT Simplify(D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return Simplify(simplificationOption, worldTransform, (0.25f), geometrySink); - } - - public HRESULT Tessellate([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1TessellationSink* tessellationSink) - { - return Tessellate(worldTransform, (0.25f), tessellationSink); - } - - public HRESULT CombineWithGeometry(ID2D1Geometry* inputGeometry, D2D1_COMBINE_MODE combineMode, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return CombineWithGeometry(inputGeometry, combineMode, inputGeometryTransform, (0.25f), geometrySink); - } - - public HRESULT Outline([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return Outline(worldTransform, (0.25f), geometrySink); - } - - public HRESULT ComputeArea([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float* area) - { - return ComputeArea(worldTransform, (0.25f), area); - } - - public HRESULT ComputeLength([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float* length) - { - return ComputeLength(worldTransform, (0.25f), length); - } - - public HRESULT ComputePointAtLength(float length, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* point, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* unitTangentVector) - { - return ComputePointAtLength(length, worldTransform, (0.25f), point, unitTangentVector); - } - - public HRESULT Widen(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return Widen(strokeWidth, strokeStyle, worldTransform, (0.25f), geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1Geometry*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1Geometry*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1Geometry*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1Geometry*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetBounds([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1Geometry*)Unsafe.AsPointer(ref this), worldTransform, bounds); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetWidenedBounds(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1Geometry*)Unsafe.AsPointer(ref this), strokeWidth, strokeStyle, worldTransform, flatteningTolerance, bounds); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT StrokeContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, BOOL* contains) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1Geometry*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT FillContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, BOOL* contains) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1Geometry*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT CompareWithGeometry(ID2D1Geometry* inputGeometry, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, float flatteningTolerance, D2D1_GEOMETRY_RELATION* relation) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1Geometry*)Unsafe.AsPointer(ref this), inputGeometry, inputGeometryTransform, flatteningTolerance, relation); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT Simplify(D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1Geometry*)Unsafe.AsPointer(ref this), simplificationOption, worldTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT Tessellate([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1TessellationSink* tessellationSink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1Geometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, tessellationSink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CombineWithGeometry(ID2D1Geometry* inputGeometry, D2D1_COMBINE_MODE combineMode, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1Geometry*)Unsafe.AsPointer(ref this), inputGeometry, combineMode, inputGeometryTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT Outline([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1Geometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT ComputeArea([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, float* area) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1Geometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, area); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT ComputeLength([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, float* length) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1Geometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, length); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT ComputePointAtLength(float length, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* point, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* unitTangentVector) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1Geometry*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT Widen(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((ID2D1Geometry*)Unsafe.AsPointer(ref this), strokeWidth, strokeStyle, worldTransform, flatteningTolerance, geometrySink); - } - - public interface Interface : ID2D1Resource.Interface - { - [VtblIndex(4)] - HRESULT GetBounds([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds); - - [VtblIndex(5)] - HRESULT GetWidenedBounds(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds); - - [VtblIndex(6)] - HRESULT StrokeContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, BOOL* contains); - - [VtblIndex(7)] - HRESULT FillContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, BOOL* contains); - - [VtblIndex(8)] - HRESULT CompareWithGeometry(ID2D1Geometry* inputGeometry, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, float flatteningTolerance, D2D1_GEOMETRY_RELATION* relation); - - [VtblIndex(9)] - HRESULT Simplify(D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink); - - [VtblIndex(10)] - HRESULT Tessellate([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1TessellationSink* tessellationSink); - - [VtblIndex(11)] - HRESULT CombineWithGeometry(ID2D1Geometry* inputGeometry, D2D1_COMBINE_MODE combineMode, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink); - - [VtblIndex(12)] - HRESULT Outline([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink); - - [VtblIndex(13)] - HRESULT ComputeArea([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, float* area); - - [VtblIndex(14)] - HRESULT ComputeLength([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, float* length); - - [VtblIndex(15)] - HRESULT ComputePointAtLength(float length, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* point, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* unitTangentVector); - - [VtblIndex(16)] - HRESULT Widen(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, D2D1_RECT_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBounds; - - [NativeTypeName("HRESULT (FLOAT, ID2D1StrokeStyle *, const D2D1_MATRIX_3X2_F *, FLOAT, D2D1_RECT_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetWidenedBounds1; - - [NativeTypeName("HRESULT (D2D1_POINT_2F, FLOAT, ID2D1StrokeStyle *, const D2D1_MATRIX_3X2_F *, FLOAT, BOOL *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] StrokeContainsPoint1; - - [NativeTypeName("HRESULT (D2D1_POINT_2F, const D2D1_MATRIX_3X2_F *, FLOAT, BOOL *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillContainsPoint1; - - [NativeTypeName("HRESULT (ID2D1Geometry *, const D2D1_MATRIX_3X2_F *, FLOAT, D2D1_GEOMETRY_RELATION *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CompareWithGeometry1; - - [NativeTypeName("HRESULT (D2D1_GEOMETRY_SIMPLIFICATION_OPTION, const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Simplify1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1TessellationSink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Tessellate1; - - [NativeTypeName("HRESULT (ID2D1Geometry *, D2D1_COMBINE_MODE, const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CombineWithGeometry1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Outline1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, FLOAT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ComputeArea1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, FLOAT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ComputeLength1; - - [NativeTypeName("HRESULT (FLOAT, const D2D1_MATRIX_3X2_F *, FLOAT, D2D1_POINT_2F *, D2D1_POINT_2F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ComputePointAtLength1; - - [NativeTypeName("HRESULT (FLOAT, ID2D1StrokeStyle *, const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Widen1; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1GeometryGroup.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1GeometryGroup.cs deleted file mode 100644 index ab936b77..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1GeometryGroup.cs +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD906A6-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1GeometryGroup : ID2D1Geometry")] - [NativeInheritance("ID2D1Geometry")] - internal unsafe partial struct ID2D1GeometryGroup : ID2D1GeometryGroup.Interface - { - public void** lpVtbl; - - public HRESULT GetWidenedBounds(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return GetWidenedBounds(strokeWidth, strokeStyle, worldTransform, (0.25f), bounds); - } - - public HRESULT StrokeContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, BOOL* contains) - { - return StrokeContainsPoint(point, strokeWidth, strokeStyle, worldTransform, (0.25f), contains); - } - - public HRESULT FillContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, BOOL* contains) - { - return FillContainsPoint(point, worldTransform, (0.25f), contains); - } - - public HRESULT CompareWithGeometry(ID2D1Geometry* inputGeometry, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, D2D1_GEOMETRY_RELATION* relation) - { - return CompareWithGeometry(inputGeometry, inputGeometryTransform, (0.25f), relation); - } - - public HRESULT Simplify(D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return Simplify(simplificationOption, worldTransform, (0.25f), geometrySink); - } - - public HRESULT Tessellate([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1TessellationSink* tessellationSink) - { - return Tessellate(worldTransform, (0.25f), tessellationSink); - } - - public HRESULT CombineWithGeometry(ID2D1Geometry* inputGeometry, D2D1_COMBINE_MODE combineMode, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return CombineWithGeometry(inputGeometry, combineMode, inputGeometryTransform, (0.25f), geometrySink); - } - - public HRESULT Outline([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return Outline(worldTransform, (0.25f), geometrySink); - } - - public HRESULT ComputeArea([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float* area) - { - return ComputeArea(worldTransform, (0.25f), area); - } - - public HRESULT ComputeLength([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float* length) - { - return ComputeLength(worldTransform, (0.25f), length); - } - - public HRESULT ComputePointAtLength(float length, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* point, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* unitTangentVector) - { - return ComputePointAtLength(length, worldTransform, (0.25f), point, unitTangentVector); - } - - public HRESULT Widen(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return Widen(strokeWidth, strokeStyle, worldTransform, (0.25f), geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetBounds([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), worldTransform, bounds); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetWidenedBounds(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), strokeWidth, strokeStyle, worldTransform, flatteningTolerance, bounds); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT StrokeContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, BOOL* contains) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT FillContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, BOOL* contains) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT CompareWithGeometry(ID2D1Geometry* inputGeometry, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, float flatteningTolerance, D2D1_GEOMETRY_RELATION* relation) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), inputGeometry, inputGeometryTransform, flatteningTolerance, relation); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT Simplify(D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), simplificationOption, worldTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT Tessellate([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1TessellationSink* tessellationSink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, tessellationSink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CombineWithGeometry(ID2D1Geometry* inputGeometry, D2D1_COMBINE_MODE combineMode, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), inputGeometry, combineMode, inputGeometryTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT Outline([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT ComputeArea([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, float* area) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, area); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT ComputeLength([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, float* length) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, length); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT ComputePointAtLength(float length, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* point, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* unitTangentVector) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT Widen(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), strokeWidth, strokeStyle, worldTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public D2D1_FILL_MODE GetFillMode() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - [return: NativeTypeName("UINT32")] - public uint GetSourceGeometryCount() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(19)] - public void GetSourceGeometries(ID2D1Geometry** geometries, [NativeTypeName("UINT32")] uint geometriesCount) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), geometries, geometriesCount); - } - - public interface Interface : ID2D1Geometry.Interface - { - [VtblIndex(17)] - D2D1_FILL_MODE GetFillMode(); - - [VtblIndex(18)] - [return: NativeTypeName("UINT32")] - uint GetSourceGeometryCount(); - - [VtblIndex(19)] - void GetSourceGeometries(ID2D1Geometry** geometries, [NativeTypeName("UINT32")] uint geometriesCount); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, D2D1_RECT_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBounds; - - [NativeTypeName("HRESULT (FLOAT, ID2D1StrokeStyle *, const D2D1_MATRIX_3X2_F *, FLOAT, D2D1_RECT_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetWidenedBounds1; - - [NativeTypeName("HRESULT (D2D1_POINT_2F, FLOAT, ID2D1StrokeStyle *, const D2D1_MATRIX_3X2_F *, FLOAT, BOOL *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] StrokeContainsPoint1; - - [NativeTypeName("HRESULT (D2D1_POINT_2F, const D2D1_MATRIX_3X2_F *, FLOAT, BOOL *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillContainsPoint1; - - [NativeTypeName("HRESULT (ID2D1Geometry *, const D2D1_MATRIX_3X2_F *, FLOAT, D2D1_GEOMETRY_RELATION *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CompareWithGeometry1; - - [NativeTypeName("HRESULT (D2D1_GEOMETRY_SIMPLIFICATION_OPTION, const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Simplify1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1TessellationSink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Tessellate1; - - [NativeTypeName("HRESULT (ID2D1Geometry *, D2D1_COMBINE_MODE, const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CombineWithGeometry1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Outline1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, FLOAT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ComputeArea1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, FLOAT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ComputeLength1; - - [NativeTypeName("HRESULT (FLOAT, const D2D1_MATRIX_3X2_F *, FLOAT, D2D1_POINT_2F *, D2D1_POINT_2F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ComputePointAtLength1; - - [NativeTypeName("HRESULT (FLOAT, ID2D1StrokeStyle *, const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Widen1; - - [NativeTypeName("D2D1_FILL_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFillMode; - - [NativeTypeName("UINT32 () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSourceGeometryCount; - - [NativeTypeName("void (ID2D1Geometry **, UINT32) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSourceGeometries; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1GeometrySink.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1GeometrySink.cs deleted file mode 100644 index 8229b5db..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1GeometrySink.cs +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD9069F-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1GeometrySink : ID2D1SimplifiedGeometrySink")] - [NativeInheritance("ID2D1SimplifiedGeometrySink")] - internal unsafe partial struct ID2D1GeometrySink : ID2D1GeometrySink.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1GeometrySink*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1GeometrySink*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1GeometrySink*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void SetFillMode(D2D1_FILL_MODE fillMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1GeometrySink*)Unsafe.AsPointer(ref this), fillMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public void SetSegmentFlags(D2D1_PATH_SEGMENT vertexFlags) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1GeometrySink*)Unsafe.AsPointer(ref this), vertexFlags); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public void BeginFigure([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1GeometrySink*)Unsafe.AsPointer(ref this), startPoint, figureBegin); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public void AddLines([NativeTypeName("const D2D1_POINT_2F *")] D2D_POINT_2F* points, [NativeTypeName("UINT32")] uint pointsCount) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1GeometrySink*)Unsafe.AsPointer(ref this), points, pointsCount); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public void AddBeziers([NativeTypeName("const D2D1_BEZIER_SEGMENT *")] D2D1_BEZIER_SEGMENT* beziers, [NativeTypeName("UINT32")] uint beziersCount) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1GeometrySink*)Unsafe.AsPointer(ref this), beziers, beziersCount); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public void EndFigure(D2D1_FIGURE_END figureEnd) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1GeometrySink*)Unsafe.AsPointer(ref this), figureEnd); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT Close() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1GeometrySink*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public void AddLine([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1GeometrySink*)Unsafe.AsPointer(ref this), point); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public void AddBezier([NativeTypeName("const D2D1_BEZIER_SEGMENT *")] D2D1_BEZIER_SEGMENT* bezier) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1GeometrySink*)Unsafe.AsPointer(ref this), bezier); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public void AddQuadraticBezier([NativeTypeName("const D2D1_QUADRATIC_BEZIER_SEGMENT *")] D2D1_QUADRATIC_BEZIER_SEGMENT* bezier) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1GeometrySink*)Unsafe.AsPointer(ref this), bezier); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public void AddQuadraticBeziers([NativeTypeName("const D2D1_QUADRATIC_BEZIER_SEGMENT *")] D2D1_QUADRATIC_BEZIER_SEGMENT* beziers, [NativeTypeName("UINT32")] uint beziersCount) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1GeometrySink*)Unsafe.AsPointer(ref this), beziers, beziersCount); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public void AddArc([NativeTypeName("const D2D1_ARC_SEGMENT *")] D2D1_ARC_SEGMENT* arc) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1GeometrySink*)Unsafe.AsPointer(ref this), arc); - } - - public interface Interface : ID2D1SimplifiedGeometrySink.Interface - { - [VtblIndex(10)] - void AddLine([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point); - - [VtblIndex(11)] - void AddBezier([NativeTypeName("const D2D1_BEZIER_SEGMENT *")] D2D1_BEZIER_SEGMENT* bezier); - - [VtblIndex(12)] - void AddQuadraticBezier([NativeTypeName("const D2D1_QUADRATIC_BEZIER_SEGMENT *")] D2D1_QUADRATIC_BEZIER_SEGMENT* bezier); - - [VtblIndex(13)] - void AddQuadraticBeziers([NativeTypeName("const D2D1_QUADRATIC_BEZIER_SEGMENT *")] D2D1_QUADRATIC_BEZIER_SEGMENT* beziers, [NativeTypeName("UINT32")] uint beziersCount); - - [VtblIndex(14)] - void AddArc([NativeTypeName("const D2D1_ARC_SEGMENT *")] D2D1_ARC_SEGMENT* arc); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (D2D1_FILL_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetFillMode; - - [NativeTypeName("void (D2D1_PATH_SEGMENT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetSegmentFlags; - - [NativeTypeName("void (D2D1_POINT_2F, D2D1_FIGURE_BEGIN) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] BeginFigure; - - [NativeTypeName("void (const D2D1_POINT_2F *, UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddLines; - - [NativeTypeName("void (const D2D1_BEZIER_SEGMENT *, UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddBeziers; - - [NativeTypeName("void (D2D1_FIGURE_END) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EndFigure; - - [NativeTypeName("HRESULT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Close; - - [NativeTypeName("void (D2D1_POINT_2F) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddLine; - - [NativeTypeName("void (const D2D1_BEZIER_SEGMENT *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddBezier; - - [NativeTypeName("void (const D2D1_QUADRATIC_BEZIER_SEGMENT *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddQuadraticBezier; - - [NativeTypeName("void (const D2D1_QUADRATIC_BEZIER_SEGMENT *, UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddQuadraticBeziers; - - [NativeTypeName("void (const D2D1_ARC_SEGMENT *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddArc; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1GradientStopCollection.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1GradientStopCollection.cs deleted file mode 100644 index 5ba04780..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1GradientStopCollection.cs +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD906A7-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1GradientStopCollection : ID2D1Resource")] - [NativeInheritance("ID2D1Resource")] - internal unsafe partial struct ID2D1GradientStopCollection : ID2D1GradientStopCollection.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1GradientStopCollection*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1GradientStopCollection*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1GradientStopCollection*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1GradientStopCollection*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - [return: NativeTypeName("UINT32")] - public uint GetGradientStopCount() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1GradientStopCollection*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public void GetGradientStops(D2D1_GRADIENT_STOP* gradientStops, [NativeTypeName("UINT32")] uint gradientStopsCount) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1GradientStopCollection*)Unsafe.AsPointer(ref this), gradientStops, gradientStopsCount); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public D2D1_GAMMA GetColorInterpolationGamma() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1GradientStopCollection*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public D2D1_EXTEND_MODE GetExtendMode() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1GradientStopCollection*)Unsafe.AsPointer(ref this)); - } - - public interface Interface : ID2D1Resource.Interface - { - [VtblIndex(4)] - [return: NativeTypeName("UINT32")] - uint GetGradientStopCount(); - - [VtblIndex(5)] - void GetGradientStops(D2D1_GRADIENT_STOP* gradientStops, [NativeTypeName("UINT32")] uint gradientStopsCount); - - [VtblIndex(6)] - D2D1_GAMMA GetColorInterpolationGamma(); - - [VtblIndex(7)] - D2D1_EXTEND_MODE GetExtendMode(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("UINT32 () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetGradientStopCount; - - [NativeTypeName("void (D2D1_GRADIENT_STOP *, UINT32) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetGradientStops; - - [NativeTypeName("D2D1_GAMMA () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetColorInterpolationGamma; - - [NativeTypeName("D2D1_EXTEND_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetExtendMode; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1HwndRenderTarget.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1HwndRenderTarget.cs deleted file mode 100644 index 0f1a7d1b..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1HwndRenderTarget.cs +++ /dev/null @@ -1,724 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; -using static TerraFX.Interop.DirectX.D2D1_BITMAP_INTERPOLATION_MODE; -using static TerraFX.Interop.DirectX.D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS; -using static TerraFX.Interop.DirectX.D2D1_DRAW_TEXT_OPTIONS; -using static TerraFX.Interop.DirectX.D2D1_EXTEND_MODE; -using static TerraFX.Interop.DirectX.D2D1_GAMMA; -using static TerraFX.Interop.DirectX.DWRITE_MEASURING_MODE; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD90698-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1HwndRenderTarget : ID2D1RenderTarget")] - [NativeInheritance("ID2D1RenderTarget")] - internal unsafe partial struct ID2D1HwndRenderTarget : ID2D1HwndRenderTarget.Interface - { - public void** lpVtbl; - - public HRESULT CreateBitmap([NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U size, [NativeTypeName("const D2D1_BITMAP_PROPERTIES &")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap) - { - return CreateBitmap(size, null, 0, bitmapProperties, bitmap); - } - - public HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource* wicBitmapSource, ID2D1Bitmap** bitmap) - { - return CreateBitmapFromWicBitmap(wicBitmapSource, null, bitmap); - } - - public HRESULT CreateBitmapBrush(ID2D1Bitmap* bitmap, ID2D1BitmapBrush** bitmapBrush) - { - return CreateBitmapBrush(bitmap, null, null, bitmapBrush); - } - - public HRESULT CreateBitmapBrush(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_BITMAP_BRUSH_PROPERTIES &")] D2D1_BITMAP_BRUSH_PROPERTIES* bitmapBrushProperties, ID2D1BitmapBrush** bitmapBrush) - { - return CreateBitmapBrush(bitmap, bitmapBrushProperties, null, bitmapBrush); - } - - public HRESULT CreateSolidColorBrush([NativeTypeName("const D2D1_COLOR_F &")] DXGI_RGBA* color, ID2D1SolidColorBrush** solidColorBrush) - { - return CreateSolidColorBrush(color, null, solidColorBrush); - } - - public HRESULT CreateGradientStopCollection([NativeTypeName("const D2D1_GRADIENT_STOP *")] D2D1_GRADIENT_STOP* gradientStops, [NativeTypeName("UINT32")] uint gradientStopsCount, ID2D1GradientStopCollection** gradientStopCollection) - { - return CreateGradientStopCollection(gradientStops, gradientStopsCount, D2D1_GAMMA_2_2, D2D1_EXTEND_MODE_CLAMP, gradientStopCollection); - } - - public HRESULT CreateLinearGradientBrush([NativeTypeName("const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES &")] D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES* linearGradientBrushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1LinearGradientBrush** linearGradientBrush) - { - return CreateLinearGradientBrush(linearGradientBrushProperties, null, gradientStopCollection, linearGradientBrush); - } - - public HRESULT CreateRadialGradientBrush([NativeTypeName("const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES &")] D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES* radialGradientBrushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1RadialGradientBrush** radialGradientBrush) - { - return CreateRadialGradientBrush(radialGradientBrushProperties, null, gradientStopCollection, radialGradientBrush); - } - - public HRESULT CreateCompatibleRenderTarget(ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(null, null, null, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); - } - - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F desiredSize, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(&desiredSize, null, null, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); - } - - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F desiredSize, [NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U desiredPixelSize, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, null, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); - } - - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F desiredSize, [NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U desiredPixelSize, D2D1_PIXEL_FORMAT desiredFormat, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, &desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); - } - - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F desiredSize, [NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U desiredPixelSize, D2D1_PIXEL_FORMAT desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, &desiredFormat, options, bitmapRenderTarget); - } - - public HRESULT CreateLayer([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F size, ID2D1Layer** layer) - { - return CreateLayer(&size, layer); - } - - public HRESULT CreateLayer(ID2D1Layer** layer) - { - return CreateLayer(null, layer); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT CreateBitmap([NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U size, [NativeTypeName("const void *")] void* srcData, [NativeTypeName("UINT32")] uint pitch, [NativeTypeName("const D2D1_BITMAP_PROPERTIES *")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource* wicBitmapSource, [NativeTypeName("const D2D1_BITMAP_PROPERTIES *")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), wicBitmapSource, bitmapProperties, bitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT CreateSharedBitmap([NativeTypeName("const IID &")] Guid* riid, void* data, [NativeTypeName("const D2D1_BITMAP_PROPERTIES *")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), riid, data, bitmapProperties, bitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT CreateBitmapBrush(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_BITMAP_BRUSH_PROPERTIES *")] D2D1_BITMAP_BRUSH_PROPERTIES* bitmapBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1BitmapBrush** bitmapBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), bitmap, bitmapBrushProperties, brushProperties, bitmapBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT CreateSolidColorBrush([NativeTypeName("const D2D1_COLOR_F *")] DXGI_RGBA* color, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1SolidColorBrush** solidColorBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), color, brushProperties, solidColorBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT CreateGradientStopCollection([NativeTypeName("const D2D1_GRADIENT_STOP *")] D2D1_GRADIENT_STOP* gradientStops, [NativeTypeName("UINT32")] uint gradientStopsCount, D2D1_GAMMA colorInterpolationGamma, D2D1_EXTEND_MODE extendMode, ID2D1GradientStopCollection** gradientStopCollection) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), gradientStops, gradientStopsCount, colorInterpolationGamma, extendMode, gradientStopCollection); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT CreateLinearGradientBrush([NativeTypeName("const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *")] D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES* linearGradientBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1LinearGradientBrush** linearGradientBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), linearGradientBrushProperties, brushProperties, gradientStopCollection, linearGradientBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CreateRadialGradientBrush([NativeTypeName("const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *")] D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES* radialGradientBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1RadialGradientBrush** radialGradientBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), radialGradientBrushProperties, brushProperties, gradientStopCollection, radialGradientBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("const D2D1_SIZE_F *")] D2D_SIZE_F* desiredSize, [NativeTypeName("const D2D1_SIZE_U *")] D2D_SIZE_U* desiredPixelSize, [NativeTypeName("const D2D1_PIXEL_FORMAT *")] D2D1_PIXEL_FORMAT* desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT CreateLayer([NativeTypeName("const D2D1_SIZE_F *")] D2D_SIZE_F* size, ID2D1Layer** layer) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), size, layer); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT CreateMesh(ID2D1Mesh** mesh) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), mesh); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public void DrawLine([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point0, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point1, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public void DrawRectangle([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* rect, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), rect, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public void FillRectangle([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* rect, ID2D1Brush* brush) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), rect, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public void DrawRoundedRectangle([NativeTypeName("const D2D1_ROUNDED_RECT *")] D2D1_ROUNDED_RECT* roundedRect, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), roundedRect, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(19)] - public void FillRoundedRectangle([NativeTypeName("const D2D1_ROUNDED_RECT *")] D2D1_ROUNDED_RECT* roundedRect, ID2D1Brush* brush) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), roundedRect, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(20)] - public void DrawEllipse([NativeTypeName("const D2D1_ELLIPSE *")] D2D1_ELLIPSE* ellipse, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), ellipse, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(21)] - public void FillEllipse([NativeTypeName("const D2D1_ELLIPSE *")] D2D1_ELLIPSE* ellipse, ID2D1Brush* brush) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), ellipse, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(22)] - public void DrawGeometry(ID2D1Geometry* geometry, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), geometry, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(23)] - public void FillGeometry(ID2D1Geometry* geometry, ID2D1Brush* brush, ID2D1Brush* opacityBrush = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[23]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), geometry, brush, opacityBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(24)] - public void FillMesh(ID2D1Mesh* mesh, ID2D1Brush* brush) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[24]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), mesh, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(25)] - public void FillOpacityMask(ID2D1Bitmap* opacityMask, ID2D1Brush* brush, D2D1_OPACITY_MASK_CONTENT content, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* destinationRectangle = null, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[25]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), opacityMask, brush, content, destinationRectangle, sourceRectangle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(26)] - public void DrawBitmap(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* destinationRectangle = null, float opacity = 1.0f, D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[26]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(27)] - public void DrawText([NativeTypeName("const WCHAR *")] ushort* @string, [NativeTypeName("UINT32")] uint stringLength, IDWriteTextFormat* textFormat, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* layoutRect, ID2D1Brush* defaultFillBrush, D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[27]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), @string, stringLength, textFormat, layoutRect, defaultFillBrush, options, measuringMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(28)] - public void DrawTextLayout([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F origin, IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(29)] - public void DrawGlyphRun([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F baselineOrigin, [NativeTypeName("const DWRITE_GLYPH_RUN *")] DWRITE_GLYPH_RUN* glyphRun, ID2D1Brush* foregroundBrush, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(30)] - public void SetTransform([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[30]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(31)] - public void GetTransform([NativeTypeName("D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[31]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(32)] - public void SetAntialiasMode(D2D1_ANTIALIAS_MODE antialiasMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[32]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), antialiasMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(33)] - public D2D1_ANTIALIAS_MODE GetAntialiasMode() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[33]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(34)] - public void SetTextAntialiasMode(D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[34]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), textAntialiasMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(35)] - public D2D1_TEXT_ANTIALIAS_MODE GetTextAntialiasMode() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[35]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(36)] - public void SetTextRenderingParams(IDWriteRenderingParams* textRenderingParams = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[36]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), textRenderingParams); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(37)] - public void GetTextRenderingParams(IDWriteRenderingParams** textRenderingParams) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[37]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), textRenderingParams); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(38)] - public void SetTags([NativeTypeName("D2D1_TAG")] ulong tag1, [NativeTypeName("D2D1_TAG")] ulong tag2) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[38]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(39)] - public void GetTags([NativeTypeName("D2D1_TAG *")] ulong* tag1 = null, [NativeTypeName("D2D1_TAG *")] ulong* tag2 = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[39]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(40)] - public void PushLayer([NativeTypeName("const D2D1_LAYER_PARAMETERS *")] D2D1_LAYER_PARAMETERS* layerParameters, ID2D1Layer* layer) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[40]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), layerParameters, layer); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(41)] - public void PopLayer() - { - ((delegate* unmanaged[Stdcall])(lpVtbl[41]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(42)] - public HRESULT Flush([NativeTypeName("D2D1_TAG *")] ulong* tag1 = null, [NativeTypeName("D2D1_TAG *")] ulong* tag2 = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[42]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(43)] - public void SaveDrawingState(ID2D1DrawingStateBlock* drawingStateBlock) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), drawingStateBlock); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(44)] - public void RestoreDrawingState(ID2D1DrawingStateBlock* drawingStateBlock) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[44]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), drawingStateBlock); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(45)] - public void PushAxisAlignedClip([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* clipRect, D2D1_ANTIALIAS_MODE antialiasMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[45]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), clipRect, antialiasMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(46)] - public void PopAxisAlignedClip() - { - ((delegate* unmanaged[Stdcall])(lpVtbl[46]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(47)] - public void Clear([NativeTypeName("const D2D1_COLOR_F *")] DXGI_RGBA* clearColor = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[47]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), clearColor); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(48)] - public void BeginDraw() - { - ((delegate* unmanaged[Stdcall])(lpVtbl[48]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(49)] - public HRESULT EndDraw([NativeTypeName("D2D1_TAG *")] ulong* tag1 = null, [NativeTypeName("D2D1_TAG *")] ulong* tag2 = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[49]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(50)] - public D2D1_PIXEL_FORMAT GetPixelFormat() - { - D2D1_PIXEL_FORMAT result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[50]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(51)] - public void SetDpi(float dpiX, float dpiY) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[51]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), dpiX, dpiY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(52)] - public void GetDpi(float* dpiX, float* dpiY) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[52]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), dpiX, dpiY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(53)] - [return: NativeTypeName("D2D1_SIZE_F")] - public D2D_SIZE_F GetSize() - { - D2D_SIZE_F result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(54)] - [return: NativeTypeName("D2D1_SIZE_U")] - public D2D_SIZE_U GetPixelSize() - { - D2D_SIZE_U result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(55)] - [return: NativeTypeName("UINT32")] - public uint GetMaximumBitmapSize() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[55]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(56)] - public BOOL IsSupported([NativeTypeName("const D2D1_RENDER_TARGET_PROPERTIES *")] D2D1_RENDER_TARGET_PROPERTIES* renderTargetProperties) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[56]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), renderTargetProperties); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(57)] - public D2D1_WINDOW_STATE CheckWindowState() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[57]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(58)] - public HRESULT Resize([NativeTypeName("const D2D1_SIZE_U *")] D2D_SIZE_U* pixelSize) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[58]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), pixelSize); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(59)] - public HWND GetHwnd() - { - return ((HWND)(((delegate* unmanaged[Stdcall])(lpVtbl[59]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this)))); - } - - public interface Interface : ID2D1RenderTarget.Interface - { - [VtblIndex(57)] - D2D1_WINDOW_STATE CheckWindowState(); - - [VtblIndex(58)] - HRESULT Resize([NativeTypeName("const D2D1_SIZE_U *")] D2D_SIZE_U* pixelSize); - - [VtblIndex(59)] - HWND GetHwnd(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("HRESULT (D2D1_SIZE_U, const void *, UINT32, const D2D1_BITMAP_PROPERTIES *, ID2D1Bitmap **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmap1; - - [NativeTypeName("HRESULT (IWICBitmapSource *, const D2D1_BITMAP_PROPERTIES *, ID2D1Bitmap **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapFromWicBitmap1; - - [NativeTypeName("HRESULT (const IID &, void *, const D2D1_BITMAP_PROPERTIES *, ID2D1Bitmap **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSharedBitmap; - - [NativeTypeName("HRESULT (ID2D1Bitmap *, const D2D1_BITMAP_BRUSH_PROPERTIES *, const D2D1_BRUSH_PROPERTIES *, ID2D1BitmapBrush **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapBrush2; - - [NativeTypeName("HRESULT (const D2D1_COLOR_F *, const D2D1_BRUSH_PROPERTIES *, ID2D1SolidColorBrush **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSolidColorBrush1; - - [NativeTypeName("HRESULT (const D2D1_GRADIENT_STOP *, UINT32, D2D1_GAMMA, D2D1_EXTEND_MODE, ID2D1GradientStopCollection **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateGradientStopCollection1; - - [NativeTypeName("HRESULT (const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *, const D2D1_BRUSH_PROPERTIES *, ID2D1GradientStopCollection *, ID2D1LinearGradientBrush **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateLinearGradientBrush1; - - [NativeTypeName("HRESULT (const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *, const D2D1_BRUSH_PROPERTIES *, ID2D1GradientStopCollection *, ID2D1RadialGradientBrush **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateRadialGradientBrush1; - - [NativeTypeName("HRESULT (const D2D1_SIZE_F *, const D2D1_SIZE_U *, const D2D1_PIXEL_FORMAT *, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS, ID2D1BitmapRenderTarget **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateCompatibleRenderTarget5; - - [NativeTypeName("HRESULT (const D2D1_SIZE_F *, ID2D1Layer **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateLayer2; - - [NativeTypeName("HRESULT (ID2D1Mesh **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateMesh; - - [NativeTypeName("void (D2D1_POINT_2F, D2D1_POINT_2F, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawLine; - - [NativeTypeName("void (const D2D1_RECT_F *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawRectangle; - - [NativeTypeName("void (const D2D1_RECT_F *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillRectangle; - - [NativeTypeName("void (const D2D1_ROUNDED_RECT *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawRoundedRectangle; - - [NativeTypeName("void (const D2D1_ROUNDED_RECT *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillRoundedRectangle; - - [NativeTypeName("void (const D2D1_ELLIPSE *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawEllipse; - - [NativeTypeName("void (const D2D1_ELLIPSE *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillEllipse; - - [NativeTypeName("void (ID2D1Geometry *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawGeometry; - - [NativeTypeName("void (ID2D1Geometry *, ID2D1Brush *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillGeometry; - - [NativeTypeName("void (ID2D1Mesh *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillMesh; - - [NativeTypeName("void (ID2D1Bitmap *, ID2D1Brush *, D2D1_OPACITY_MASK_CONTENT, const D2D1_RECT_F *, const D2D1_RECT_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillOpacityMask; - - [NativeTypeName("void (ID2D1Bitmap *, const D2D1_RECT_F *, FLOAT, D2D1_BITMAP_INTERPOLATION_MODE, const D2D1_RECT_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawBitmap; - - [NativeTypeName("void (const WCHAR *, UINT32, IDWriteTextFormat *, const D2D1_RECT_F *, ID2D1Brush *, D2D1_DRAW_TEXT_OPTIONS, DWRITE_MEASURING_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawText; - - [NativeTypeName("void (D2D1_POINT_2F, IDWriteTextLayout *, ID2D1Brush *, D2D1_DRAW_TEXT_OPTIONS) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawTextLayout; - - [NativeTypeName("void (D2D1_POINT_2F, const DWRITE_GLYPH_RUN *, ID2D1Brush *, DWRITE_MEASURING_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawGlyphRun; - - [NativeTypeName("void (const D2D1_MATRIX_3X2_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTransform; - - [NativeTypeName("void (D2D1_MATRIX_3X2_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTransform; - - [NativeTypeName("void (D2D1_ANTIALIAS_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetAntialiasMode; - - [NativeTypeName("D2D1_ANTIALIAS_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetAntialiasMode; - - [NativeTypeName("void (D2D1_TEXT_ANTIALIAS_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTextAntialiasMode; - - [NativeTypeName("D2D1_TEXT_ANTIALIAS_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTextAntialiasMode; - - [NativeTypeName("void (IDWriteRenderingParams *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTextRenderingParams; - - [NativeTypeName("void (IDWriteRenderingParams **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTextRenderingParams; - - [NativeTypeName("void (D2D1_TAG, D2D1_TAG) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTags; - - [NativeTypeName("void (D2D1_TAG *, D2D1_TAG *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTags; - - [NativeTypeName("void (const D2D1_LAYER_PARAMETERS *, ID2D1Layer *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PushLayer; - - [NativeTypeName("void () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PopLayer; - - [NativeTypeName("HRESULT (D2D1_TAG *, D2D1_TAG *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Flush; - - [NativeTypeName("void (ID2D1DrawingStateBlock *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SaveDrawingState; - - [NativeTypeName("void (ID2D1DrawingStateBlock *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RestoreDrawingState; - - [NativeTypeName("void (const D2D1_RECT_F *, D2D1_ANTIALIAS_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PushAxisAlignedClip; - - [NativeTypeName("void () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PopAxisAlignedClip; - - [NativeTypeName("void (const D2D1_COLOR_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Clear; - - [NativeTypeName("void () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] BeginDraw; - - [NativeTypeName("HRESULT (D2D1_TAG *, D2D1_TAG *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EndDraw; - - [NativeTypeName("D2D1_PIXEL_FORMAT () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelFormat; - - [NativeTypeName("void (FLOAT, FLOAT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetDpi; - - [NativeTypeName("void (FLOAT *, FLOAT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDpi; - - [NativeTypeName("D2D1_SIZE_F () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSize; - - [NativeTypeName("D2D1_SIZE_U () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelSize; - - [NativeTypeName("UINT32 () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMaximumBitmapSize; - - [NativeTypeName("BOOL (const D2D1_RENDER_TARGET_PROPERTIES *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsSupported; - - [NativeTypeName("D2D1_WINDOW_STATE () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CheckWindowState; - - [NativeTypeName("HRESULT (const D2D1_SIZE_U *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Resize; - - [NativeTypeName("HWND () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetHwnd; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Image.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Image.cs deleted file mode 100644 index 484af3f5..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Image.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("65019F75-8DA2-497C-B32C-DFA34E48EDE6")] - [NativeTypeName("struct ID2D1Image : ID2D1Resource")] - [NativeInheritance("ID2D1Resource")] - internal unsafe partial struct ID2D1Image : ID2D1Image.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1Image*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1Image*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1Image*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1Image*)Unsafe.AsPointer(ref this), factory); - } - - public interface Interface : ID2D1Resource.Interface - { - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Layer.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Layer.cs deleted file mode 100644 index 5a99b1cf..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Layer.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD9069B-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1Layer : ID2D1Resource")] - [NativeInheritance("ID2D1Resource")] - internal unsafe partial struct ID2D1Layer : ID2D1Layer.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1Layer*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1Layer*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1Layer*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1Layer*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - [return: NativeTypeName("D2D1_SIZE_F")] - public D2D_SIZE_F GetSize() - { - D2D_SIZE_F result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1Layer*)Unsafe.AsPointer(ref this), &result); - } - - public interface Interface : ID2D1Resource.Interface - { - [VtblIndex(4)] - [return: NativeTypeName("D2D1_SIZE_F")] - D2D_SIZE_F GetSize(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("D2D1_SIZE_F () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSize; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1LinearGradientBrush.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1LinearGradientBrush.cs deleted file mode 100644 index 79c50f95..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1LinearGradientBrush.cs +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD906AB-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1LinearGradientBrush : ID2D1Brush")] - [NativeInheritance("ID2D1Brush")] - internal unsafe partial struct ID2D1LinearGradientBrush : ID2D1LinearGradientBrush.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public void SetOpacity(float opacity) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this), opacity); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public void SetTransform([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public float GetOpacity() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public void GetTransform([NativeTypeName("D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public void SetStartPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F startPoint) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this), startPoint); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public void SetEndPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F endPoint) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this), endPoint); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - [return: NativeTypeName("D2D1_POINT_2F")] - public D2D_POINT_2F GetStartPoint() - { - D2D_POINT_2F result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - [return: NativeTypeName("D2D1_POINT_2F")] - public D2D_POINT_2F GetEndPoint() - { - D2D_POINT_2F result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public void GetGradientStopCollection(ID2D1GradientStopCollection** gradientStopCollection) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this), gradientStopCollection); - } - - public interface Interface : ID2D1Brush.Interface - { - [VtblIndex(8)] - void SetStartPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F startPoint); - - [VtblIndex(9)] - void SetEndPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F endPoint); - - [VtblIndex(10)] - [return: NativeTypeName("D2D1_POINT_2F")] - D2D_POINT_2F GetStartPoint(); - - [VtblIndex(11)] - [return: NativeTypeName("D2D1_POINT_2F")] - D2D_POINT_2F GetEndPoint(); - - [VtblIndex(12)] - void GetGradientStopCollection(ID2D1GradientStopCollection** gradientStopCollection); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("void (FLOAT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetOpacity; - - [NativeTypeName("void (const D2D1_MATRIX_3X2_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTransform; - - [NativeTypeName("FLOAT () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetOpacity; - - [NativeTypeName("void (D2D1_MATRIX_3X2_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTransform; - - [NativeTypeName("void (D2D1_POINT_2F) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetStartPoint; - - [NativeTypeName("void (D2D1_POINT_2F) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetEndPoint; - - [NativeTypeName("D2D1_POINT_2F () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetStartPoint; - - [NativeTypeName("D2D1_POINT_2F () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetEndPoint; - - [NativeTypeName("void (ID2D1GradientStopCollection **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetGradientStopCollection; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Mesh.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Mesh.cs deleted file mode 100644 index 4efa15e8..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Mesh.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD906C2-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1Mesh : ID2D1Resource")] - [NativeInheritance("ID2D1Resource")] - internal unsafe partial struct ID2D1Mesh : ID2D1Mesh.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1Mesh*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1Mesh*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1Mesh*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1Mesh*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT Open(ID2D1TessellationSink** tessellationSink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1Mesh*)Unsafe.AsPointer(ref this), tessellationSink); - } - - public interface Interface : ID2D1Resource.Interface - { - [VtblIndex(4)] - HRESULT Open(ID2D1TessellationSink** tessellationSink); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("HRESULT (ID2D1TessellationSink **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Open; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1PathGeometry.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1PathGeometry.cs deleted file mode 100644 index eb02d3c4..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1PathGeometry.cs +++ /dev/null @@ -1,310 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD906A5-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1PathGeometry : ID2D1Geometry")] - [NativeInheritance("ID2D1Geometry")] - internal unsafe partial struct ID2D1PathGeometry : ID2D1PathGeometry.Interface - { - public void** lpVtbl; - - public HRESULT GetWidenedBounds(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return GetWidenedBounds(strokeWidth, strokeStyle, worldTransform, (0.25f), bounds); - } - - public HRESULT StrokeContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, BOOL* contains) - { - return StrokeContainsPoint(point, strokeWidth, strokeStyle, worldTransform, (0.25f), contains); - } - - public HRESULT FillContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, BOOL* contains) - { - return FillContainsPoint(point, worldTransform, (0.25f), contains); - } - - public HRESULT CompareWithGeometry(ID2D1Geometry* inputGeometry, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, D2D1_GEOMETRY_RELATION* relation) - { - return CompareWithGeometry(inputGeometry, inputGeometryTransform, (0.25f), relation); - } - - public HRESULT Simplify(D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return Simplify(simplificationOption, worldTransform, (0.25f), geometrySink); - } - - public HRESULT Tessellate([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1TessellationSink* tessellationSink) - { - return Tessellate(worldTransform, (0.25f), tessellationSink); - } - - public HRESULT CombineWithGeometry(ID2D1Geometry* inputGeometry, D2D1_COMBINE_MODE combineMode, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return CombineWithGeometry(inputGeometry, combineMode, inputGeometryTransform, (0.25f), geometrySink); - } - - public HRESULT Outline([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return Outline(worldTransform, (0.25f), geometrySink); - } - - public HRESULT ComputeArea([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float* area) - { - return ComputeArea(worldTransform, (0.25f), area); - } - - public HRESULT ComputeLength([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float* length) - { - return ComputeLength(worldTransform, (0.25f), length); - } - - public HRESULT ComputePointAtLength(float length, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* point, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* unitTangentVector) - { - return ComputePointAtLength(length, worldTransform, (0.25f), point, unitTangentVector); - } - - public HRESULT Widen(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return Widen(strokeWidth, strokeStyle, worldTransform, (0.25f), geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetBounds([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), worldTransform, bounds); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetWidenedBounds(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), strokeWidth, strokeStyle, worldTransform, flatteningTolerance, bounds); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT StrokeContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, BOOL* contains) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT FillContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, BOOL* contains) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT CompareWithGeometry(ID2D1Geometry* inputGeometry, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, float flatteningTolerance, D2D1_GEOMETRY_RELATION* relation) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), inputGeometry, inputGeometryTransform, flatteningTolerance, relation); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT Simplify(D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), simplificationOption, worldTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT Tessellate([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1TessellationSink* tessellationSink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, tessellationSink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CombineWithGeometry(ID2D1Geometry* inputGeometry, D2D1_COMBINE_MODE combineMode, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), inputGeometry, combineMode, inputGeometryTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT Outline([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT ComputeArea([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, float* area) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, area); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT ComputeLength([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, float* length) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, length); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT ComputePointAtLength(float length, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* point, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* unitTangentVector) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT Widen(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), strokeWidth, strokeStyle, worldTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public HRESULT Open(ID2D1GeometrySink** geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public HRESULT Stream(ID2D1GeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(19)] - public HRESULT GetSegmentCount([NativeTypeName("UINT32 *")] uint* count) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), count); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(20)] - public HRESULT GetFigureCount([NativeTypeName("UINT32 *")] uint* count) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), count); - } - - public interface Interface : ID2D1Geometry.Interface - { - [VtblIndex(17)] - HRESULT Open(ID2D1GeometrySink** geometrySink); - - [VtblIndex(18)] - HRESULT Stream(ID2D1GeometrySink* geometrySink); - - [VtblIndex(19)] - HRESULT GetSegmentCount([NativeTypeName("UINT32 *")] uint* count); - - [VtblIndex(20)] - HRESULT GetFigureCount([NativeTypeName("UINT32 *")] uint* count); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, D2D1_RECT_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBounds; - - [NativeTypeName("HRESULT (FLOAT, ID2D1StrokeStyle *, const D2D1_MATRIX_3X2_F *, FLOAT, D2D1_RECT_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetWidenedBounds1; - - [NativeTypeName("HRESULT (D2D1_POINT_2F, FLOAT, ID2D1StrokeStyle *, const D2D1_MATRIX_3X2_F *, FLOAT, BOOL *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] StrokeContainsPoint1; - - [NativeTypeName("HRESULT (D2D1_POINT_2F, const D2D1_MATRIX_3X2_F *, FLOAT, BOOL *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillContainsPoint1; - - [NativeTypeName("HRESULT (ID2D1Geometry *, const D2D1_MATRIX_3X2_F *, FLOAT, D2D1_GEOMETRY_RELATION *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CompareWithGeometry1; - - [NativeTypeName("HRESULT (D2D1_GEOMETRY_SIMPLIFICATION_OPTION, const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Simplify1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1TessellationSink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Tessellate1; - - [NativeTypeName("HRESULT (ID2D1Geometry *, D2D1_COMBINE_MODE, const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CombineWithGeometry1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Outline1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, FLOAT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ComputeArea1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, FLOAT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ComputeLength1; - - [NativeTypeName("HRESULT (FLOAT, const D2D1_MATRIX_3X2_F *, FLOAT, D2D1_POINT_2F *, D2D1_POINT_2F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ComputePointAtLength1; - - [NativeTypeName("HRESULT (FLOAT, ID2D1StrokeStyle *, const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Widen1; - - [NativeTypeName("HRESULT (ID2D1GeometrySink **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Open; - - [NativeTypeName("HRESULT (ID2D1GeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Stream; - - [NativeTypeName("HRESULT (UINT32 *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSegmentCount; - - [NativeTypeName("HRESULT (UINT32 *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFigureCount; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1RadialGradientBrush.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1RadialGradientBrush.cs deleted file mode 100644 index b028e17f..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1RadialGradientBrush.cs +++ /dev/null @@ -1,231 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD906AC-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1RadialGradientBrush : ID2D1Brush")] - [NativeInheritance("ID2D1Brush")] - internal unsafe partial struct ID2D1RadialGradientBrush : ID2D1RadialGradientBrush.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public void SetOpacity(float opacity) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), opacity); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public void SetTransform([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public float GetOpacity() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public void GetTransform([NativeTypeName("D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public void SetCenter([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F center) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), center); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public void SetGradientOriginOffset([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F gradientOriginOffset) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), gradientOriginOffset); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public void SetRadiusX(float radiusX) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), radiusX); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public void SetRadiusY(float radiusY) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), radiusY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - [return: NativeTypeName("D2D1_POINT_2F")] - public D2D_POINT_2F GetCenter() - { - D2D_POINT_2F result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - [return: NativeTypeName("D2D1_POINT_2F")] - public D2D_POINT_2F GetGradientOriginOffset() - { - D2D_POINT_2F result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public float GetRadiusX() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public float GetRadiusY() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public void GetGradientStopCollection(ID2D1GradientStopCollection** gradientStopCollection) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), gradientStopCollection); - } - - public interface Interface : ID2D1Brush.Interface - { - [VtblIndex(8)] - void SetCenter([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F center); - - [VtblIndex(9)] - void SetGradientOriginOffset([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F gradientOriginOffset); - - [VtblIndex(10)] - void SetRadiusX(float radiusX); - - [VtblIndex(11)] - void SetRadiusY(float radiusY); - - [VtblIndex(12)] - [return: NativeTypeName("D2D1_POINT_2F")] - D2D_POINT_2F GetCenter(); - - [VtblIndex(13)] - [return: NativeTypeName("D2D1_POINT_2F")] - D2D_POINT_2F GetGradientOriginOffset(); - - [VtblIndex(14)] - float GetRadiusX(); - - [VtblIndex(15)] - float GetRadiusY(); - - [VtblIndex(16)] - void GetGradientStopCollection(ID2D1GradientStopCollection** gradientStopCollection); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("void (FLOAT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetOpacity; - - [NativeTypeName("void (const D2D1_MATRIX_3X2_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTransform; - - [NativeTypeName("FLOAT () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetOpacity; - - [NativeTypeName("void (D2D1_MATRIX_3X2_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTransform; - - [NativeTypeName("void (D2D1_POINT_2F) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetCenter; - - [NativeTypeName("void (D2D1_POINT_2F) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetGradientOriginOffset; - - [NativeTypeName("void (FLOAT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetRadiusX; - - [NativeTypeName("void (FLOAT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetRadiusY; - - [NativeTypeName("D2D1_POINT_2F () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetCenter; - - [NativeTypeName("D2D1_POINT_2F () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetGradientOriginOffset; - - [NativeTypeName("FLOAT () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetRadiusX; - - [NativeTypeName("FLOAT () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetRadiusY; - - [NativeTypeName("void (ID2D1GradientStopCollection **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetGradientStopCollection; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1RectangleGeometry.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1RectangleGeometry.cs deleted file mode 100644 index 7751ff72..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1RectangleGeometry.cs +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD906A2-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1RectangleGeometry : ID2D1Geometry")] - [NativeInheritance("ID2D1Geometry")] - internal unsafe partial struct ID2D1RectangleGeometry : ID2D1RectangleGeometry.Interface - { - public void** lpVtbl; - - public HRESULT GetWidenedBounds(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return GetWidenedBounds(strokeWidth, strokeStyle, worldTransform, (0.25f), bounds); - } - - public HRESULT StrokeContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, BOOL* contains) - { - return StrokeContainsPoint(point, strokeWidth, strokeStyle, worldTransform, (0.25f), contains); - } - - public HRESULT FillContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, BOOL* contains) - { - return FillContainsPoint(point, worldTransform, (0.25f), contains); - } - - public HRESULT CompareWithGeometry(ID2D1Geometry* inputGeometry, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, D2D1_GEOMETRY_RELATION* relation) - { - return CompareWithGeometry(inputGeometry, inputGeometryTransform, (0.25f), relation); - } - - public HRESULT Simplify(D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return Simplify(simplificationOption, worldTransform, (0.25f), geometrySink); - } - - public HRESULT Tessellate([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1TessellationSink* tessellationSink) - { - return Tessellate(worldTransform, (0.25f), tessellationSink); - } - - public HRESULT CombineWithGeometry(ID2D1Geometry* inputGeometry, D2D1_COMBINE_MODE combineMode, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return CombineWithGeometry(inputGeometry, combineMode, inputGeometryTransform, (0.25f), geometrySink); - } - - public HRESULT Outline([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return Outline(worldTransform, (0.25f), geometrySink); - } - - public HRESULT ComputeArea([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float* area) - { - return ComputeArea(worldTransform, (0.25f), area); - } - - public HRESULT ComputeLength([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float* length) - { - return ComputeLength(worldTransform, (0.25f), length); - } - - public HRESULT ComputePointAtLength(float length, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* point, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* unitTangentVector) - { - return ComputePointAtLength(length, worldTransform, (0.25f), point, unitTangentVector); - } - - public HRESULT Widen(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return Widen(strokeWidth, strokeStyle, worldTransform, (0.25f), geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetBounds([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), worldTransform, bounds); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetWidenedBounds(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), strokeWidth, strokeStyle, worldTransform, flatteningTolerance, bounds); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT StrokeContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, BOOL* contains) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT FillContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, BOOL* contains) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT CompareWithGeometry(ID2D1Geometry* inputGeometry, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, float flatteningTolerance, D2D1_GEOMETRY_RELATION* relation) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), inputGeometry, inputGeometryTransform, flatteningTolerance, relation); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT Simplify(D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), simplificationOption, worldTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT Tessellate([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1TessellationSink* tessellationSink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, tessellationSink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CombineWithGeometry(ID2D1Geometry* inputGeometry, D2D1_COMBINE_MODE combineMode, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), inputGeometry, combineMode, inputGeometryTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT Outline([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT ComputeArea([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, float* area) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, area); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT ComputeLength([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, float* length) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, length); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT ComputePointAtLength(float length, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* point, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* unitTangentVector) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT Widen(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), strokeWidth, strokeStyle, worldTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public void GetRect([NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* rect) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), rect); - } - - public interface Interface : ID2D1Geometry.Interface - { - [VtblIndex(17)] - void GetRect([NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* rect); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, D2D1_RECT_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBounds; - - [NativeTypeName("HRESULT (FLOAT, ID2D1StrokeStyle *, const D2D1_MATRIX_3X2_F *, FLOAT, D2D1_RECT_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetWidenedBounds1; - - [NativeTypeName("HRESULT (D2D1_POINT_2F, FLOAT, ID2D1StrokeStyle *, const D2D1_MATRIX_3X2_F *, FLOAT, BOOL *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] StrokeContainsPoint1; - - [NativeTypeName("HRESULT (D2D1_POINT_2F, const D2D1_MATRIX_3X2_F *, FLOAT, BOOL *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillContainsPoint1; - - [NativeTypeName("HRESULT (ID2D1Geometry *, const D2D1_MATRIX_3X2_F *, FLOAT, D2D1_GEOMETRY_RELATION *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CompareWithGeometry1; - - [NativeTypeName("HRESULT (D2D1_GEOMETRY_SIMPLIFICATION_OPTION, const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Simplify1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1TessellationSink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Tessellate1; - - [NativeTypeName("HRESULT (ID2D1Geometry *, D2D1_COMBINE_MODE, const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CombineWithGeometry1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Outline1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, FLOAT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ComputeArea1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, FLOAT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ComputeLength1; - - [NativeTypeName("HRESULT (FLOAT, const D2D1_MATRIX_3X2_F *, FLOAT, D2D1_POINT_2F *, D2D1_POINT_2F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ComputePointAtLength1; - - [NativeTypeName("HRESULT (FLOAT, ID2D1StrokeStyle *, const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Widen1; - - [NativeTypeName("void (D2D1_RECT_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetRect; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1RenderTarget.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1RenderTarget.cs deleted file mode 100644 index 39ee4a9b..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1RenderTarget.cs +++ /dev/null @@ -1,847 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; -using static TerraFX.Interop.DirectX.D2D1_BITMAP_INTERPOLATION_MODE; -using static TerraFX.Interop.DirectX.D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS; -using static TerraFX.Interop.DirectX.D2D1_DRAW_TEXT_OPTIONS; -using static TerraFX.Interop.DirectX.D2D1_EXTEND_MODE; -using static TerraFX.Interop.DirectX.D2D1_GAMMA; -using static TerraFX.Interop.DirectX.DWRITE_MEASURING_MODE; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD90694-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1RenderTarget : ID2D1Resource")] - [NativeInheritance("ID2D1Resource")] - internal unsafe partial struct ID2D1RenderTarget : ID2D1RenderTarget.Interface - { - public void** lpVtbl; - - public HRESULT CreateBitmap([NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U size, [NativeTypeName("const D2D1_BITMAP_PROPERTIES &")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap) - { - return CreateBitmap(size, null, 0, bitmapProperties, bitmap); - } - - public HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource* wicBitmapSource, ID2D1Bitmap** bitmap) - { - return CreateBitmapFromWicBitmap(wicBitmapSource, null, bitmap); - } - - public HRESULT CreateBitmapBrush(ID2D1Bitmap* bitmap, ID2D1BitmapBrush** bitmapBrush) - { - return CreateBitmapBrush(bitmap, null, null, bitmapBrush); - } - - public HRESULT CreateBitmapBrush(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_BITMAP_BRUSH_PROPERTIES &")] D2D1_BITMAP_BRUSH_PROPERTIES* bitmapBrushProperties, ID2D1BitmapBrush** bitmapBrush) - { - return CreateBitmapBrush(bitmap, bitmapBrushProperties, null, bitmapBrush); - } - - public HRESULT CreateSolidColorBrush([NativeTypeName("const D2D1_COLOR_F &")] DXGI_RGBA* color, ID2D1SolidColorBrush** solidColorBrush) - { - return CreateSolidColorBrush(color, null, solidColorBrush); - } - - public HRESULT CreateGradientStopCollection([NativeTypeName("const D2D1_GRADIENT_STOP *")] D2D1_GRADIENT_STOP* gradientStops, [NativeTypeName("UINT32")] uint gradientStopsCount, ID2D1GradientStopCollection** gradientStopCollection) - { - return CreateGradientStopCollection(gradientStops, gradientStopsCount, D2D1_GAMMA_2_2, D2D1_EXTEND_MODE_CLAMP, gradientStopCollection); - } - - public HRESULT CreateLinearGradientBrush([NativeTypeName("const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES &")] D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES* linearGradientBrushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1LinearGradientBrush** linearGradientBrush) - { - return CreateLinearGradientBrush(linearGradientBrushProperties, null, gradientStopCollection, linearGradientBrush); - } - - public HRESULT CreateRadialGradientBrush([NativeTypeName("const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES &")] D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES* radialGradientBrushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1RadialGradientBrush** radialGradientBrush) - { - return CreateRadialGradientBrush(radialGradientBrushProperties, null, gradientStopCollection, radialGradientBrush); - } - - public HRESULT CreateCompatibleRenderTarget(ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(null, null, null, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); - } - - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F desiredSize, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(&desiredSize, null, null, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); - } - - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F desiredSize, [NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U desiredPixelSize, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, null, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); - } - - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F desiredSize, [NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U desiredPixelSize, D2D1_PIXEL_FORMAT desiredFormat, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, &desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); - } - - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F desiredSize, [NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U desiredPixelSize, D2D1_PIXEL_FORMAT desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, &desiredFormat, options, bitmapRenderTarget); - } - - public HRESULT CreateLayer([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F size, ID2D1Layer** layer) - { - return CreateLayer(&size, layer); - } - - public HRESULT CreateLayer(ID2D1Layer** layer) - { - return CreateLayer(null, layer); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT CreateBitmap([NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U size, [NativeTypeName("const void *")] void* srcData, [NativeTypeName("UINT32")] uint pitch, [NativeTypeName("const D2D1_BITMAP_PROPERTIES *")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource* wicBitmapSource, [NativeTypeName("const D2D1_BITMAP_PROPERTIES *")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), wicBitmapSource, bitmapProperties, bitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT CreateSharedBitmap([NativeTypeName("const IID &")] Guid* riid, void* data, [NativeTypeName("const D2D1_BITMAP_PROPERTIES *")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), riid, data, bitmapProperties, bitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT CreateBitmapBrush(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_BITMAP_BRUSH_PROPERTIES *")] D2D1_BITMAP_BRUSH_PROPERTIES* bitmapBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1BitmapBrush** bitmapBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), bitmap, bitmapBrushProperties, brushProperties, bitmapBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT CreateSolidColorBrush([NativeTypeName("const D2D1_COLOR_F *")] DXGI_RGBA* color, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1SolidColorBrush** solidColorBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), color, brushProperties, solidColorBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT CreateGradientStopCollection([NativeTypeName("const D2D1_GRADIENT_STOP *")] D2D1_GRADIENT_STOP* gradientStops, [NativeTypeName("UINT32")] uint gradientStopsCount, D2D1_GAMMA colorInterpolationGamma, D2D1_EXTEND_MODE extendMode, ID2D1GradientStopCollection** gradientStopCollection) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), gradientStops, gradientStopsCount, colorInterpolationGamma, extendMode, gradientStopCollection); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT CreateLinearGradientBrush([NativeTypeName("const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *")] D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES* linearGradientBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1LinearGradientBrush** linearGradientBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), linearGradientBrushProperties, brushProperties, gradientStopCollection, linearGradientBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CreateRadialGradientBrush([NativeTypeName("const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *")] D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES* radialGradientBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1RadialGradientBrush** radialGradientBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), radialGradientBrushProperties, brushProperties, gradientStopCollection, radialGradientBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("const D2D1_SIZE_F *")] D2D_SIZE_F* desiredSize, [NativeTypeName("const D2D1_SIZE_U *")] D2D_SIZE_U* desiredPixelSize, [NativeTypeName("const D2D1_PIXEL_FORMAT *")] D2D1_PIXEL_FORMAT* desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT CreateLayer([NativeTypeName("const D2D1_SIZE_F *")] D2D_SIZE_F* size, ID2D1Layer** layer) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), size, layer); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT CreateMesh(ID2D1Mesh** mesh) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), mesh); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public void DrawLine([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point0, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point1, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public void DrawRectangle([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* rect, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), rect, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public void FillRectangle([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* rect, ID2D1Brush* brush) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), rect, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public void DrawRoundedRectangle([NativeTypeName("const D2D1_ROUNDED_RECT *")] D2D1_ROUNDED_RECT* roundedRect, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), roundedRect, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(19)] - public void FillRoundedRectangle([NativeTypeName("const D2D1_ROUNDED_RECT *")] D2D1_ROUNDED_RECT* roundedRect, ID2D1Brush* brush) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), roundedRect, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(20)] - public void DrawEllipse([NativeTypeName("const D2D1_ELLIPSE *")] D2D1_ELLIPSE* ellipse, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), ellipse, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(21)] - public void FillEllipse([NativeTypeName("const D2D1_ELLIPSE *")] D2D1_ELLIPSE* ellipse, ID2D1Brush* brush) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), ellipse, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(22)] - public void DrawGeometry(ID2D1Geometry* geometry, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), geometry, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(23)] - public void FillGeometry(ID2D1Geometry* geometry, ID2D1Brush* brush, ID2D1Brush* opacityBrush = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[23]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), geometry, brush, opacityBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(24)] - public void FillMesh(ID2D1Mesh* mesh, ID2D1Brush* brush) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[24]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), mesh, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(25)] - public void FillOpacityMask(ID2D1Bitmap* opacityMask, ID2D1Brush* brush, D2D1_OPACITY_MASK_CONTENT content, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* destinationRectangle = null, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[25]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), opacityMask, brush, content, destinationRectangle, sourceRectangle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(26)] - public void DrawBitmap(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* destinationRectangle = null, float opacity = 1.0f, D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[26]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(27)] - public void DrawText([NativeTypeName("const WCHAR *")] ushort* @string, [NativeTypeName("UINT32")] uint stringLength, IDWriteTextFormat* textFormat, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* layoutRect, ID2D1Brush* defaultFillBrush, D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[27]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), @string, stringLength, textFormat, layoutRect, defaultFillBrush, options, measuringMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(28)] - public void DrawTextLayout([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F origin, IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(29)] - public void DrawGlyphRun([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F baselineOrigin, [NativeTypeName("const DWRITE_GLYPH_RUN *")] DWRITE_GLYPH_RUN* glyphRun, ID2D1Brush* foregroundBrush, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(30)] - public void SetTransform([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[30]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(31)] - public void GetTransform([NativeTypeName("D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[31]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(32)] - public void SetAntialiasMode(D2D1_ANTIALIAS_MODE antialiasMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[32]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), antialiasMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(33)] - public D2D1_ANTIALIAS_MODE GetAntialiasMode() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[33]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(34)] - public void SetTextAntialiasMode(D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[34]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), textAntialiasMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(35)] - public D2D1_TEXT_ANTIALIAS_MODE GetTextAntialiasMode() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[35]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(36)] - public void SetTextRenderingParams(IDWriteRenderingParams* textRenderingParams = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[36]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), textRenderingParams); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(37)] - public void GetTextRenderingParams(IDWriteRenderingParams** textRenderingParams) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[37]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), textRenderingParams); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(38)] - public void SetTags([NativeTypeName("D2D1_TAG")] ulong tag1, [NativeTypeName("D2D1_TAG")] ulong tag2) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[38]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(39)] - public void GetTags([NativeTypeName("D2D1_TAG *")] ulong* tag1 = null, [NativeTypeName("D2D1_TAG *")] ulong* tag2 = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[39]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(40)] - public void PushLayer([NativeTypeName("const D2D1_LAYER_PARAMETERS *")] D2D1_LAYER_PARAMETERS* layerParameters, ID2D1Layer* layer) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[40]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), layerParameters, layer); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(41)] - public void PopLayer() - { - ((delegate* unmanaged[Stdcall])(lpVtbl[41]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(42)] - public HRESULT Flush([NativeTypeName("D2D1_TAG *")] ulong* tag1 = null, [NativeTypeName("D2D1_TAG *")] ulong* tag2 = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[42]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(43)] - public void SaveDrawingState(ID2D1DrawingStateBlock* drawingStateBlock) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), drawingStateBlock); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(44)] - public void RestoreDrawingState(ID2D1DrawingStateBlock* drawingStateBlock) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[44]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), drawingStateBlock); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(45)] - public void PushAxisAlignedClip([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* clipRect, D2D1_ANTIALIAS_MODE antialiasMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[45]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), clipRect, antialiasMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(46)] - public void PopAxisAlignedClip() - { - ((delegate* unmanaged[Stdcall])(lpVtbl[46]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(47)] - public void Clear([NativeTypeName("const D2D1_COLOR_F *")] DXGI_RGBA* clearColor = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[47]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), clearColor); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(48)] - public void BeginDraw() - { - ((delegate* unmanaged[Stdcall])(lpVtbl[48]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(49)] - public HRESULT EndDraw([NativeTypeName("D2D1_TAG *")] ulong* tag1 = null, [NativeTypeName("D2D1_TAG *")] ulong* tag2 = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[49]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(50)] - public D2D1_PIXEL_FORMAT GetPixelFormat() - { - D2D1_PIXEL_FORMAT result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[50]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(51)] - public void SetDpi(float dpiX, float dpiY) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[51]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), dpiX, dpiY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(52)] - public void GetDpi(float* dpiX, float* dpiY) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[52]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), dpiX, dpiY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(53)] - [return: NativeTypeName("D2D1_SIZE_F")] - public D2D_SIZE_F GetSize() - { - D2D_SIZE_F result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(54)] - [return: NativeTypeName("D2D1_SIZE_U")] - public D2D_SIZE_U GetPixelSize() - { - D2D_SIZE_U result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(55)] - [return: NativeTypeName("UINT32")] - public uint GetMaximumBitmapSize() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[55]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(56)] - public BOOL IsSupported([NativeTypeName("const D2D1_RENDER_TARGET_PROPERTIES *")] D2D1_RENDER_TARGET_PROPERTIES* renderTargetProperties) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[56]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), renderTargetProperties); - } - - public interface Interface : ID2D1Resource.Interface - { - [VtblIndex(4)] - HRESULT CreateBitmap([NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U size, [NativeTypeName("const void *")] void* srcData, [NativeTypeName("UINT32")] uint pitch, [NativeTypeName("const D2D1_BITMAP_PROPERTIES *")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap); - - [VtblIndex(5)] - HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource* wicBitmapSource, [NativeTypeName("const D2D1_BITMAP_PROPERTIES *")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap); - - [VtblIndex(6)] - HRESULT CreateSharedBitmap([NativeTypeName("const IID &")] Guid* riid, void* data, [NativeTypeName("const D2D1_BITMAP_PROPERTIES *")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap); - - [VtblIndex(7)] - HRESULT CreateBitmapBrush(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_BITMAP_BRUSH_PROPERTIES *")] D2D1_BITMAP_BRUSH_PROPERTIES* bitmapBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1BitmapBrush** bitmapBrush); - - [VtblIndex(8)] - HRESULT CreateSolidColorBrush([NativeTypeName("const D2D1_COLOR_F *")] DXGI_RGBA* color, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1SolidColorBrush** solidColorBrush); - - [VtblIndex(9)] - HRESULT CreateGradientStopCollection([NativeTypeName("const D2D1_GRADIENT_STOP *")] D2D1_GRADIENT_STOP* gradientStops, [NativeTypeName("UINT32")] uint gradientStopsCount, D2D1_GAMMA colorInterpolationGamma, D2D1_EXTEND_MODE extendMode, ID2D1GradientStopCollection** gradientStopCollection); - - [VtblIndex(10)] - HRESULT CreateLinearGradientBrush([NativeTypeName("const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *")] D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES* linearGradientBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1LinearGradientBrush** linearGradientBrush); - - [VtblIndex(11)] - HRESULT CreateRadialGradientBrush([NativeTypeName("const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *")] D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES* radialGradientBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1RadialGradientBrush** radialGradientBrush); - - [VtblIndex(12)] - HRESULT CreateCompatibleRenderTarget([NativeTypeName("const D2D1_SIZE_F *")] D2D_SIZE_F* desiredSize, [NativeTypeName("const D2D1_SIZE_U *")] D2D_SIZE_U* desiredPixelSize, [NativeTypeName("const D2D1_PIXEL_FORMAT *")] D2D1_PIXEL_FORMAT* desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options, ID2D1BitmapRenderTarget** bitmapRenderTarget); - - [VtblIndex(13)] - HRESULT CreateLayer([NativeTypeName("const D2D1_SIZE_F *")] D2D_SIZE_F* size, ID2D1Layer** layer); - - [VtblIndex(14)] - HRESULT CreateMesh(ID2D1Mesh** mesh); - - [VtblIndex(15)] - void DrawLine([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point0, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point1, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null); - - [VtblIndex(16)] - void DrawRectangle([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* rect, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null); - - [VtblIndex(17)] - void FillRectangle([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* rect, ID2D1Brush* brush); - - [VtblIndex(18)] - void DrawRoundedRectangle([NativeTypeName("const D2D1_ROUNDED_RECT *")] D2D1_ROUNDED_RECT* roundedRect, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null); - - [VtblIndex(19)] - void FillRoundedRectangle([NativeTypeName("const D2D1_ROUNDED_RECT *")] D2D1_ROUNDED_RECT* roundedRect, ID2D1Brush* brush); - - [VtblIndex(20)] - void DrawEllipse([NativeTypeName("const D2D1_ELLIPSE *")] D2D1_ELLIPSE* ellipse, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null); - - [VtblIndex(21)] - void FillEllipse([NativeTypeName("const D2D1_ELLIPSE *")] D2D1_ELLIPSE* ellipse, ID2D1Brush* brush); - - [VtblIndex(22)] - void DrawGeometry(ID2D1Geometry* geometry, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null); - - [VtblIndex(23)] - void FillGeometry(ID2D1Geometry* geometry, ID2D1Brush* brush, ID2D1Brush* opacityBrush = null); - - [VtblIndex(24)] - void FillMesh(ID2D1Mesh* mesh, ID2D1Brush* brush); - - [VtblIndex(25)] - void FillOpacityMask(ID2D1Bitmap* opacityMask, ID2D1Brush* brush, D2D1_OPACITY_MASK_CONTENT content, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* destinationRectangle = null, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle = null); - - [VtblIndex(26)] - void DrawBitmap(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* destinationRectangle = null, float opacity = 1.0f, D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle = null); - - [VtblIndex(27)] - void DrawText([NativeTypeName("const WCHAR *")] ushort* @string, [NativeTypeName("UINT32")] uint stringLength, IDWriteTextFormat* textFormat, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* layoutRect, ID2D1Brush* defaultFillBrush, D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL); - - [VtblIndex(28)] - void DrawTextLayout([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F origin, IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE); - - [VtblIndex(29)] - void DrawGlyphRun([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F baselineOrigin, [NativeTypeName("const DWRITE_GLYPH_RUN *")] DWRITE_GLYPH_RUN* glyphRun, ID2D1Brush* foregroundBrush, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL); - - [VtblIndex(30)] - void SetTransform([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform); - - [VtblIndex(31)] - void GetTransform([NativeTypeName("D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform); - - [VtblIndex(32)] - void SetAntialiasMode(D2D1_ANTIALIAS_MODE antialiasMode); - - [VtblIndex(33)] - D2D1_ANTIALIAS_MODE GetAntialiasMode(); - - [VtblIndex(34)] - void SetTextAntialiasMode(D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode); - - [VtblIndex(35)] - D2D1_TEXT_ANTIALIAS_MODE GetTextAntialiasMode(); - - [VtblIndex(36)] - void SetTextRenderingParams(IDWriteRenderingParams* textRenderingParams = null); - - [VtblIndex(37)] - void GetTextRenderingParams(IDWriteRenderingParams** textRenderingParams); - - [VtblIndex(38)] - void SetTags([NativeTypeName("D2D1_TAG")] ulong tag1, [NativeTypeName("D2D1_TAG")] ulong tag2); - - [VtblIndex(39)] - void GetTags([NativeTypeName("D2D1_TAG *")] ulong* tag1 = null, [NativeTypeName("D2D1_TAG *")] ulong* tag2 = null); - - [VtblIndex(40)] - void PushLayer([NativeTypeName("const D2D1_LAYER_PARAMETERS *")] D2D1_LAYER_PARAMETERS* layerParameters, ID2D1Layer* layer); - - [VtblIndex(41)] - void PopLayer(); - - [VtblIndex(42)] - HRESULT Flush([NativeTypeName("D2D1_TAG *")] ulong* tag1 = null, [NativeTypeName("D2D1_TAG *")] ulong* tag2 = null); - - [VtblIndex(43)] - void SaveDrawingState(ID2D1DrawingStateBlock* drawingStateBlock); - - [VtblIndex(44)] - void RestoreDrawingState(ID2D1DrawingStateBlock* drawingStateBlock); - - [VtblIndex(45)] - void PushAxisAlignedClip([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* clipRect, D2D1_ANTIALIAS_MODE antialiasMode); - - [VtblIndex(46)] - void PopAxisAlignedClip(); - - [VtblIndex(47)] - void Clear([NativeTypeName("const D2D1_COLOR_F *")] DXGI_RGBA* clearColor = null); - - [VtblIndex(48)] - void BeginDraw(); - - [VtblIndex(49)] - HRESULT EndDraw([NativeTypeName("D2D1_TAG *")] ulong* tag1 = null, [NativeTypeName("D2D1_TAG *")] ulong* tag2 = null); - - [VtblIndex(50)] - D2D1_PIXEL_FORMAT GetPixelFormat(); - - [VtblIndex(51)] - void SetDpi(float dpiX, float dpiY); - - [VtblIndex(52)] - void GetDpi(float* dpiX, float* dpiY); - - [VtblIndex(53)] - [return: NativeTypeName("D2D1_SIZE_F")] - D2D_SIZE_F GetSize(); - - [VtblIndex(54)] - [return: NativeTypeName("D2D1_SIZE_U")] - D2D_SIZE_U GetPixelSize(); - - [VtblIndex(55)] - [return: NativeTypeName("UINT32")] - uint GetMaximumBitmapSize(); - - [VtblIndex(56)] - BOOL IsSupported([NativeTypeName("const D2D1_RENDER_TARGET_PROPERTIES *")] D2D1_RENDER_TARGET_PROPERTIES* renderTargetProperties); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("HRESULT (D2D1_SIZE_U, const void *, UINT32, const D2D1_BITMAP_PROPERTIES *, ID2D1Bitmap **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmap1; - - [NativeTypeName("HRESULT (IWICBitmapSource *, const D2D1_BITMAP_PROPERTIES *, ID2D1Bitmap **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapFromWicBitmap1; - - [NativeTypeName("HRESULT (const IID &, void *, const D2D1_BITMAP_PROPERTIES *, ID2D1Bitmap **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSharedBitmap; - - [NativeTypeName("HRESULT (ID2D1Bitmap *, const D2D1_BITMAP_BRUSH_PROPERTIES *, const D2D1_BRUSH_PROPERTIES *, ID2D1BitmapBrush **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapBrush2; - - [NativeTypeName("HRESULT (const D2D1_COLOR_F *, const D2D1_BRUSH_PROPERTIES *, ID2D1SolidColorBrush **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSolidColorBrush1; - - [NativeTypeName("HRESULT (const D2D1_GRADIENT_STOP *, UINT32, D2D1_GAMMA, D2D1_EXTEND_MODE, ID2D1GradientStopCollection **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateGradientStopCollection1; - - [NativeTypeName("HRESULT (const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *, const D2D1_BRUSH_PROPERTIES *, ID2D1GradientStopCollection *, ID2D1LinearGradientBrush **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateLinearGradientBrush1; - - [NativeTypeName("HRESULT (const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *, const D2D1_BRUSH_PROPERTIES *, ID2D1GradientStopCollection *, ID2D1RadialGradientBrush **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateRadialGradientBrush1; - - [NativeTypeName("HRESULT (const D2D1_SIZE_F *, const D2D1_SIZE_U *, const D2D1_PIXEL_FORMAT *, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS, ID2D1BitmapRenderTarget **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateCompatibleRenderTarget5; - - [NativeTypeName("HRESULT (const D2D1_SIZE_F *, ID2D1Layer **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateLayer2; - - [NativeTypeName("HRESULT (ID2D1Mesh **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateMesh; - - [NativeTypeName("void (D2D1_POINT_2F, D2D1_POINT_2F, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawLine; - - [NativeTypeName("void (const D2D1_RECT_F *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawRectangle; - - [NativeTypeName("void (const D2D1_RECT_F *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillRectangle; - - [NativeTypeName("void (const D2D1_ROUNDED_RECT *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawRoundedRectangle; - - [NativeTypeName("void (const D2D1_ROUNDED_RECT *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillRoundedRectangle; - - [NativeTypeName("void (const D2D1_ELLIPSE *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawEllipse; - - [NativeTypeName("void (const D2D1_ELLIPSE *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillEllipse; - - [NativeTypeName("void (ID2D1Geometry *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawGeometry; - - [NativeTypeName("void (ID2D1Geometry *, ID2D1Brush *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillGeometry; - - [NativeTypeName("void (ID2D1Mesh *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillMesh; - - [NativeTypeName("void (ID2D1Bitmap *, ID2D1Brush *, D2D1_OPACITY_MASK_CONTENT, const D2D1_RECT_F *, const D2D1_RECT_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillOpacityMask; - - [NativeTypeName("void (ID2D1Bitmap *, const D2D1_RECT_F *, FLOAT, D2D1_BITMAP_INTERPOLATION_MODE, const D2D1_RECT_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawBitmap; - - [NativeTypeName("void (const WCHAR *, UINT32, IDWriteTextFormat *, const D2D1_RECT_F *, ID2D1Brush *, D2D1_DRAW_TEXT_OPTIONS, DWRITE_MEASURING_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawText; - - [NativeTypeName("void (D2D1_POINT_2F, IDWriteTextLayout *, ID2D1Brush *, D2D1_DRAW_TEXT_OPTIONS) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawTextLayout; - - [NativeTypeName("void (D2D1_POINT_2F, const DWRITE_GLYPH_RUN *, ID2D1Brush *, DWRITE_MEASURING_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawGlyphRun; - - [NativeTypeName("void (const D2D1_MATRIX_3X2_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTransform; - - [NativeTypeName("void (D2D1_MATRIX_3X2_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTransform; - - [NativeTypeName("void (D2D1_ANTIALIAS_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetAntialiasMode; - - [NativeTypeName("D2D1_ANTIALIAS_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetAntialiasMode; - - [NativeTypeName("void (D2D1_TEXT_ANTIALIAS_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTextAntialiasMode; - - [NativeTypeName("D2D1_TEXT_ANTIALIAS_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTextAntialiasMode; - - [NativeTypeName("void (IDWriteRenderingParams *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTextRenderingParams; - - [NativeTypeName("void (IDWriteRenderingParams **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTextRenderingParams; - - [NativeTypeName("void (D2D1_TAG, D2D1_TAG) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTags; - - [NativeTypeName("void (D2D1_TAG *, D2D1_TAG *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTags; - - [NativeTypeName("void (const D2D1_LAYER_PARAMETERS *, ID2D1Layer *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PushLayer; - - [NativeTypeName("void () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PopLayer; - - [NativeTypeName("HRESULT (D2D1_TAG *, D2D1_TAG *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Flush; - - [NativeTypeName("void (ID2D1DrawingStateBlock *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SaveDrawingState; - - [NativeTypeName("void (ID2D1DrawingStateBlock *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RestoreDrawingState; - - [NativeTypeName("void (const D2D1_RECT_F *, D2D1_ANTIALIAS_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PushAxisAlignedClip; - - [NativeTypeName("void () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PopAxisAlignedClip; - - [NativeTypeName("void (const D2D1_COLOR_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Clear; - - [NativeTypeName("void () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] BeginDraw; - - [NativeTypeName("HRESULT (D2D1_TAG *, D2D1_TAG *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EndDraw; - - [NativeTypeName("D2D1_PIXEL_FORMAT () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelFormat; - - [NativeTypeName("void (FLOAT, FLOAT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetDpi; - - [NativeTypeName("void (FLOAT *, FLOAT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDpi; - - [NativeTypeName("D2D1_SIZE_F () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSize; - - [NativeTypeName("D2D1_SIZE_U () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelSize; - - [NativeTypeName("UINT32 () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMaximumBitmapSize; - - [NativeTypeName("BOOL (const D2D1_RENDER_TARGET_PROPERTIES *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsSupported; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Resource.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Resource.cs deleted file mode 100644 index ba1a5eb1..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1Resource.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD90691-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1Resource : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct ID2D1Resource : ID2D1Resource.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1Resource*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1Resource*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1Resource*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1Resource*)Unsafe.AsPointer(ref this), factory); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - void GetFactory(ID2D1Factory** factory); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1RoundedRectangleGeometry.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1RoundedRectangleGeometry.cs deleted file mode 100644 index e3695e24..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1RoundedRectangleGeometry.cs +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD906A3-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1RoundedRectangleGeometry : ID2D1Geometry")] - [NativeInheritance("ID2D1Geometry")] - internal unsafe partial struct ID2D1RoundedRectangleGeometry : ID2D1RoundedRectangleGeometry.Interface - { - public void** lpVtbl; - - public HRESULT GetWidenedBounds(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return GetWidenedBounds(strokeWidth, strokeStyle, worldTransform, (0.25f), bounds); - } - - public HRESULT StrokeContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, BOOL* contains) - { - return StrokeContainsPoint(point, strokeWidth, strokeStyle, worldTransform, (0.25f), contains); - } - - public HRESULT FillContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, BOOL* contains) - { - return FillContainsPoint(point, worldTransform, (0.25f), contains); - } - - public HRESULT CompareWithGeometry(ID2D1Geometry* inputGeometry, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, D2D1_GEOMETRY_RELATION* relation) - { - return CompareWithGeometry(inputGeometry, inputGeometryTransform, (0.25f), relation); - } - - public HRESULT Simplify(D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return Simplify(simplificationOption, worldTransform, (0.25f), geometrySink); - } - - public HRESULT Tessellate([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1TessellationSink* tessellationSink) - { - return Tessellate(worldTransform, (0.25f), tessellationSink); - } - - public HRESULT CombineWithGeometry(ID2D1Geometry* inputGeometry, D2D1_COMBINE_MODE combineMode, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return CombineWithGeometry(inputGeometry, combineMode, inputGeometryTransform, (0.25f), geometrySink); - } - - public HRESULT Outline([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return Outline(worldTransform, (0.25f), geometrySink); - } - - public HRESULT ComputeArea([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float* area) - { - return ComputeArea(worldTransform, (0.25f), area); - } - - public HRESULT ComputeLength([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float* length) - { - return ComputeLength(worldTransform, (0.25f), length); - } - - public HRESULT ComputePointAtLength(float length, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* point, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* unitTangentVector) - { - return ComputePointAtLength(length, worldTransform, (0.25f), point, unitTangentVector); - } - - public HRESULT Widen(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return Widen(strokeWidth, strokeStyle, worldTransform, (0.25f), geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetBounds([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), worldTransform, bounds); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetWidenedBounds(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), strokeWidth, strokeStyle, worldTransform, flatteningTolerance, bounds); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT StrokeContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, BOOL* contains) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT FillContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, BOOL* contains) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT CompareWithGeometry(ID2D1Geometry* inputGeometry, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, float flatteningTolerance, D2D1_GEOMETRY_RELATION* relation) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), inputGeometry, inputGeometryTransform, flatteningTolerance, relation); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT Simplify(D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), simplificationOption, worldTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT Tessellate([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1TessellationSink* tessellationSink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, tessellationSink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CombineWithGeometry(ID2D1Geometry* inputGeometry, D2D1_COMBINE_MODE combineMode, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), inputGeometry, combineMode, inputGeometryTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT Outline([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT ComputeArea([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, float* area) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, area); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT ComputeLength([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, float* length) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, length); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT ComputePointAtLength(float length, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* point, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* unitTangentVector) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT Widen(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), strokeWidth, strokeStyle, worldTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public void GetRoundedRect(D2D1_ROUNDED_RECT* roundedRect) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), roundedRect); - } - - public interface Interface : ID2D1Geometry.Interface - { - [VtblIndex(17)] - void GetRoundedRect(D2D1_ROUNDED_RECT* roundedRect); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, D2D1_RECT_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBounds; - - [NativeTypeName("HRESULT (FLOAT, ID2D1StrokeStyle *, const D2D1_MATRIX_3X2_F *, FLOAT, D2D1_RECT_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetWidenedBounds1; - - [NativeTypeName("HRESULT (D2D1_POINT_2F, FLOAT, ID2D1StrokeStyle *, const D2D1_MATRIX_3X2_F *, FLOAT, BOOL *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] StrokeContainsPoint1; - - [NativeTypeName("HRESULT (D2D1_POINT_2F, const D2D1_MATRIX_3X2_F *, FLOAT, BOOL *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillContainsPoint1; - - [NativeTypeName("HRESULT (ID2D1Geometry *, const D2D1_MATRIX_3X2_F *, FLOAT, D2D1_GEOMETRY_RELATION *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CompareWithGeometry1; - - [NativeTypeName("HRESULT (D2D1_GEOMETRY_SIMPLIFICATION_OPTION, const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Simplify1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1TessellationSink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Tessellate1; - - [NativeTypeName("HRESULT (ID2D1Geometry *, D2D1_COMBINE_MODE, const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CombineWithGeometry1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Outline1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, FLOAT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ComputeArea1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, FLOAT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ComputeLength1; - - [NativeTypeName("HRESULT (FLOAT, const D2D1_MATRIX_3X2_F *, FLOAT, D2D1_POINT_2F *, D2D1_POINT_2F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ComputePointAtLength1; - - [NativeTypeName("HRESULT (FLOAT, ID2D1StrokeStyle *, const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Widen1; - - [NativeTypeName("void (D2D1_ROUNDED_RECT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetRoundedRect; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1SimplifiedGeometrySink.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1SimplifiedGeometrySink.cs deleted file mode 100644 index ca97380c..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1SimplifiedGeometrySink.cs +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD9069E-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1SimplifiedGeometrySink : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct ID2D1SimplifiedGeometrySink : ID2D1SimplifiedGeometrySink.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1SimplifiedGeometrySink*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1SimplifiedGeometrySink*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1SimplifiedGeometrySink*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void SetFillMode(D2D1_FILL_MODE fillMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1SimplifiedGeometrySink*)Unsafe.AsPointer(ref this), fillMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public void SetSegmentFlags(D2D1_PATH_SEGMENT vertexFlags) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1SimplifiedGeometrySink*)Unsafe.AsPointer(ref this), vertexFlags); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public void BeginFigure([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1SimplifiedGeometrySink*)Unsafe.AsPointer(ref this), startPoint, figureBegin); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public void AddLines([NativeTypeName("const D2D1_POINT_2F *")] D2D_POINT_2F* points, [NativeTypeName("UINT32")] uint pointsCount) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1SimplifiedGeometrySink*)Unsafe.AsPointer(ref this), points, pointsCount); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public void AddBeziers([NativeTypeName("const D2D1_BEZIER_SEGMENT *")] D2D1_BEZIER_SEGMENT* beziers, [NativeTypeName("UINT32")] uint beziersCount) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1SimplifiedGeometrySink*)Unsafe.AsPointer(ref this), beziers, beziersCount); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public void EndFigure(D2D1_FIGURE_END figureEnd) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1SimplifiedGeometrySink*)Unsafe.AsPointer(ref this), figureEnd); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT Close() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1SimplifiedGeometrySink*)Unsafe.AsPointer(ref this)); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - void SetFillMode(D2D1_FILL_MODE fillMode); - - [VtblIndex(4)] - void SetSegmentFlags(D2D1_PATH_SEGMENT vertexFlags); - - [VtblIndex(5)] - void BeginFigure([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin); - - [VtblIndex(6)] - void AddLines([NativeTypeName("const D2D1_POINT_2F *")] D2D_POINT_2F* points, [NativeTypeName("UINT32")] uint pointsCount); - - [VtblIndex(7)] - void AddBeziers([NativeTypeName("const D2D1_BEZIER_SEGMENT *")] D2D1_BEZIER_SEGMENT* beziers, [NativeTypeName("UINT32")] uint beziersCount); - - [VtblIndex(8)] - void EndFigure(D2D1_FIGURE_END figureEnd); - - [VtblIndex(9)] - HRESULT Close(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (D2D1_FILL_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetFillMode; - - [NativeTypeName("void (D2D1_PATH_SEGMENT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetSegmentFlags; - - [NativeTypeName("void (D2D1_POINT_2F, D2D1_FIGURE_BEGIN) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] BeginFigure; - - [NativeTypeName("void (const D2D1_POINT_2F *, UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddLines; - - [NativeTypeName("void (const D2D1_BEZIER_SEGMENT *, UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddBeziers; - - [NativeTypeName("void (D2D1_FIGURE_END) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EndFigure; - - [NativeTypeName("HRESULT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Close; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1SolidColorBrush.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1SolidColorBrush.cs deleted file mode 100644 index 0b58eedc..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1SolidColorBrush.cs +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD906A9-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1SolidColorBrush : ID2D1Brush")] - [NativeInheritance("ID2D1Brush")] - internal unsafe partial struct ID2D1SolidColorBrush : ID2D1SolidColorBrush.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1SolidColorBrush*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1SolidColorBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1SolidColorBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1SolidColorBrush*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public void SetOpacity(float opacity) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1SolidColorBrush*)Unsafe.AsPointer(ref this), opacity); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public void SetTransform([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1SolidColorBrush*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public float GetOpacity() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1SolidColorBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public void GetTransform([NativeTypeName("D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1SolidColorBrush*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public void SetColor([NativeTypeName("const D2D1_COLOR_F *")] DXGI_RGBA* color) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1SolidColorBrush*)Unsafe.AsPointer(ref this), color); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - [return: NativeTypeName("D2D1_COLOR_F")] - public DXGI_RGBA GetColor() - { - DXGI_RGBA result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1SolidColorBrush*)Unsafe.AsPointer(ref this), &result); - } - - public interface Interface : ID2D1Brush.Interface - { - [VtblIndex(8)] - void SetColor([NativeTypeName("const D2D1_COLOR_F *")] DXGI_RGBA* color); - - [VtblIndex(9)] - [return: NativeTypeName("D2D1_COLOR_F")] - DXGI_RGBA GetColor(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("void (FLOAT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetOpacity; - - [NativeTypeName("void (const D2D1_MATRIX_3X2_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTransform; - - [NativeTypeName("FLOAT () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetOpacity; - - [NativeTypeName("void (D2D1_MATRIX_3X2_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTransform; - - [NativeTypeName("void (const D2D1_COLOR_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetColor; - - [NativeTypeName("D2D1_COLOR_F () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetColor; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1StrokeStyle.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1StrokeStyle.cs deleted file mode 100644 index 38ec44a3..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1StrokeStyle.cs +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD9069D-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1StrokeStyle : ID2D1Resource")] - [NativeInheritance("ID2D1Resource")] - internal unsafe partial struct ID2D1StrokeStyle : ID2D1StrokeStyle.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1StrokeStyle*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1StrokeStyle*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1StrokeStyle*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1StrokeStyle*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public D2D1_CAP_STYLE GetStartCap() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1StrokeStyle*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public D2D1_CAP_STYLE GetEndCap() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1StrokeStyle*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public D2D1_CAP_STYLE GetDashCap() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1StrokeStyle*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public float GetMiterLimit() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1StrokeStyle*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public D2D1_LINE_JOIN GetLineJoin() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1StrokeStyle*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public float GetDashOffset() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1StrokeStyle*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public D2D1_DASH_STYLE GetDashStyle() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1StrokeStyle*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - [return: NativeTypeName("UINT32")] - public uint GetDashesCount() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1StrokeStyle*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public void GetDashes(float* dashes, [NativeTypeName("UINT32")] uint dashesCount) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1StrokeStyle*)Unsafe.AsPointer(ref this), dashes, dashesCount); - } - - public interface Interface : ID2D1Resource.Interface - { - [VtblIndex(4)] - D2D1_CAP_STYLE GetStartCap(); - - [VtblIndex(5)] - D2D1_CAP_STYLE GetEndCap(); - - [VtblIndex(6)] - D2D1_CAP_STYLE GetDashCap(); - - [VtblIndex(7)] - float GetMiterLimit(); - - [VtblIndex(8)] - D2D1_LINE_JOIN GetLineJoin(); - - [VtblIndex(9)] - float GetDashOffset(); - - [VtblIndex(10)] - D2D1_DASH_STYLE GetDashStyle(); - - [VtblIndex(11)] - [return: NativeTypeName("UINT32")] - uint GetDashesCount(); - - [VtblIndex(12)] - void GetDashes(float* dashes, [NativeTypeName("UINT32")] uint dashesCount); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("D2D1_CAP_STYLE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetStartCap; - - [NativeTypeName("D2D1_CAP_STYLE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetEndCap; - - [NativeTypeName("D2D1_CAP_STYLE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDashCap; - - [NativeTypeName("FLOAT () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMiterLimit; - - [NativeTypeName("D2D1_LINE_JOIN () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetLineJoin; - - [NativeTypeName("FLOAT () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDashOffset; - - [NativeTypeName("D2D1_DASH_STYLE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDashStyle; - - [NativeTypeName("UINT32 () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDashesCount; - - [NativeTypeName("void (FLOAT *, UINT32) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDashes; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1TessellationSink.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1TessellationSink.cs deleted file mode 100644 index f0329fa1..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1TessellationSink.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD906C1-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1TessellationSink : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct ID2D1TessellationSink : ID2D1TessellationSink.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1TessellationSink*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1TessellationSink*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1TessellationSink*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void AddTriangles([NativeTypeName("const D2D1_TRIANGLE *")] D2D1_TRIANGLE* triangles, [NativeTypeName("UINT32")] uint trianglesCount) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1TessellationSink*)Unsafe.AsPointer(ref this), triangles, trianglesCount); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT Close() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1TessellationSink*)Unsafe.AsPointer(ref this)); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - void AddTriangles([NativeTypeName("const D2D1_TRIANGLE *")] D2D1_TRIANGLE* triangles, [NativeTypeName("UINT32")] uint trianglesCount); - - [VtblIndex(4)] - HRESULT Close(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (const D2D1_TRIANGLE *, UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddTriangles; - - [NativeTypeName("HRESULT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Close; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1TransformedGeometry.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1TransformedGeometry.cs deleted file mode 100644 index d92e87b4..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1/ID2D1TransformedGeometry.cs +++ /dev/null @@ -1,284 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2CD906BB-12E2-11DC-9FED-001143A055F9")] - [NativeTypeName("struct ID2D1TransformedGeometry : ID2D1Geometry")] - [NativeInheritance("ID2D1Geometry")] - internal unsafe partial struct ID2D1TransformedGeometry : ID2D1TransformedGeometry.Interface - { - public void** lpVtbl; - - public HRESULT GetWidenedBounds(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return GetWidenedBounds(strokeWidth, strokeStyle, worldTransform, (0.25f), bounds); - } - - public HRESULT StrokeContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, BOOL* contains) - { - return StrokeContainsPoint(point, strokeWidth, strokeStyle, worldTransform, (0.25f), contains); - } - - public HRESULT FillContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, BOOL* contains) - { - return FillContainsPoint(point, worldTransform, (0.25f), contains); - } - - public HRESULT CompareWithGeometry(ID2D1Geometry* inputGeometry, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, D2D1_GEOMETRY_RELATION* relation) - { - return CompareWithGeometry(inputGeometry, inputGeometryTransform, (0.25f), relation); - } - - public HRESULT Simplify(D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return Simplify(simplificationOption, worldTransform, (0.25f), geometrySink); - } - - public HRESULT Tessellate([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1TessellationSink* tessellationSink) - { - return Tessellate(worldTransform, (0.25f), tessellationSink); - } - - public HRESULT CombineWithGeometry(ID2D1Geometry* inputGeometry, D2D1_COMBINE_MODE combineMode, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return CombineWithGeometry(inputGeometry, combineMode, inputGeometryTransform, (0.25f), geometrySink); - } - - public HRESULT Outline([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return Outline(worldTransform, (0.25f), geometrySink); - } - - public HRESULT ComputeArea([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float* area) - { - return ComputeArea(worldTransform, (0.25f), area); - } - - public HRESULT ComputeLength([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float* length) - { - return ComputeLength(worldTransform, (0.25f), length); - } - - public HRESULT ComputePointAtLength(float length, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* point, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* unitTangentVector) - { - return ComputePointAtLength(length, worldTransform, (0.25f), point, unitTangentVector); - } - - public HRESULT Widen(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, ID2D1SimplifiedGeometrySink* geometrySink) - { - return Widen(strokeWidth, strokeStyle, worldTransform, (0.25f), geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetBounds([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), worldTransform, bounds); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetWidenedBounds(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), strokeWidth, strokeStyle, worldTransform, flatteningTolerance, bounds); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT StrokeContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, BOOL* contains) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT FillContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, BOOL* contains) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT CompareWithGeometry(ID2D1Geometry* inputGeometry, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, float flatteningTolerance, D2D1_GEOMETRY_RELATION* relation) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), inputGeometry, inputGeometryTransform, flatteningTolerance, relation); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT Simplify(D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), simplificationOption, worldTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT Tessellate([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1TessellationSink* tessellationSink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, tessellationSink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CombineWithGeometry(ID2D1Geometry* inputGeometry, D2D1_COMBINE_MODE combineMode, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* inputGeometryTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), inputGeometry, combineMode, inputGeometryTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT Outline([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT ComputeArea([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, float* area) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, area); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT ComputeLength([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, float* length) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), worldTransform, flatteningTolerance, length); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT ComputePointAtLength(float length, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* point, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F* unitTangentVector) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT Widen(float strokeWidth, ID2D1StrokeStyle* strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), strokeWidth, strokeStyle, worldTransform, flatteningTolerance, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public void GetSourceGeometry(ID2D1Geometry** sourceGeometry) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), sourceGeometry); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public void GetTransform([NativeTypeName("D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), transform); - } - - public interface Interface : ID2D1Geometry.Interface - { - [VtblIndex(17)] - void GetSourceGeometry(ID2D1Geometry** sourceGeometry); - - [VtblIndex(18)] - void GetTransform([NativeTypeName("D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, D2D1_RECT_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBounds; - - [NativeTypeName("HRESULT (FLOAT, ID2D1StrokeStyle *, const D2D1_MATRIX_3X2_F *, FLOAT, D2D1_RECT_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetWidenedBounds1; - - [NativeTypeName("HRESULT (D2D1_POINT_2F, FLOAT, ID2D1StrokeStyle *, const D2D1_MATRIX_3X2_F *, FLOAT, BOOL *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] StrokeContainsPoint1; - - [NativeTypeName("HRESULT (D2D1_POINT_2F, const D2D1_MATRIX_3X2_F *, FLOAT, BOOL *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillContainsPoint1; - - [NativeTypeName("HRESULT (ID2D1Geometry *, const D2D1_MATRIX_3X2_F *, FLOAT, D2D1_GEOMETRY_RELATION *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CompareWithGeometry1; - - [NativeTypeName("HRESULT (D2D1_GEOMETRY_SIMPLIFICATION_OPTION, const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Simplify1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1TessellationSink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Tessellate1; - - [NativeTypeName("HRESULT (ID2D1Geometry *, D2D1_COMBINE_MODE, const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CombineWithGeometry1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Outline1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, FLOAT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ComputeArea1; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *, FLOAT, FLOAT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ComputeLength1; - - [NativeTypeName("HRESULT (FLOAT, const D2D1_MATRIX_3X2_F *, FLOAT, D2D1_POINT_2F *, D2D1_POINT_2F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ComputePointAtLength1; - - [NativeTypeName("HRESULT (FLOAT, ID2D1StrokeStyle *, const D2D1_MATRIX_3X2_F *, FLOAT, ID2D1SimplifiedGeometrySink *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Widen1; - - [NativeTypeName("void (ID2D1Geometry **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSourceGeometry; - - [NativeTypeName("void (D2D1_MATRIX_3X2_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTransform; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_BITMAP_BRUSH_PROPERTIES1.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_BITMAP_BRUSH_PROPERTIES1.cs deleted file mode 100644 index d38b089f..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_BITMAP_BRUSH_PROPERTIES1.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D1_BITMAP_BRUSH_PROPERTIES1 - { - public D2D1_EXTEND_MODE extendModeX; - - public D2D1_EXTEND_MODE extendModeY; - - public D2D1_INTERPOLATION_MODE interpolationMode; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_BITMAP_OPTIONS.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_BITMAP_OPTIONS.cs deleted file mode 100644 index cd42cd25..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_BITMAP_OPTIONS.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.DirectX -{ - [Flags] - internal enum D2D1_BITMAP_OPTIONS : uint - { - D2D1_BITMAP_OPTIONS_NONE = 0x00000000, - D2D1_BITMAP_OPTIONS_TARGET = 0x00000001, - D2D1_BITMAP_OPTIONS_CANNOT_DRAW = 0x00000002, - D2D1_BITMAP_OPTIONS_CPU_READ = 0x00000004, - D2D1_BITMAP_OPTIONS_GDI_COMPATIBLE = 0x00000008, - D2D1_BITMAP_OPTIONS_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_BITMAP_PROPERTIES1.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_BITMAP_PROPERTIES1.cs deleted file mode 100644 index 04733396..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_BITMAP_PROPERTIES1.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D2D1_BITMAP_PROPERTIES1 - { - public D2D1_PIXEL_FORMAT pixelFormat; - - public float dpiX; - - public float dpiY; - - public D2D1_BITMAP_OPTIONS bitmapOptions; - - public ID2D1ColorContext* colorContext; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_BUFFER_PRECISION.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_BUFFER_PRECISION.cs deleted file mode 100644 index 93a52a46..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_BUFFER_PRECISION.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_BUFFER_PRECISION : uint - { - D2D1_BUFFER_PRECISION_UNKNOWN = 0, - D2D1_BUFFER_PRECISION_8BPC_UNORM = 1, - D2D1_BUFFER_PRECISION_8BPC_UNORM_SRGB = 2, - D2D1_BUFFER_PRECISION_16BPC_UNORM = 3, - D2D1_BUFFER_PRECISION_16BPC_FLOAT = 4, - D2D1_BUFFER_PRECISION_32BPC_FLOAT = 5, - D2D1_BUFFER_PRECISION_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_COLOR_INTERPOLATION_MODE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_COLOR_INTERPOLATION_MODE.cs deleted file mode 100644 index d865c032..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_COLOR_INTERPOLATION_MODE.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_COLOR_INTERPOLATION_MODE : uint - { - D2D1_COLOR_INTERPOLATION_MODE_STRAIGHT = 0, - D2D1_COLOR_INTERPOLATION_MODE_PREMULTIPLIED = 1, - D2D1_COLOR_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_COLOR_SPACE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_COLOR_SPACE.cs deleted file mode 100644 index 5e2901e1..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_COLOR_SPACE.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_COLOR_SPACE : uint - { - D2D1_COLOR_SPACE_CUSTOM = 0, - D2D1_COLOR_SPACE_SRGB = 1, - D2D1_COLOR_SPACE_SCRGB = 2, - D2D1_COLOR_SPACE_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_COMPOSITE_MODE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_COMPOSITE_MODE.cs deleted file mode 100644 index 16e49c0d..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_COMPOSITE_MODE.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_COMPOSITE_MODE : uint - { - D2D1_COMPOSITE_MODE_SOURCE_OVER = 0, - D2D1_COMPOSITE_MODE_DESTINATION_OVER = 1, - D2D1_COMPOSITE_MODE_SOURCE_IN = 2, - D2D1_COMPOSITE_MODE_DESTINATION_IN = 3, - D2D1_COMPOSITE_MODE_SOURCE_OUT = 4, - D2D1_COMPOSITE_MODE_DESTINATION_OUT = 5, - D2D1_COMPOSITE_MODE_SOURCE_ATOP = 6, - D2D1_COMPOSITE_MODE_DESTINATION_ATOP = 7, - D2D1_COMPOSITE_MODE_XOR = 8, - D2D1_COMPOSITE_MODE_PLUS = 9, - D2D1_COMPOSITE_MODE_SOURCE_COPY = 10, - D2D1_COMPOSITE_MODE_BOUNDED_SOURCE_COPY = 11, - D2D1_COMPOSITE_MODE_MASK_INVERT = 12, - D2D1_COMPOSITE_MODE_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_DEVICE_CONTEXT_OPTIONS.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_DEVICE_CONTEXT_OPTIONS.cs deleted file mode 100644 index cedbbef1..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_DEVICE_CONTEXT_OPTIONS.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.DirectX -{ - [Flags] - internal enum D2D1_DEVICE_CONTEXT_OPTIONS : uint - { - D2D1_DEVICE_CONTEXT_OPTIONS_NONE = 0, - D2D1_DEVICE_CONTEXT_OPTIONS_ENABLE_MULTITHREADED_OPTIMIZATIONS = 1, - D2D1_DEVICE_CONTEXT_OPTIONS_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_EFFECT_INPUT_DESCRIPTION.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_EFFECT_INPUT_DESCRIPTION.cs deleted file mode 100644 index 2fd43436..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_EFFECT_INPUT_DESCRIPTION.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D2D1_EFFECT_INPUT_DESCRIPTION - { - public ID2D1Effect* effect; - - [NativeTypeName("UINT32")] - public uint inputIndex; - - [NativeTypeName("D2D1_RECT_F")] - public D2D_RECT_F inputRectangle; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_IMAGE_BRUSH_PROPERTIES.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_IMAGE_BRUSH_PROPERTIES.cs deleted file mode 100644 index 695f9d81..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_IMAGE_BRUSH_PROPERTIES.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D1_IMAGE_BRUSH_PROPERTIES - { - [NativeTypeName("D2D1_RECT_F")] - public D2D_RECT_F sourceRectangle; - - public D2D1_EXTEND_MODE extendModeX; - - public D2D1_EXTEND_MODE extendModeY; - - public D2D1_INTERPOLATION_MODE interpolationMode; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_INTERPOLATION_MODE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_INTERPOLATION_MODE.cs deleted file mode 100644 index be207b97..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_INTERPOLATION_MODE.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using static TerraFX.Interop.DirectX.D2D1_INTERPOLATION_MODE_DEFINITION; - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_INTERPOLATION_MODE : uint - { - D2D1_INTERPOLATION_MODE_NEAREST_NEIGHBOR = D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR, - D2D1_INTERPOLATION_MODE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR, - D2D1_INTERPOLATION_MODE_CUBIC = D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC, - D2D1_INTERPOLATION_MODE_MULTI_SAMPLE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR, - D2D1_INTERPOLATION_MODE_ANISOTROPIC = D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC, - D2D1_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC = D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC, - D2D1_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_LAYER_OPTIONS1.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_LAYER_OPTIONS1.cs deleted file mode 100644 index 5d823ed1..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_LAYER_OPTIONS1.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.DirectX -{ - [Flags] - internal enum D2D1_LAYER_OPTIONS1 : uint - { - D2D1_LAYER_OPTIONS1_NONE = 0, - D2D1_LAYER_OPTIONS1_INITIALIZE_FROM_BACKGROUND = 1, - D2D1_LAYER_OPTIONS1_IGNORE_ALPHA = 2, - D2D1_LAYER_OPTIONS1_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_LAYER_PARAMETERS1.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_LAYER_PARAMETERS1.cs deleted file mode 100644 index 9397f48a..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_LAYER_PARAMETERS1.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D2D1_LAYER_PARAMETERS1 - { - [NativeTypeName("D2D1_RECT_F")] - public D2D_RECT_F contentBounds; - - public ID2D1Geometry* geometricMask; - - public D2D1_ANTIALIAS_MODE maskAntialiasMode; - - [NativeTypeName("D2D1_MATRIX_3X2_F")] - public D2D_MATRIX_3X2_F maskTransform; - - public float opacity; - - public ID2D1Brush* opacityBrush; - - public D2D1_LAYER_OPTIONS1 layerOptions; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_MAPPED_RECT.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_MAPPED_RECT.cs deleted file mode 100644 index 47111083..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_MAPPED_RECT.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D2D1_MAPPED_RECT - { - [NativeTypeName("UINT32")] - public uint pitch; - - public byte* bits; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_MAP_OPTIONS.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_MAP_OPTIONS.cs deleted file mode 100644 index 3a195ba2..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_MAP_OPTIONS.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.DirectX -{ - [Flags] - internal enum D2D1_MAP_OPTIONS : uint - { - D2D1_MAP_OPTIONS_NONE = 0, - D2D1_MAP_OPTIONS_READ = 1, - D2D1_MAP_OPTIONS_WRITE = 2, - D2D1_MAP_OPTIONS_DISCARD = 4, - D2D1_MAP_OPTIONS_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_PRIMITIVE_BLEND.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_PRIMITIVE_BLEND.cs deleted file mode 100644 index 9f034568..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_PRIMITIVE_BLEND.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_PRIMITIVE_BLEND : uint - { - D2D1_PRIMITIVE_BLEND_SOURCE_OVER = 0, - D2D1_PRIMITIVE_BLEND_COPY = 1, - D2D1_PRIMITIVE_BLEND_MIN = 2, - D2D1_PRIMITIVE_BLEND_ADD = 3, - D2D1_PRIMITIVE_BLEND_MAX = 4, - D2D1_PRIMITIVE_BLEND_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_PRINT_CONTROL_PROPERTIES.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_PRINT_CONTROL_PROPERTIES.cs deleted file mode 100644 index 039c2668..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_PRINT_CONTROL_PROPERTIES.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D1_PRINT_CONTROL_PROPERTIES - { - public D2D1_PRINT_FONT_SUBSET_MODE fontSubset; - - public float rasterDPI; - - public D2D1_COLOR_SPACE colorSpace; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_PRINT_FONT_SUBSET_MODE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_PRINT_FONT_SUBSET_MODE.cs deleted file mode 100644 index 270ea4b9..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_PRINT_FONT_SUBSET_MODE.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_PRINT_FONT_SUBSET_MODE : uint - { - D2D1_PRINT_FONT_SUBSET_MODE_DEFAULT = 0, - D2D1_PRINT_FONT_SUBSET_MODE_EACHPAGE = 1, - D2D1_PRINT_FONT_SUBSET_MODE_NONE = 2, - D2D1_PRINT_FONT_SUBSET_MODE_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_PROPERTY_TYPE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_PROPERTY_TYPE.cs deleted file mode 100644 index 0abcfd78..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_PROPERTY_TYPE.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_PROPERTY_TYPE : uint - { - D2D1_PROPERTY_TYPE_UNKNOWN = 0, - D2D1_PROPERTY_TYPE_STRING = 1, - D2D1_PROPERTY_TYPE_BOOL = 2, - D2D1_PROPERTY_TYPE_UINT32 = 3, - D2D1_PROPERTY_TYPE_INT32 = 4, - D2D1_PROPERTY_TYPE_FLOAT = 5, - D2D1_PROPERTY_TYPE_VECTOR2 = 6, - D2D1_PROPERTY_TYPE_VECTOR3 = 7, - D2D1_PROPERTY_TYPE_VECTOR4 = 8, - D2D1_PROPERTY_TYPE_BLOB = 9, - D2D1_PROPERTY_TYPE_IUNKNOWN = 10, - D2D1_PROPERTY_TYPE_ENUM = 11, - D2D1_PROPERTY_TYPE_ARRAY = 12, - D2D1_PROPERTY_TYPE_CLSID = 13, - D2D1_PROPERTY_TYPE_MATRIX_3X2 = 14, - D2D1_PROPERTY_TYPE_MATRIX_4X3 = 15, - D2D1_PROPERTY_TYPE_MATRIX_4X4 = 16, - D2D1_PROPERTY_TYPE_MATRIX_5X4 = 17, - D2D1_PROPERTY_TYPE_COLOR_CONTEXT = 18, - D2D1_PROPERTY_TYPE_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_RENDERING_CONTROLS.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_RENDERING_CONTROLS.cs deleted file mode 100644 index 73784561..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_RENDERING_CONTROLS.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D1_RENDERING_CONTROLS - { - public D2D1_BUFFER_PRECISION bufferPrecision; - - [NativeTypeName("D2D1_SIZE_U")] - public D2D_SIZE_U tileSize; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_UNIT_MODE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_UNIT_MODE.cs deleted file mode 100644 index f8682fd0..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/D2D1_UNIT_MODE.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_UNIT_MODE : uint - { - D2D1_UNIT_MODE_DIPS = 0, - D2D1_UNIT_MODE_PIXELS = 1, - D2D1_UNIT_MODE_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1Bitmap1.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1Bitmap1.cs deleted file mode 100644 index 09df64df..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1Bitmap1.cs +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("A898A84C-3873-4588-B08B-EBBF978DF041")] - [NativeTypeName("struct ID2D1Bitmap1 : ID2D1Bitmap")] - [NativeInheritance("ID2D1Bitmap")] - internal unsafe partial struct ID2D1Bitmap1 : ID2D1Bitmap1.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - [return: NativeTypeName("D2D1_SIZE_F")] - public D2D_SIZE_F GetSize() - { - D2D_SIZE_F result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - [return: NativeTypeName("D2D1_SIZE_U")] - public D2D_SIZE_U GetPixelSize() - { - D2D_SIZE_U result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public D2D1_PIXEL_FORMAT GetPixelFormat() - { - D2D1_PIXEL_FORMAT result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public void GetDpi(float* dpiX, float* dpiY) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), dpiX, dpiY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT CopyFromBitmap([NativeTypeName("const D2D1_POINT_2U *")] D2D_POINT_2U* destPoint, ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_RECT_U *")] D2D_RECT_U* srcRect) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), destPoint, bitmap, srcRect); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT CopyFromRenderTarget([NativeTypeName("const D2D1_POINT_2U *")] D2D_POINT_2U* destPoint, ID2D1RenderTarget* renderTarget, [NativeTypeName("const D2D1_RECT_U *")] D2D_RECT_U* srcRect) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), destPoint, renderTarget, srcRect); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT CopyFromMemory([NativeTypeName("const D2D1_RECT_U *")] D2D_RECT_U* dstRect, [NativeTypeName("const void *")] void* srcData, [NativeTypeName("UINT32")] uint pitch) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), dstRect, srcData, pitch); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public void GetColorContext(ID2D1ColorContext** colorContext) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), colorContext); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public D2D1_BITMAP_OPTIONS GetOptions() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT GetSurface(IDXGISurface** dxgiSurface) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), dxgiSurface); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT Map(D2D1_MAP_OPTIONS options, D2D1_MAPPED_RECT* mappedRect) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), options, mappedRect); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT Unmap() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this)); - } - - public interface Interface : ID2D1Bitmap.Interface - { - [VtblIndex(11)] - void GetColorContext(ID2D1ColorContext** colorContext); - - [VtblIndex(12)] - D2D1_BITMAP_OPTIONS GetOptions(); - - [VtblIndex(13)] - HRESULT GetSurface(IDXGISurface** dxgiSurface); - - [VtblIndex(14)] - HRESULT Map(D2D1_MAP_OPTIONS options, D2D1_MAPPED_RECT* mappedRect); - - [VtblIndex(15)] - HRESULT Unmap(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("D2D1_SIZE_F () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSize; - - [NativeTypeName("D2D1_SIZE_U () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelSize; - - [NativeTypeName("D2D1_PIXEL_FORMAT () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelFormat; - - [NativeTypeName("void (FLOAT *, FLOAT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDpi; - - [NativeTypeName("HRESULT (const D2D1_POINT_2U *, ID2D1Bitmap *, const D2D1_RECT_U *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyFromBitmap; - - [NativeTypeName("HRESULT (const D2D1_POINT_2U *, ID2D1RenderTarget *, const D2D1_RECT_U *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyFromRenderTarget; - - [NativeTypeName("HRESULT (const D2D1_RECT_U *, const void *, UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyFromMemory; - - [NativeTypeName("void (ID2D1ColorContext **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetColorContext; - - [NativeTypeName("D2D1_BITMAP_OPTIONS () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetOptions; - - [NativeTypeName("HRESULT (IDXGISurface **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSurface; - - [NativeTypeName("HRESULT (D2D1_MAP_OPTIONS, D2D1_MAPPED_RECT *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Map; - - [NativeTypeName("HRESULT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Unmap; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1BitmapBrush1.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1BitmapBrush1.cs deleted file mode 100644 index d47a771c..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1BitmapBrush1.cs +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("41343A53-E41A-49A2-91CD-21793BBB62E5")] - [NativeTypeName("struct ID2D1BitmapBrush1 : ID2D1BitmapBrush")] - [NativeInheritance("ID2D1BitmapBrush")] - internal unsafe partial struct ID2D1BitmapBrush1 : ID2D1BitmapBrush1.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1BitmapBrush1*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1BitmapBrush1*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1BitmapBrush1*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1BitmapBrush1*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public void SetOpacity(float opacity) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1BitmapBrush1*)Unsafe.AsPointer(ref this), opacity); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public void SetTransform([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1BitmapBrush1*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public float GetOpacity() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1BitmapBrush1*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public void GetTransform([NativeTypeName("D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1BitmapBrush1*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public void SetExtendModeX(D2D1_EXTEND_MODE extendModeX) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1BitmapBrush1*)Unsafe.AsPointer(ref this), extendModeX); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public void SetExtendModeY(D2D1_EXTEND_MODE extendModeY) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1BitmapBrush1*)Unsafe.AsPointer(ref this), extendModeY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public void SetInterpolationMode(D2D1_BITMAP_INTERPOLATION_MODE interpolationMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1BitmapBrush1*)Unsafe.AsPointer(ref this), interpolationMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public void SetBitmap(ID2D1Bitmap* bitmap) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1BitmapBrush1*)Unsafe.AsPointer(ref this), bitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public D2D1_EXTEND_MODE GetExtendModeX() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1BitmapBrush1*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public D2D1_EXTEND_MODE GetExtendModeY() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1BitmapBrush1*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public D2D1_BITMAP_INTERPOLATION_MODE GetInterpolationMode() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1BitmapBrush1*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public void GetBitmap(ID2D1Bitmap** bitmap) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1BitmapBrush1*)Unsafe.AsPointer(ref this), bitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public void SetInterpolationMode1(D2D1_INTERPOLATION_MODE interpolationMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((ID2D1BitmapBrush1*)Unsafe.AsPointer(ref this), interpolationMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public D2D1_INTERPOLATION_MODE GetInterpolationMode1() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((ID2D1BitmapBrush1*)Unsafe.AsPointer(ref this)); - } - - public interface Interface : ID2D1BitmapBrush.Interface - { - [VtblIndex(16)] - void SetInterpolationMode1(D2D1_INTERPOLATION_MODE interpolationMode); - - [VtblIndex(17)] - D2D1_INTERPOLATION_MODE GetInterpolationMode1(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("void (FLOAT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetOpacity; - - [NativeTypeName("void (const D2D1_MATRIX_3X2_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTransform; - - [NativeTypeName("FLOAT () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetOpacity; - - [NativeTypeName("void (D2D1_MATRIX_3X2_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTransform; - - [NativeTypeName("void (D2D1_EXTEND_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetExtendModeX; - - [NativeTypeName("void (D2D1_EXTEND_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetExtendModeY; - - [NativeTypeName("void (D2D1_BITMAP_INTERPOLATION_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetInterpolationMode; - - [NativeTypeName("void (ID2D1Bitmap *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetBitmap; - - [NativeTypeName("D2D1_EXTEND_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetExtendModeX; - - [NativeTypeName("D2D1_EXTEND_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetExtendModeY; - - [NativeTypeName("D2D1_BITMAP_INTERPOLATION_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetInterpolationMode; - - [NativeTypeName("void (ID2D1Bitmap **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBitmap; - - [NativeTypeName("void (D2D1_INTERPOLATION_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetInterpolationMode1; - - [NativeTypeName("D2D1_INTERPOLATION_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetInterpolationMode1; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1ColorContext.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1ColorContext.cs deleted file mode 100644 index ad08942e..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1ColorContext.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("1C4820BB-5771-4518-A581-2FE4DD0EC657")] - [NativeTypeName("struct ID2D1ColorContext : ID2D1Resource")] - [NativeInheritance("ID2D1Resource")] - internal unsafe partial struct ID2D1ColorContext : ID2D1ColorContext.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1ColorContext*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1ColorContext*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1ColorContext*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1ColorContext*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public D2D1_COLOR_SPACE GetColorSpace() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1ColorContext*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - [return: NativeTypeName("UINT32")] - public uint GetProfileSize() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1ColorContext*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetProfile(byte* profile, [NativeTypeName("UINT32")] uint profileSize) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1ColorContext*)Unsafe.AsPointer(ref this), profile, profileSize); - } - - public interface Interface : ID2D1Resource.Interface - { - [VtblIndex(4)] - D2D1_COLOR_SPACE GetColorSpace(); - - [VtblIndex(5)] - [return: NativeTypeName("UINT32")] - uint GetProfileSize(); - - [VtblIndex(6)] - HRESULT GetProfile(byte* profile, [NativeTypeName("UINT32")] uint profileSize); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("D2D1_COLOR_SPACE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetColorSpace; - - [NativeTypeName("UINT32 () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetProfileSize; - - [NativeTypeName("HRESULT (BYTE *, UINT32) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetProfile; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1CommandList.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1CommandList.cs deleted file mode 100644 index 0fdd9e69..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1CommandList.cs +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("B4F34A19-2383-4D76-94F6-EC343657C3DC")] - [NativeTypeName("struct ID2D1CommandList : ID2D1Image")] - [NativeInheritance("ID2D1Image")] - internal unsafe partial struct ID2D1CommandList : ID2D1CommandList.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1CommandList*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1CommandList*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1CommandList*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1CommandList*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT Stream(ID2D1CommandSink* sink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1CommandList*)Unsafe.AsPointer(ref this), sink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT Close() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1CommandList*)Unsafe.AsPointer(ref this)); - } - - public interface Interface : ID2D1Image.Interface - { - [VtblIndex(4)] - HRESULT Stream(ID2D1CommandSink* sink); - - [VtblIndex(5)] - HRESULT Close(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("HRESULT (ID2D1CommandSink *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Stream; - - [NativeTypeName("HRESULT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Close; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1CommandSink.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1CommandSink.cs deleted file mode 100644 index 2432a922..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1CommandSink.cs +++ /dev/null @@ -1,383 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("54D7898A-A061-40A7-BEC7-E465BCBA2C4F")] - [NativeTypeName("struct ID2D1CommandSink : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct ID2D1CommandSink : ID2D1CommandSink.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT BeginDraw() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT EndDraw() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT SetAntialiasMode(D2D1_ANTIALIAS_MODE antialiasMode) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), antialiasMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT SetTags([NativeTypeName("D2D1_TAG")] ulong tag1, [NativeTypeName("D2D1_TAG")] ulong tag2) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT SetTextAntialiasMode(D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), textAntialiasMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT SetTextRenderingParams(IDWriteRenderingParams* textRenderingParams) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), textRenderingParams); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT SetTransform([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT SetPrimitiveBlend(D2D1_PRIMITIVE_BLEND primitiveBlend) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), primitiveBlend); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT SetUnitMode(D2D1_UNIT_MODE unitMode) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), unitMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT Clear([NativeTypeName("const D2D1_COLOR_F *")] DXGI_RGBA* color) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), color); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT DrawGlyphRun([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F baselineOrigin, [NativeTypeName("const DWRITE_GLYPH_RUN *")] DWRITE_GLYPH_RUN* glyphRun, [NativeTypeName("const DWRITE_GLYPH_RUN_DESCRIPTION *")] DWRITE_GLYPH_RUN_DESCRIPTION* glyphRunDescription, ID2D1Brush* foregroundBrush, DWRITE_MEASURING_MODE measuringMode) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT DrawLine([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point0, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT DrawGeometry(ID2D1Geometry* geometry, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), geometry, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT DrawRectangle([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* rect, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), rect, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public HRESULT DrawBitmap(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* destinationRectangle, float opacity, D2D1_INTERPOLATION_MODE interpolationMode, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle, [NativeTypeName("const D2D1_MATRIX_4X4_F *")] D2D_MATRIX_4X4_F* perspectiveTransform) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle, perspectiveTransform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public HRESULT DrawImage(ID2D1Image* image, [NativeTypeName("const D2D1_POINT_2F *")] D2D_POINT_2F* targetOffset, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* imageRectangle, D2D1_INTERPOLATION_MODE interpolationMode, D2D1_COMPOSITE_MODE compositeMode) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(19)] - public HRESULT DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, [NativeTypeName("const D2D1_POINT_2F *")] D2D_POINT_2F* targetOffset) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(20)] - public HRESULT FillMesh(ID2D1Mesh* mesh, ID2D1Brush* brush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), mesh, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(21)] - public HRESULT FillOpacityMask(ID2D1Bitmap* opacityMask, ID2D1Brush* brush, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* destinationRectangle, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), opacityMask, brush, destinationRectangle, sourceRectangle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(22)] - public HRESULT FillGeometry(ID2D1Geometry* geometry, ID2D1Brush* brush, ID2D1Brush* opacityBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), geometry, brush, opacityBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(23)] - public HRESULT FillRectangle([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* rect, ID2D1Brush* brush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[23]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), rect, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(24)] - public HRESULT PushAxisAlignedClip([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* clipRect, D2D1_ANTIALIAS_MODE antialiasMode) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[24]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), clipRect, antialiasMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(25)] - public HRESULT PushLayer([NativeTypeName("const D2D1_LAYER_PARAMETERS1 *")] D2D1_LAYER_PARAMETERS1* layerParameters1, ID2D1Layer* layer) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[25]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), layerParameters1, layer); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(26)] - public HRESULT PopAxisAlignedClip() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[26]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(27)] - public HRESULT PopLayer() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[27]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this)); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT BeginDraw(); - - [VtblIndex(4)] - HRESULT EndDraw(); - - [VtblIndex(5)] - HRESULT SetAntialiasMode(D2D1_ANTIALIAS_MODE antialiasMode); - - [VtblIndex(6)] - HRESULT SetTags([NativeTypeName("D2D1_TAG")] ulong tag1, [NativeTypeName("D2D1_TAG")] ulong tag2); - - [VtblIndex(7)] - HRESULT SetTextAntialiasMode(D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode); - - [VtblIndex(8)] - HRESULT SetTextRenderingParams(IDWriteRenderingParams* textRenderingParams); - - [VtblIndex(9)] - HRESULT SetTransform([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform); - - [VtblIndex(10)] - HRESULT SetPrimitiveBlend(D2D1_PRIMITIVE_BLEND primitiveBlend); - - [VtblIndex(11)] - HRESULT SetUnitMode(D2D1_UNIT_MODE unitMode); - - [VtblIndex(12)] - HRESULT Clear([NativeTypeName("const D2D1_COLOR_F *")] DXGI_RGBA* color); - - [VtblIndex(13)] - HRESULT DrawGlyphRun([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F baselineOrigin, [NativeTypeName("const DWRITE_GLYPH_RUN *")] DWRITE_GLYPH_RUN* glyphRun, [NativeTypeName("const DWRITE_GLYPH_RUN_DESCRIPTION *")] DWRITE_GLYPH_RUN_DESCRIPTION* glyphRunDescription, ID2D1Brush* foregroundBrush, DWRITE_MEASURING_MODE measuringMode); - - [VtblIndex(14)] - HRESULT DrawLine([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point0, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle); - - [VtblIndex(15)] - HRESULT DrawGeometry(ID2D1Geometry* geometry, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle); - - [VtblIndex(16)] - HRESULT DrawRectangle([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* rect, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle); - - [VtblIndex(17)] - HRESULT DrawBitmap(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* destinationRectangle, float opacity, D2D1_INTERPOLATION_MODE interpolationMode, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle, [NativeTypeName("const D2D1_MATRIX_4X4_F *")] D2D_MATRIX_4X4_F* perspectiveTransform); - - [VtblIndex(18)] - HRESULT DrawImage(ID2D1Image* image, [NativeTypeName("const D2D1_POINT_2F *")] D2D_POINT_2F* targetOffset, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* imageRectangle, D2D1_INTERPOLATION_MODE interpolationMode, D2D1_COMPOSITE_MODE compositeMode); - - [VtblIndex(19)] - HRESULT DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, [NativeTypeName("const D2D1_POINT_2F *")] D2D_POINT_2F* targetOffset); - - [VtblIndex(20)] - HRESULT FillMesh(ID2D1Mesh* mesh, ID2D1Brush* brush); - - [VtblIndex(21)] - HRESULT FillOpacityMask(ID2D1Bitmap* opacityMask, ID2D1Brush* brush, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* destinationRectangle, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle); - - [VtblIndex(22)] - HRESULT FillGeometry(ID2D1Geometry* geometry, ID2D1Brush* brush, ID2D1Brush* opacityBrush); - - [VtblIndex(23)] - HRESULT FillRectangle([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* rect, ID2D1Brush* brush); - - [VtblIndex(24)] - HRESULT PushAxisAlignedClip([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* clipRect, D2D1_ANTIALIAS_MODE antialiasMode); - - [VtblIndex(25)] - HRESULT PushLayer([NativeTypeName("const D2D1_LAYER_PARAMETERS1 *")] D2D1_LAYER_PARAMETERS1* layerParameters1, ID2D1Layer* layer); - - [VtblIndex(26)] - HRESULT PopAxisAlignedClip(); - - [VtblIndex(27)] - HRESULT PopLayer(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] BeginDraw; - - [NativeTypeName("HRESULT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EndDraw; - - [NativeTypeName("HRESULT (D2D1_ANTIALIAS_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetAntialiasMode; - - [NativeTypeName("HRESULT (D2D1_TAG, D2D1_TAG) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTags; - - [NativeTypeName("HRESULT (D2D1_TEXT_ANTIALIAS_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTextAntialiasMode; - - [NativeTypeName("HRESULT (IDWriteRenderingParams *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTextRenderingParams; - - [NativeTypeName("HRESULT (const D2D1_MATRIX_3X2_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTransform; - - [NativeTypeName("HRESULT (D2D1_PRIMITIVE_BLEND) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrimitiveBlend; - - [NativeTypeName("HRESULT (D2D1_UNIT_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetUnitMode; - - [NativeTypeName("HRESULT (const D2D1_COLOR_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Clear; - - [NativeTypeName("HRESULT (D2D1_POINT_2F, const DWRITE_GLYPH_RUN *, const DWRITE_GLYPH_RUN_DESCRIPTION *, ID2D1Brush *, DWRITE_MEASURING_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawGlyphRun; - - [NativeTypeName("HRESULT (D2D1_POINT_2F, D2D1_POINT_2F, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawLine; - - [NativeTypeName("HRESULT (ID2D1Geometry *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawGeometry; - - [NativeTypeName("HRESULT (const D2D1_RECT_F *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawRectangle; - - [NativeTypeName("HRESULT (ID2D1Bitmap *, const D2D1_RECT_F *, FLOAT, D2D1_INTERPOLATION_MODE, const D2D1_RECT_F *, const D2D1_MATRIX_4X4_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawBitmap; - - [NativeTypeName("HRESULT (ID2D1Image *, const D2D1_POINT_2F *, const D2D1_RECT_F *, D2D1_INTERPOLATION_MODE, D2D1_COMPOSITE_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawImage; - - [NativeTypeName("HRESULT (ID2D1GdiMetafile *, const D2D1_POINT_2F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawGdiMetafile; - - [NativeTypeName("HRESULT (ID2D1Mesh *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillMesh; - - [NativeTypeName("HRESULT (ID2D1Bitmap *, ID2D1Brush *, const D2D1_RECT_F *, const D2D1_RECT_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillOpacityMask; - - [NativeTypeName("HRESULT (ID2D1Geometry *, ID2D1Brush *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillGeometry; - - [NativeTypeName("HRESULT (const D2D1_RECT_F *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillRectangle; - - [NativeTypeName("HRESULT (const D2D1_RECT_F *, D2D1_ANTIALIAS_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PushAxisAlignedClip; - - [NativeTypeName("HRESULT (const D2D1_LAYER_PARAMETERS1 *, ID2D1Layer *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PushLayer; - - [NativeTypeName("HRESULT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PopAxisAlignedClip; - - [NativeTypeName("HRESULT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PopLayer; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1Device.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1Device.cs deleted file mode 100644 index 5ae454cf..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1Device.cs +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("47DD575D-AC05-4CDD-8049-9B02CD16F44C")] - [NativeTypeName("struct ID2D1Device : ID2D1Resource")] - [NativeInheritance("ID2D1Resource")] - internal unsafe partial struct ID2D1Device : ID2D1Device.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1Device*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1Device*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1Device*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1Device*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT CreateDeviceContext(D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext** deviceContext) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1Device*)Unsafe.AsPointer(ref this), options, deviceContext); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT CreatePrintControl(IWICImagingFactory* wicFactory, IPrintDocumentPackageTarget* documentTarget, [NativeTypeName("const D2D1_PRINT_CONTROL_PROPERTIES *")] D2D1_PRINT_CONTROL_PROPERTIES* printControlProperties, ID2D1PrintControl** printControl) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1Device*)Unsafe.AsPointer(ref this), wicFactory, documentTarget, printControlProperties, printControl); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public void SetMaximumTextureMemory([NativeTypeName("UINT64")] ulong maximumInBytes) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1Device*)Unsafe.AsPointer(ref this), maximumInBytes); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - [return: NativeTypeName("UINT64")] - public ulong GetMaximumTextureMemory() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1Device*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public void ClearResources([NativeTypeName("UINT32")] uint millisecondsSinceUse = 0) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1Device*)Unsafe.AsPointer(ref this), millisecondsSinceUse); - } - - public interface Interface : ID2D1Resource.Interface - { - [VtblIndex(4)] - HRESULT CreateDeviceContext(D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext** deviceContext); - - [VtblIndex(5)] - HRESULT CreatePrintControl(IWICImagingFactory* wicFactory, IPrintDocumentPackageTarget* documentTarget, [NativeTypeName("const D2D1_PRINT_CONTROL_PROPERTIES *")] D2D1_PRINT_CONTROL_PROPERTIES* printControlProperties, ID2D1PrintControl** printControl); - - [VtblIndex(6)] - void SetMaximumTextureMemory([NativeTypeName("UINT64")] ulong maximumInBytes); - - [VtblIndex(7)] - [return: NativeTypeName("UINT64")] - ulong GetMaximumTextureMemory(); - - [VtblIndex(8)] - void ClearResources([NativeTypeName("UINT32")] uint millisecondsSinceUse = 0); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("HRESULT (D2D1_DEVICE_CONTEXT_OPTIONS, ID2D1DeviceContext **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateDeviceContext; - - [NativeTypeName("HRESULT (IWICImagingFactory *, IPrintDocumentPackageTarget *, const D2D1_PRINT_CONTROL_PROPERTIES *, ID2D1PrintControl **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreatePrintControl; - - [NativeTypeName("void (UINT64) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetMaximumTextureMemory; - - [NativeTypeName("UINT64 () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMaximumTextureMemory; - - [NativeTypeName("void (UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ClearResources; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1DeviceContext.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1DeviceContext.cs deleted file mode 100644 index d3d7ab4a..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1DeviceContext.cs +++ /dev/null @@ -1,1206 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; -using static TerraFX.Interop.DirectX.D2D1_BITMAP_INTERPOLATION_MODE; -using static TerraFX.Interop.DirectX.D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS; -using static TerraFX.Interop.DirectX.D2D1_COMPOSITE_MODE; -using static TerraFX.Interop.DirectX.D2D1_DRAW_TEXT_OPTIONS; -using static TerraFX.Interop.DirectX.D2D1_EXTEND_MODE; -using static TerraFX.Interop.DirectX.D2D1_GAMMA; -using static TerraFX.Interop.DirectX.D2D1_INTERPOLATION_MODE; -using static TerraFX.Interop.DirectX.DWRITE_MEASURING_MODE; - -namespace TerraFX.Interop.DirectX -{ - [Guid("E8F7FE7A-191C-466D-AD95-975678BDA998")] - [NativeTypeName("struct ID2D1DeviceContext : ID2D1RenderTarget")] - [NativeInheritance("ID2D1RenderTarget")] - internal unsafe partial struct ID2D1DeviceContext : ID2D1DeviceContext.Interface - { - public void** lpVtbl; - - public HRESULT CreateBitmap([NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U size, [NativeTypeName("const D2D1_BITMAP_PROPERTIES &")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap) - { - return CreateBitmap(size, null, 0, bitmapProperties, bitmap); - } - - public HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource* wicBitmapSource, ID2D1Bitmap** bitmap) - { - return CreateBitmapFromWicBitmap(wicBitmapSource, null, bitmap); - } - - public HRESULT CreateBitmapBrush(ID2D1Bitmap* bitmap, ID2D1BitmapBrush** bitmapBrush) - { - return CreateBitmapBrush(bitmap, null, null, bitmapBrush); - } - - public HRESULT CreateBitmapBrush(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_BITMAP_BRUSH_PROPERTIES &")] D2D1_BITMAP_BRUSH_PROPERTIES* bitmapBrushProperties, ID2D1BitmapBrush** bitmapBrush) - { - return CreateBitmapBrush(bitmap, bitmapBrushProperties, null, bitmapBrush); - } - - public HRESULT CreateSolidColorBrush([NativeTypeName("const D2D1_COLOR_F &")] DXGI_RGBA* color, ID2D1SolidColorBrush** solidColorBrush) - { - return CreateSolidColorBrush(color, null, solidColorBrush); - } - - public HRESULT CreateGradientStopCollection([NativeTypeName("const D2D1_GRADIENT_STOP *")] D2D1_GRADIENT_STOP* gradientStops, [NativeTypeName("UINT32")] uint gradientStopsCount, ID2D1GradientStopCollection** gradientStopCollection) - { - return CreateGradientStopCollection(gradientStops, gradientStopsCount, D2D1_GAMMA_2_2, D2D1_EXTEND_MODE_CLAMP, gradientStopCollection); - } - - public HRESULT CreateLinearGradientBrush([NativeTypeName("const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES &")] D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES* linearGradientBrushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1LinearGradientBrush** linearGradientBrush) - { - return CreateLinearGradientBrush(linearGradientBrushProperties, null, gradientStopCollection, linearGradientBrush); - } - - public HRESULT CreateRadialGradientBrush([NativeTypeName("const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES &")] D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES* radialGradientBrushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1RadialGradientBrush** radialGradientBrush) - { - return CreateRadialGradientBrush(radialGradientBrushProperties, null, gradientStopCollection, radialGradientBrush); - } - - public HRESULT CreateCompatibleRenderTarget(ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(null, null, null, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); - } - - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F desiredSize, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(&desiredSize, null, null, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); - } - - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F desiredSize, [NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U desiredPixelSize, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, null, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); - } - - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F desiredSize, [NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U desiredPixelSize, D2D1_PIXEL_FORMAT desiredFormat, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, &desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget); - } - - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F desiredSize, [NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U desiredPixelSize, D2D1_PIXEL_FORMAT desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, &desiredFormat, options, bitmapRenderTarget); - } - - public HRESULT CreateLayer([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F size, ID2D1Layer** layer) - { - return CreateLayer(&size, layer); - } - - public HRESULT CreateLayer(ID2D1Layer** layer) - { - return CreateLayer(null, layer); - } - - public HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource* wicBitmapSource, ID2D1Bitmap1** bitmap) - { - return CreateBitmapFromWicBitmap(wicBitmapSource, null, bitmap); - } - - public HRESULT CreateImageBrush(ID2D1Image* image, [NativeTypeName("const D2D1_IMAGE_BRUSH_PROPERTIES &")] D2D1_IMAGE_BRUSH_PROPERTIES* imageBrushProperties, ID2D1ImageBrush** imageBrush) - { - return CreateImageBrush(image, imageBrushProperties, null, imageBrush); - } - - public HRESULT CreateBitmapBrush(ID2D1Bitmap* bitmap, ID2D1BitmapBrush1** bitmapBrush) - { - return CreateBitmapBrush(bitmap, null, null, bitmapBrush); - } - - public HRESULT CreateBitmapBrush(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_BITMAP_BRUSH_PROPERTIES1 &")] D2D1_BITMAP_BRUSH_PROPERTIES1* bitmapBrushProperties, ID2D1BitmapBrush1** bitmapBrush) - { - return CreateBitmapBrush(bitmap, bitmapBrushProperties, null, bitmapBrush); - } - - public void DrawImage(ID2D1Effect* effect, [NativeTypeName("const D2D1_POINT_2F *")] D2D_POINT_2F* targetOffset = null, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* imageRectangle = null, D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR, D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) - { - ID2D1Image* output = null; - - effect->GetOutput(&output); - DrawImage(output, targetOffset, imageRectangle, interpolationMode, compositeMode); - output->Release(); - } - - public void DrawImage(ID2D1Image* image, D2D1_INTERPOLATION_MODE interpolationMode, D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) - { - DrawImage(image, null, null, interpolationMode, compositeMode); - } - - public void DrawImage(ID2D1Effect* effect, D2D1_INTERPOLATION_MODE interpolationMode, D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) - { - DrawImage(effect, null, null, interpolationMode, compositeMode); - } - - public void DrawImage(ID2D1Image* image, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F targetOffset, D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR, D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) - { - DrawImage(image, &targetOffset, null, interpolationMode, compositeMode); - } - - public void DrawImage(ID2D1Effect* effect, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F targetOffset, D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR, D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) - { - DrawImage(effect, &targetOffset, null, interpolationMode, compositeMode); - } - - public void DrawImage(ID2D1Image* image, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F targetOffset, [NativeTypeName("const D2D1_RECT_F &")] D2D_RECT_F* imageRectangle, D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR, D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) - { - DrawImage(image, &targetOffset, imageRectangle, interpolationMode, compositeMode); - } - - public void DrawImage(ID2D1Effect* effect, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F targetOffset, [NativeTypeName("const D2D1_RECT_F &")] D2D_RECT_F* imageRectangle, D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR, D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) - { - DrawImage(effect, &targetOffset, imageRectangle, interpolationMode, compositeMode); - } - - public void DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F targetOffset) - { - DrawGdiMetafile(gdiMetafile, &targetOffset); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT CreateBitmap([NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U size, [NativeTypeName("const void *")] void* srcData, [NativeTypeName("UINT32")] uint pitch, [NativeTypeName("const D2D1_BITMAP_PROPERTIES *")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource* wicBitmapSource, [NativeTypeName("const D2D1_BITMAP_PROPERTIES *")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), wicBitmapSource, bitmapProperties, bitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT CreateSharedBitmap([NativeTypeName("const IID &")] Guid* riid, void* data, [NativeTypeName("const D2D1_BITMAP_PROPERTIES *")] D2D1_BITMAP_PROPERTIES* bitmapProperties, ID2D1Bitmap** bitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), riid, data, bitmapProperties, bitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT CreateBitmapBrush(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_BITMAP_BRUSH_PROPERTIES *")] D2D1_BITMAP_BRUSH_PROPERTIES* bitmapBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1BitmapBrush** bitmapBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), bitmap, bitmapBrushProperties, brushProperties, bitmapBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT CreateSolidColorBrush([NativeTypeName("const D2D1_COLOR_F *")] DXGI_RGBA* color, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1SolidColorBrush** solidColorBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), color, brushProperties, solidColorBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT CreateGradientStopCollection([NativeTypeName("const D2D1_GRADIENT_STOP *")] D2D1_GRADIENT_STOP* gradientStops, [NativeTypeName("UINT32")] uint gradientStopsCount, D2D1_GAMMA colorInterpolationGamma, D2D1_EXTEND_MODE extendMode, ID2D1GradientStopCollection** gradientStopCollection) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), gradientStops, gradientStopsCount, colorInterpolationGamma, extendMode, gradientStopCollection); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT CreateLinearGradientBrush([NativeTypeName("const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *")] D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES* linearGradientBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1LinearGradientBrush** linearGradientBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), linearGradientBrushProperties, brushProperties, gradientStopCollection, linearGradientBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CreateRadialGradientBrush([NativeTypeName("const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *")] D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES* radialGradientBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1RadialGradientBrush** radialGradientBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), radialGradientBrushProperties, brushProperties, gradientStopCollection, radialGradientBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT CreateCompatibleRenderTarget([NativeTypeName("const D2D1_SIZE_F *")] D2D_SIZE_F* desiredSize, [NativeTypeName("const D2D1_SIZE_U *")] D2D_SIZE_U* desiredPixelSize, [NativeTypeName("const D2D1_PIXEL_FORMAT *")] D2D1_PIXEL_FORMAT* desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options, ID2D1BitmapRenderTarget** bitmapRenderTarget) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT CreateLayer([NativeTypeName("const D2D1_SIZE_F *")] D2D_SIZE_F* size, ID2D1Layer** layer) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), size, layer); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT CreateMesh(ID2D1Mesh** mesh) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), mesh); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public void DrawLine([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point0, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point1, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public void DrawRectangle([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* rect, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), rect, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public void FillRectangle([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* rect, ID2D1Brush* brush) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), rect, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public void DrawRoundedRectangle([NativeTypeName("const D2D1_ROUNDED_RECT *")] D2D1_ROUNDED_RECT* roundedRect, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), roundedRect, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(19)] - public void FillRoundedRectangle([NativeTypeName("const D2D1_ROUNDED_RECT *")] D2D1_ROUNDED_RECT* roundedRect, ID2D1Brush* brush) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), roundedRect, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(20)] - public void DrawEllipse([NativeTypeName("const D2D1_ELLIPSE *")] D2D1_ELLIPSE* ellipse, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), ellipse, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(21)] - public void FillEllipse([NativeTypeName("const D2D1_ELLIPSE *")] D2D1_ELLIPSE* ellipse, ID2D1Brush* brush) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), ellipse, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(22)] - public void DrawGeometry(ID2D1Geometry* geometry, ID2D1Brush* brush, float strokeWidth = 1.0f, ID2D1StrokeStyle* strokeStyle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), geometry, brush, strokeWidth, strokeStyle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(23)] - public void FillGeometry(ID2D1Geometry* geometry, ID2D1Brush* brush, ID2D1Brush* opacityBrush = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[23]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), geometry, brush, opacityBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(24)] - public void FillMesh(ID2D1Mesh* mesh, ID2D1Brush* brush) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[24]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), mesh, brush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(25)] - public void FillOpacityMask(ID2D1Bitmap* opacityMask, ID2D1Brush* brush, D2D1_OPACITY_MASK_CONTENT content, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* destinationRectangle = null, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[25]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), opacityMask, brush, content, destinationRectangle, sourceRectangle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(26)] - public void DrawBitmap(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* destinationRectangle = null, float opacity = 1.0f, D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[26]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(27)] - public void DrawText([NativeTypeName("const WCHAR *")] ushort* @string, [NativeTypeName("UINT32")] uint stringLength, IDWriteTextFormat* textFormat, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* layoutRect, ID2D1Brush* defaultFillBrush, D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[27]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), @string, stringLength, textFormat, layoutRect, defaultFillBrush, options, measuringMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(28)] - public void DrawTextLayout([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F origin, IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(29)] - public void DrawGlyphRun([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F baselineOrigin, [NativeTypeName("const DWRITE_GLYPH_RUN *")] DWRITE_GLYPH_RUN* glyphRun, ID2D1Brush* foregroundBrush, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(30)] - public void SetTransform([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[30]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(31)] - public void GetTransform([NativeTypeName("D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[31]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(32)] - public void SetAntialiasMode(D2D1_ANTIALIAS_MODE antialiasMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[32]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), antialiasMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(33)] - public D2D1_ANTIALIAS_MODE GetAntialiasMode() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[33]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(34)] - public void SetTextAntialiasMode(D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[34]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), textAntialiasMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(35)] - public D2D1_TEXT_ANTIALIAS_MODE GetTextAntialiasMode() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[35]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(36)] - public void SetTextRenderingParams(IDWriteRenderingParams* textRenderingParams = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[36]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), textRenderingParams); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(37)] - public void GetTextRenderingParams(IDWriteRenderingParams** textRenderingParams) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[37]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), textRenderingParams); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(38)] - public void SetTags([NativeTypeName("D2D1_TAG")] ulong tag1, [NativeTypeName("D2D1_TAG")] ulong tag2) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[38]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(39)] - public void GetTags([NativeTypeName("D2D1_TAG *")] ulong* tag1 = null, [NativeTypeName("D2D1_TAG *")] ulong* tag2 = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[39]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(40)] - public void PushLayer([NativeTypeName("const D2D1_LAYER_PARAMETERS *")] D2D1_LAYER_PARAMETERS* layerParameters, ID2D1Layer* layer) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[40]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), layerParameters, layer); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(41)] - public void PopLayer() - { - ((delegate* unmanaged[Stdcall])(lpVtbl[41]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(42)] - public HRESULT Flush([NativeTypeName("D2D1_TAG *")] ulong* tag1 = null, [NativeTypeName("D2D1_TAG *")] ulong* tag2 = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[42]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(43)] - public void SaveDrawingState(ID2D1DrawingStateBlock* drawingStateBlock) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), drawingStateBlock); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(44)] - public void RestoreDrawingState(ID2D1DrawingStateBlock* drawingStateBlock) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[44]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), drawingStateBlock); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(45)] - public void PushAxisAlignedClip([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* clipRect, D2D1_ANTIALIAS_MODE antialiasMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[45]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), clipRect, antialiasMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(46)] - public void PopAxisAlignedClip() - { - ((delegate* unmanaged[Stdcall])(lpVtbl[46]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(47)] - public void Clear([NativeTypeName("const D2D1_COLOR_F *")] DXGI_RGBA* clearColor = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[47]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), clearColor); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(48)] - public void BeginDraw() - { - ((delegate* unmanaged[Stdcall])(lpVtbl[48]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(49)] - public HRESULT EndDraw([NativeTypeName("D2D1_TAG *")] ulong* tag1 = null, [NativeTypeName("D2D1_TAG *")] ulong* tag2 = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[49]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(50)] - public D2D1_PIXEL_FORMAT GetPixelFormat() - { - D2D1_PIXEL_FORMAT result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[50]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(51)] - public void SetDpi(float dpiX, float dpiY) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[51]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), dpiX, dpiY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(52)] - public void GetDpi(float* dpiX, float* dpiY) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[52]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), dpiX, dpiY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(53)] - [return: NativeTypeName("D2D1_SIZE_F")] - public D2D_SIZE_F GetSize() - { - D2D_SIZE_F result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(54)] - [return: NativeTypeName("D2D1_SIZE_U")] - public D2D_SIZE_U GetPixelSize() - { - D2D_SIZE_U result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), &result); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(55)] - [return: NativeTypeName("UINT32")] - public uint GetMaximumBitmapSize() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[55]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(56)] - public BOOL IsSupported([NativeTypeName("const D2D1_RENDER_TARGET_PROPERTIES *")] D2D1_RENDER_TARGET_PROPERTIES* renderTargetProperties) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[56]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), renderTargetProperties); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(57)] - public HRESULT CreateBitmap([NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U size, [NativeTypeName("const void *")] void* sourceData, [NativeTypeName("UINT32")] uint pitch, [NativeTypeName("const D2D1_BITMAP_PROPERTIES1 *")] D2D1_BITMAP_PROPERTIES1* bitmapProperties, ID2D1Bitmap1** bitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[57]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), size, sourceData, pitch, bitmapProperties, bitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(58)] - public HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource* wicBitmapSource, [NativeTypeName("const D2D1_BITMAP_PROPERTIES1 *")] D2D1_BITMAP_PROPERTIES1* bitmapProperties, ID2D1Bitmap1** bitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[58]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), wicBitmapSource, bitmapProperties, bitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(59)] - public HRESULT CreateColorContext(D2D1_COLOR_SPACE space, [NativeTypeName("const BYTE *")] byte* profile, [NativeTypeName("UINT32")] uint profileSize, ID2D1ColorContext** colorContext) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[59]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), space, profile, profileSize, colorContext); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(60)] - public HRESULT CreateColorContextFromFilename([NativeTypeName("PCWSTR")] ushort* filename, ID2D1ColorContext** colorContext) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[60]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), filename, colorContext); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(61)] - public HRESULT CreateColorContextFromWicColorContext(IWICColorContext* wicColorContext, ID2D1ColorContext** colorContext) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[61]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), wicColorContext, colorContext); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(62)] - public HRESULT CreateBitmapFromDxgiSurface(IDXGISurface* surface, [NativeTypeName("const D2D1_BITMAP_PROPERTIES1 *")] D2D1_BITMAP_PROPERTIES1* bitmapProperties, ID2D1Bitmap1** bitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[62]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), surface, bitmapProperties, bitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(63)] - public HRESULT CreateEffect([NativeTypeName("const IID &")] Guid* effectId, ID2D1Effect** effect) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[63]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), effectId, effect); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(64)] - public HRESULT CreateGradientStopCollection([NativeTypeName("const D2D1_GRADIENT_STOP *")] D2D1_GRADIENT_STOP* straightAlphaGradientStops, [NativeTypeName("UINT32")] uint straightAlphaGradientStopsCount, D2D1_COLOR_SPACE preInterpolationSpace, D2D1_COLOR_SPACE postInterpolationSpace, D2D1_BUFFER_PRECISION bufferPrecision, D2D1_EXTEND_MODE extendMode, D2D1_COLOR_INTERPOLATION_MODE colorInterpolationMode, ID2D1GradientStopCollection1** gradientStopCollection1) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[64]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), straightAlphaGradientStops, straightAlphaGradientStopsCount, preInterpolationSpace, postInterpolationSpace, bufferPrecision, extendMode, colorInterpolationMode, gradientStopCollection1); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(65)] - public HRESULT CreateImageBrush(ID2D1Image* image, [NativeTypeName("const D2D1_IMAGE_BRUSH_PROPERTIES *")] D2D1_IMAGE_BRUSH_PROPERTIES* imageBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1ImageBrush** imageBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[65]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), image, imageBrushProperties, brushProperties, imageBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(66)] - public HRESULT CreateBitmapBrush(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_BITMAP_BRUSH_PROPERTIES1 *")] D2D1_BITMAP_BRUSH_PROPERTIES1* bitmapBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1BitmapBrush1** bitmapBrush) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[66]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), bitmap, bitmapBrushProperties, brushProperties, bitmapBrush); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(67)] - public HRESULT CreateCommandList(ID2D1CommandList** commandList) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[67]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), commandList); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(68)] - public BOOL IsDxgiFormatSupported(DXGI_FORMAT format) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[68]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), format); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(69)] - public BOOL IsBufferPrecisionSupported(D2D1_BUFFER_PRECISION bufferPrecision) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[69]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), bufferPrecision); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(70)] - public HRESULT GetImageLocalBounds(ID2D1Image* image, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* localBounds) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[70]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), image, localBounds); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(71)] - public HRESULT GetImageWorldBounds(ID2D1Image* image, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* worldBounds) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[71]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), image, worldBounds); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(72)] - public HRESULT GetGlyphRunWorldBounds([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F baselineOrigin, [NativeTypeName("const DWRITE_GLYPH_RUN *")] DWRITE_GLYPH_RUN* glyphRun, DWRITE_MEASURING_MODE measuringMode, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[72]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, measuringMode, bounds); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(73)] - public void GetDevice(ID2D1Device** device) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[73]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), device); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(74)] - public void SetTarget(ID2D1Image* image) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[74]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), image); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(75)] - public void GetTarget(ID2D1Image** image) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[75]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), image); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(76)] - public void SetRenderingControls([NativeTypeName("const D2D1_RENDERING_CONTROLS *")] D2D1_RENDERING_CONTROLS* renderingControls) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[76]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), renderingControls); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(77)] - public void GetRenderingControls(D2D1_RENDERING_CONTROLS* renderingControls) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[77]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), renderingControls); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(78)] - public void SetPrimitiveBlend(D2D1_PRIMITIVE_BLEND primitiveBlend) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[78]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), primitiveBlend); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(79)] - public D2D1_PRIMITIVE_BLEND GetPrimitiveBlend() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[79]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(80)] - public void SetUnitMode(D2D1_UNIT_MODE unitMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[80]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), unitMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(81)] - public D2D1_UNIT_MODE GetUnitMode() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[81]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(82)] - public void DrawGlyphRun([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F baselineOrigin, [NativeTypeName("const DWRITE_GLYPH_RUN *")] DWRITE_GLYPH_RUN* glyphRun, [NativeTypeName("const DWRITE_GLYPH_RUN_DESCRIPTION *")] DWRITE_GLYPH_RUN_DESCRIPTION* glyphRunDescription, ID2D1Brush* foregroundBrush, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[82]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(83)] - public void DrawImage(ID2D1Image* image, [NativeTypeName("const D2D1_POINT_2F *")] D2D_POINT_2F* targetOffset = null, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* imageRectangle = null, D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR, D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[83]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(84)] - public void DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, [NativeTypeName("const D2D1_POINT_2F *")] D2D_POINT_2F* targetOffset = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[84]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(85)] - public void DrawBitmap(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* destinationRectangle, float opacity, D2D1_INTERPOLATION_MODE interpolationMode, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle = null, [NativeTypeName("const D2D1_MATRIX_4X4_F *")] D2D_MATRIX_4X4_F* perspectiveTransform = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[85]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle, perspectiveTransform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(86)] - public void PushLayer([NativeTypeName("const D2D1_LAYER_PARAMETERS1 *")] D2D1_LAYER_PARAMETERS1* layerParameters, ID2D1Layer* layer) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[86]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), layerParameters, layer); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(87)] - public HRESULT InvalidateEffectInputRectangle(ID2D1Effect* effect, [NativeTypeName("UINT32")] uint input, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* inputRectangle) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[87]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), effect, input, inputRectangle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(88)] - public HRESULT GetEffectInvalidRectangleCount(ID2D1Effect* effect, [NativeTypeName("UINT32 *")] uint* rectangleCount) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[88]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), effect, rectangleCount); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(89)] - public HRESULT GetEffectInvalidRectangles(ID2D1Effect* effect, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* rectangles, [NativeTypeName("UINT32")] uint rectanglesCount) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[89]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), effect, rectangles, rectanglesCount); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(90)] - public HRESULT GetEffectRequiredInputRectangles(ID2D1Effect* renderEffect, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* renderImageRectangle, [NativeTypeName("const D2D1_EFFECT_INPUT_DESCRIPTION *")] D2D1_EFFECT_INPUT_DESCRIPTION* inputDescriptions, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* requiredInputRects, [NativeTypeName("UINT32")] uint inputCount) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[90]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), renderEffect, renderImageRectangle, inputDescriptions, requiredInputRects, inputCount); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(91)] - public void FillOpacityMask(ID2D1Bitmap* opacityMask, ID2D1Brush* brush, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* destinationRectangle = null, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle = null) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[91]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), opacityMask, brush, destinationRectangle, sourceRectangle); - } - - public interface Interface : ID2D1RenderTarget.Interface - { - [VtblIndex(57)] - HRESULT CreateBitmap([NativeTypeName("D2D1_SIZE_U")] D2D_SIZE_U size, [NativeTypeName("const void *")] void* sourceData, [NativeTypeName("UINT32")] uint pitch, [NativeTypeName("const D2D1_BITMAP_PROPERTIES1 *")] D2D1_BITMAP_PROPERTIES1* bitmapProperties, ID2D1Bitmap1** bitmap); - - [VtblIndex(58)] - HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource* wicBitmapSource, [NativeTypeName("const D2D1_BITMAP_PROPERTIES1 *")] D2D1_BITMAP_PROPERTIES1* bitmapProperties, ID2D1Bitmap1** bitmap); - - [VtblIndex(59)] - HRESULT CreateColorContext(D2D1_COLOR_SPACE space, [NativeTypeName("const BYTE *")] byte* profile, [NativeTypeName("UINT32")] uint profileSize, ID2D1ColorContext** colorContext); - - [VtblIndex(60)] - HRESULT CreateColorContextFromFilename([NativeTypeName("PCWSTR")] ushort* filename, ID2D1ColorContext** colorContext); - - [VtblIndex(61)] - HRESULT CreateColorContextFromWicColorContext(IWICColorContext* wicColorContext, ID2D1ColorContext** colorContext); - - [VtblIndex(62)] - HRESULT CreateBitmapFromDxgiSurface(IDXGISurface* surface, [NativeTypeName("const D2D1_BITMAP_PROPERTIES1 *")] D2D1_BITMAP_PROPERTIES1* bitmapProperties, ID2D1Bitmap1** bitmap); - - [VtblIndex(63)] - HRESULT CreateEffect([NativeTypeName("const IID &")] Guid* effectId, ID2D1Effect** effect); - - [VtblIndex(64)] - HRESULT CreateGradientStopCollection([NativeTypeName("const D2D1_GRADIENT_STOP *")] D2D1_GRADIENT_STOP* straightAlphaGradientStops, [NativeTypeName("UINT32")] uint straightAlphaGradientStopsCount, D2D1_COLOR_SPACE preInterpolationSpace, D2D1_COLOR_SPACE postInterpolationSpace, D2D1_BUFFER_PRECISION bufferPrecision, D2D1_EXTEND_MODE extendMode, D2D1_COLOR_INTERPOLATION_MODE colorInterpolationMode, ID2D1GradientStopCollection1** gradientStopCollection1); - - [VtblIndex(65)] - HRESULT CreateImageBrush(ID2D1Image* image, [NativeTypeName("const D2D1_IMAGE_BRUSH_PROPERTIES *")] D2D1_IMAGE_BRUSH_PROPERTIES* imageBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1ImageBrush** imageBrush); - - [VtblIndex(66)] - HRESULT CreateBitmapBrush(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_BITMAP_BRUSH_PROPERTIES1 *")] D2D1_BITMAP_BRUSH_PROPERTIES1* bitmapBrushProperties, [NativeTypeName("const D2D1_BRUSH_PROPERTIES *")] D2D1_BRUSH_PROPERTIES* brushProperties, ID2D1BitmapBrush1** bitmapBrush); - - [VtblIndex(67)] - HRESULT CreateCommandList(ID2D1CommandList** commandList); - - [VtblIndex(68)] - BOOL IsDxgiFormatSupported(DXGI_FORMAT format); - - [VtblIndex(69)] - BOOL IsBufferPrecisionSupported(D2D1_BUFFER_PRECISION bufferPrecision); - - [VtblIndex(70)] - HRESULT GetImageLocalBounds(ID2D1Image* image, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* localBounds); - - [VtblIndex(71)] - HRESULT GetImageWorldBounds(ID2D1Image* image, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* worldBounds); - - [VtblIndex(72)] - HRESULT GetGlyphRunWorldBounds([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F baselineOrigin, [NativeTypeName("const DWRITE_GLYPH_RUN *")] DWRITE_GLYPH_RUN* glyphRun, DWRITE_MEASURING_MODE measuringMode, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds); - - [VtblIndex(73)] - void GetDevice(ID2D1Device** device); - - [VtblIndex(74)] - void SetTarget(ID2D1Image* image); - - [VtblIndex(75)] - void GetTarget(ID2D1Image** image); - - [VtblIndex(76)] - void SetRenderingControls([NativeTypeName("const D2D1_RENDERING_CONTROLS *")] D2D1_RENDERING_CONTROLS* renderingControls); - - [VtblIndex(77)] - void GetRenderingControls(D2D1_RENDERING_CONTROLS* renderingControls); - - [VtblIndex(78)] - void SetPrimitiveBlend(D2D1_PRIMITIVE_BLEND primitiveBlend); - - [VtblIndex(79)] - D2D1_PRIMITIVE_BLEND GetPrimitiveBlend(); - - [VtblIndex(80)] - void SetUnitMode(D2D1_UNIT_MODE unitMode); - - [VtblIndex(81)] - D2D1_UNIT_MODE GetUnitMode(); - - [VtblIndex(82)] - void DrawGlyphRun([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F baselineOrigin, [NativeTypeName("const DWRITE_GLYPH_RUN *")] DWRITE_GLYPH_RUN* glyphRun, [NativeTypeName("const DWRITE_GLYPH_RUN_DESCRIPTION *")] DWRITE_GLYPH_RUN_DESCRIPTION* glyphRunDescription, ID2D1Brush* foregroundBrush, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL); - - [VtblIndex(83)] - void DrawImage(ID2D1Image* image, [NativeTypeName("const D2D1_POINT_2F *")] D2D_POINT_2F* targetOffset = null, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* imageRectangle = null, D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR, D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER); - - [VtblIndex(84)] - void DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, [NativeTypeName("const D2D1_POINT_2F *")] D2D_POINT_2F* targetOffset = null); - - [VtblIndex(85)] - void DrawBitmap(ID2D1Bitmap* bitmap, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* destinationRectangle, float opacity, D2D1_INTERPOLATION_MODE interpolationMode, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle = null, [NativeTypeName("const D2D1_MATRIX_4X4_F *")] D2D_MATRIX_4X4_F* perspectiveTransform = null); - - [VtblIndex(86)] - void PushLayer([NativeTypeName("const D2D1_LAYER_PARAMETERS1 *")] D2D1_LAYER_PARAMETERS1* layerParameters, ID2D1Layer* layer); - - [VtblIndex(87)] - HRESULT InvalidateEffectInputRectangle(ID2D1Effect* effect, [NativeTypeName("UINT32")] uint input, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* inputRectangle); - - [VtblIndex(88)] - HRESULT GetEffectInvalidRectangleCount(ID2D1Effect* effect, [NativeTypeName("UINT32 *")] uint* rectangleCount); - - [VtblIndex(89)] - HRESULT GetEffectInvalidRectangles(ID2D1Effect* effect, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* rectangles, [NativeTypeName("UINT32")] uint rectanglesCount); - - [VtblIndex(90)] - HRESULT GetEffectRequiredInputRectangles(ID2D1Effect* renderEffect, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* renderImageRectangle, [NativeTypeName("const D2D1_EFFECT_INPUT_DESCRIPTION *")] D2D1_EFFECT_INPUT_DESCRIPTION* inputDescriptions, [NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* requiredInputRects, [NativeTypeName("UINT32")] uint inputCount); - - [VtblIndex(91)] - void FillOpacityMask(ID2D1Bitmap* opacityMask, ID2D1Brush* brush, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* destinationRectangle = null, [NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle = null); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("HRESULT (D2D1_SIZE_U, const void *, UINT32, const D2D1_BITMAP_PROPERTIES *, ID2D1Bitmap **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmap1; - - [NativeTypeName("HRESULT (IWICBitmapSource *, const D2D1_BITMAP_PROPERTIES *, ID2D1Bitmap **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapFromWicBitmap1; - - [NativeTypeName("HRESULT (const IID &, void *, const D2D1_BITMAP_PROPERTIES *, ID2D1Bitmap **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSharedBitmap; - - [NativeTypeName("HRESULT (ID2D1Bitmap *, const D2D1_BITMAP_BRUSH_PROPERTIES *, const D2D1_BRUSH_PROPERTIES *, ID2D1BitmapBrush **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapBrush2; - - [NativeTypeName("HRESULT (const D2D1_COLOR_F *, const D2D1_BRUSH_PROPERTIES *, ID2D1SolidColorBrush **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSolidColorBrush1; - - [NativeTypeName("HRESULT (const D2D1_GRADIENT_STOP *, UINT32, D2D1_GAMMA, D2D1_EXTEND_MODE, ID2D1GradientStopCollection **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateGradientStopCollection1; - - [NativeTypeName("HRESULT (const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *, const D2D1_BRUSH_PROPERTIES *, ID2D1GradientStopCollection *, ID2D1LinearGradientBrush **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateLinearGradientBrush1; - - [NativeTypeName("HRESULT (const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *, const D2D1_BRUSH_PROPERTIES *, ID2D1GradientStopCollection *, ID2D1RadialGradientBrush **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateRadialGradientBrush1; - - [NativeTypeName("HRESULT (const D2D1_SIZE_F *, const D2D1_SIZE_U *, const D2D1_PIXEL_FORMAT *, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS, ID2D1BitmapRenderTarget **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateCompatibleRenderTarget5; - - [NativeTypeName("HRESULT (const D2D1_SIZE_F *, ID2D1Layer **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateLayer2; - - [NativeTypeName("HRESULT (ID2D1Mesh **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateMesh; - - [NativeTypeName("void (D2D1_POINT_2F, D2D1_POINT_2F, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawLine; - - [NativeTypeName("void (const D2D1_RECT_F *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawRectangle; - - [NativeTypeName("void (const D2D1_RECT_F *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillRectangle; - - [NativeTypeName("void (const D2D1_ROUNDED_RECT *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawRoundedRectangle; - - [NativeTypeName("void (const D2D1_ROUNDED_RECT *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillRoundedRectangle; - - [NativeTypeName("void (const D2D1_ELLIPSE *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawEllipse; - - [NativeTypeName("void (const D2D1_ELLIPSE *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillEllipse; - - [NativeTypeName("void (ID2D1Geometry *, ID2D1Brush *, FLOAT, ID2D1StrokeStyle *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawGeometry; - - [NativeTypeName("void (ID2D1Geometry *, ID2D1Brush *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillGeometry; - - [NativeTypeName("void (ID2D1Mesh *, ID2D1Brush *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillMesh; - - [NativeTypeName("void (ID2D1Bitmap *, ID2D1Brush *, D2D1_OPACITY_MASK_CONTENT, const D2D1_RECT_F *, const D2D1_RECT_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillOpacityMask; - - [NativeTypeName("void (ID2D1Bitmap *, const D2D1_RECT_F *, FLOAT, D2D1_BITMAP_INTERPOLATION_MODE, const D2D1_RECT_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawBitmap; - - [NativeTypeName("void (const WCHAR *, UINT32, IDWriteTextFormat *, const D2D1_RECT_F *, ID2D1Brush *, D2D1_DRAW_TEXT_OPTIONS, DWRITE_MEASURING_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawText; - - [NativeTypeName("void (D2D1_POINT_2F, IDWriteTextLayout *, ID2D1Brush *, D2D1_DRAW_TEXT_OPTIONS) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawTextLayout; - - [NativeTypeName("void (D2D1_POINT_2F, const DWRITE_GLYPH_RUN *, ID2D1Brush *, DWRITE_MEASURING_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawGlyphRun; - - [NativeTypeName("void (const D2D1_MATRIX_3X2_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTransform; - - [NativeTypeName("void (D2D1_MATRIX_3X2_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTransform; - - [NativeTypeName("void (D2D1_ANTIALIAS_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetAntialiasMode; - - [NativeTypeName("D2D1_ANTIALIAS_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetAntialiasMode; - - [NativeTypeName("void (D2D1_TEXT_ANTIALIAS_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTextAntialiasMode; - - [NativeTypeName("D2D1_TEXT_ANTIALIAS_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTextAntialiasMode; - - [NativeTypeName("void (IDWriteRenderingParams *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTextRenderingParams; - - [NativeTypeName("void (IDWriteRenderingParams **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTextRenderingParams; - - [NativeTypeName("void (D2D1_TAG, D2D1_TAG) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTags; - - [NativeTypeName("void (D2D1_TAG *, D2D1_TAG *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTags; - - [NativeTypeName("void (const D2D1_LAYER_PARAMETERS *, ID2D1Layer *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PushLayer; - - [NativeTypeName("void () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PopLayer; - - [NativeTypeName("HRESULT (D2D1_TAG *, D2D1_TAG *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Flush; - - [NativeTypeName("void (ID2D1DrawingStateBlock *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SaveDrawingState; - - [NativeTypeName("void (ID2D1DrawingStateBlock *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RestoreDrawingState; - - [NativeTypeName("void (const D2D1_RECT_F *, D2D1_ANTIALIAS_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PushAxisAlignedClip; - - [NativeTypeName("void () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PopAxisAlignedClip; - - [NativeTypeName("void (const D2D1_COLOR_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Clear; - - [NativeTypeName("void () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] BeginDraw; - - [NativeTypeName("HRESULT (D2D1_TAG *, D2D1_TAG *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EndDraw; - - [NativeTypeName("D2D1_PIXEL_FORMAT () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelFormat; - - [NativeTypeName("void (FLOAT, FLOAT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetDpi; - - [NativeTypeName("void (FLOAT *, FLOAT *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDpi; - - [NativeTypeName("D2D1_SIZE_F () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSize; - - [NativeTypeName("D2D1_SIZE_U () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelSize; - - [NativeTypeName("UINT32 () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMaximumBitmapSize; - - [NativeTypeName("BOOL (const D2D1_RENDER_TARGET_PROPERTIES *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsSupported; - - [NativeTypeName("HRESULT (D2D1_SIZE_U, const void *, UINT32, const D2D1_BITMAP_PROPERTIES1 *, ID2D1Bitmap1 **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmap2; - - [NativeTypeName("HRESULT (IWICBitmapSource *, const D2D1_BITMAP_PROPERTIES1 *, ID2D1Bitmap1 **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapFromWicBitmap3; - - [NativeTypeName("HRESULT (D2D1_COLOR_SPACE, const BYTE *, UINT32, ID2D1ColorContext **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateColorContext; - - [NativeTypeName("HRESULT (PCWSTR, ID2D1ColorContext **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateColorContextFromFilename; - - [NativeTypeName("HRESULT (IWICColorContext *, ID2D1ColorContext **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateColorContextFromWicColorContext; - - [NativeTypeName("HRESULT (IDXGISurface *, const D2D1_BITMAP_PROPERTIES1 *, ID2D1Bitmap1 **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapFromDxgiSurface; - - [NativeTypeName("HRESULT (const IID &, ID2D1Effect **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateEffect; - - [NativeTypeName("HRESULT (const D2D1_GRADIENT_STOP *, UINT32, D2D1_COLOR_SPACE, D2D1_COLOR_SPACE, D2D1_BUFFER_PRECISION, D2D1_EXTEND_MODE, D2D1_COLOR_INTERPOLATION_MODE, ID2D1GradientStopCollection1 **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateGradientStopCollection2; - - [NativeTypeName("HRESULT (ID2D1Image *, const D2D1_IMAGE_BRUSH_PROPERTIES *, const D2D1_BRUSH_PROPERTIES *, ID2D1ImageBrush **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateImageBrush1; - - [NativeTypeName("HRESULT (ID2D1Bitmap *, const D2D1_BITMAP_BRUSH_PROPERTIES1 *, const D2D1_BRUSH_PROPERTIES *, ID2D1BitmapBrush1 **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapBrush5; - - [NativeTypeName("HRESULT (ID2D1CommandList **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateCommandList; - - [NativeTypeName("BOOL (DXGI_FORMAT) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsDxgiFormatSupported; - - [NativeTypeName("BOOL (D2D1_BUFFER_PRECISION) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsBufferPrecisionSupported; - - [NativeTypeName("HRESULT (ID2D1Image *, D2D1_RECT_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetImageLocalBounds; - - [NativeTypeName("HRESULT (ID2D1Image *, D2D1_RECT_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetImageWorldBounds; - - [NativeTypeName("HRESULT (D2D1_POINT_2F, const DWRITE_GLYPH_RUN *, DWRITE_MEASURING_MODE, D2D1_RECT_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetGlyphRunWorldBounds; - - [NativeTypeName("void (ID2D1Device **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDevice; - - [NativeTypeName("void (ID2D1Image *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTarget; - - [NativeTypeName("void (ID2D1Image **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTarget; - - [NativeTypeName("void (const D2D1_RENDERING_CONTROLS *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetRenderingControls; - - [NativeTypeName("void (D2D1_RENDERING_CONTROLS *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetRenderingControls; - - [NativeTypeName("void (D2D1_PRIMITIVE_BLEND) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrimitiveBlend; - - [NativeTypeName("D2D1_PRIMITIVE_BLEND () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrimitiveBlend; - - [NativeTypeName("void (D2D1_UNIT_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetUnitMode; - - [NativeTypeName("D2D1_UNIT_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetUnitMode; - - [NativeTypeName("void (D2D1_POINT_2F, const DWRITE_GLYPH_RUN *, const DWRITE_GLYPH_RUN_DESCRIPTION *, ID2D1Brush *, DWRITE_MEASURING_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawGlyphRun1; - - [NativeTypeName("void (ID2D1Image *, const D2D1_POINT_2F *, const D2D1_RECT_F *, D2D1_INTERPOLATION_MODE, D2D1_COMPOSITE_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawImage7; - - [NativeTypeName("void (ID2D1GdiMetafile *, const D2D1_POINT_2F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawGdiMetafile1; - - [NativeTypeName("void (ID2D1Bitmap *, const D2D1_RECT_F *, FLOAT, D2D1_INTERPOLATION_MODE, const D2D1_RECT_F *, const D2D1_MATRIX_4X4_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawBitmap1; - - [NativeTypeName("void (const D2D1_LAYER_PARAMETERS1 *, ID2D1Layer *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PushLayer1; - - [NativeTypeName("HRESULT (ID2D1Effect *, UINT32, const D2D1_RECT_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] InvalidateEffectInputRectangle; - - [NativeTypeName("HRESULT (ID2D1Effect *, UINT32 *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetEffectInvalidRectangleCount; - - [NativeTypeName("HRESULT (ID2D1Effect *, D2D1_RECT_F *, UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetEffectInvalidRectangles; - - [NativeTypeName("HRESULT (ID2D1Effect *, const D2D1_RECT_F *, const D2D1_EFFECT_INPUT_DESCRIPTION *, D2D1_RECT_F *, UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetEffectRequiredInputRectangles; - - [NativeTypeName("void (ID2D1Bitmap *, ID2D1Brush *, const D2D1_RECT_F *, const D2D1_RECT_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FillOpacityMask1; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1Effect.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1Effect.cs deleted file mode 100644 index 5a0ca56d..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1Effect.cs +++ /dev/null @@ -1,276 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; -using static TerraFX.Interop.DirectX.D2D1_PROPERTY_TYPE; - -namespace TerraFX.Interop.DirectX -{ - [Guid("28211A43-7D89-476F-8181-2D6159B220AD")] - [NativeTypeName("struct ID2D1Effect : ID2D1Properties")] - [NativeInheritance("ID2D1Properties")] - internal unsafe partial struct ID2D1Effect : ID2D1Effect.Interface - { - public void** lpVtbl; - - public HRESULT SetValueByName([NativeTypeName("PCWSTR")] ushort* name, [NativeTypeName("const BYTE *")] byte* data, [NativeTypeName("UINT32")] uint dataSize) - { - return SetValueByName(name, D2D1_PROPERTY_TYPE_UNKNOWN, data, dataSize); - } - - public HRESULT SetValue([NativeTypeName("UINT32")] uint index, [NativeTypeName("const BYTE *")] byte* data, [NativeTypeName("UINT32")] uint dataSize) - { - return SetValue(index, D2D1_PROPERTY_TYPE_UNKNOWN, data, dataSize); - } - - public HRESULT GetValueByName([NativeTypeName("PCWSTR")] ushort* name, byte* data, [NativeTypeName("UINT32")] uint dataSize) - { - return GetValueByName(name, D2D1_PROPERTY_TYPE_UNKNOWN, data, dataSize); - } - - public HRESULT GetValue([NativeTypeName("UINT32")] uint index, byte* data, [NativeTypeName("UINT32")] uint dataSize) - { - return GetValue(index, D2D1_PROPERTY_TYPE_UNKNOWN, data, dataSize); - } - - public void SetInputEffect([NativeTypeName("UINT32")] uint index, ID2D1Effect* inputEffect, [Optional, DefaultParameterValue(1)] BOOL invalidate) - { - ID2D1Image* output = null; - - if (inputEffect != null) - { - inputEffect->GetOutput(&output); - } - - SetInput(index, output, invalidate); - if (output != null) - { - output->Release(); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1Effect*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1Effect*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1Effect*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - [return: NativeTypeName("UINT32")] - public uint GetPropertyCount() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1Effect*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetPropertyName([NativeTypeName("UINT32")] uint index, [NativeTypeName("PWSTR")] ushort* name, [NativeTypeName("UINT32")] uint nameCount) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1Effect*)Unsafe.AsPointer(ref this), index, name, nameCount); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - [return: NativeTypeName("UINT32")] - public uint GetPropertyNameLength([NativeTypeName("UINT32")] uint index) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1Effect*)Unsafe.AsPointer(ref this), index); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public D2D1_PROPERTY_TYPE GetType([NativeTypeName("UINT32")] uint index) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1Effect*)Unsafe.AsPointer(ref this), index); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - [return: NativeTypeName("UINT32")] - public uint GetPropertyIndex([NativeTypeName("PCWSTR")] ushort* name) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1Effect*)Unsafe.AsPointer(ref this), name); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT SetValueByName([NativeTypeName("PCWSTR")] ushort* name, D2D1_PROPERTY_TYPE type, [NativeTypeName("const BYTE *")] byte* data, [NativeTypeName("UINT32")] uint dataSize) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1Effect*)Unsafe.AsPointer(ref this), name, type, data, dataSize); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT SetValue([NativeTypeName("UINT32")] uint index, D2D1_PROPERTY_TYPE type, [NativeTypeName("const BYTE *")] byte* data, [NativeTypeName("UINT32")] uint dataSize) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1Effect*)Unsafe.AsPointer(ref this), index, type, data, dataSize); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT GetValueByName([NativeTypeName("PCWSTR")] ushort* name, D2D1_PROPERTY_TYPE type, byte* data, [NativeTypeName("UINT32")] uint dataSize) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1Effect*)Unsafe.AsPointer(ref this), name, type, data, dataSize); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT GetValue([NativeTypeName("UINT32")] uint index, D2D1_PROPERTY_TYPE type, byte* data, [NativeTypeName("UINT32")] uint dataSize) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1Effect*)Unsafe.AsPointer(ref this), index, type, data, dataSize); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - [return: NativeTypeName("UINT32")] - public uint GetValueSize([NativeTypeName("UINT32")] uint index) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1Effect*)Unsafe.AsPointer(ref this), index); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT GetSubProperties([NativeTypeName("UINT32")] uint index, ID2D1Properties** subProperties) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1Effect*)Unsafe.AsPointer(ref this), index, subProperties); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public void SetInput([NativeTypeName("UINT32")] uint index, ID2D1Image* input, [Optional, DefaultParameterValue(1)] BOOL invalidate) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1Effect*)Unsafe.AsPointer(ref this), index, input, invalidate); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT SetInputCount([NativeTypeName("UINT32")] uint inputCount) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1Effect*)Unsafe.AsPointer(ref this), inputCount); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public void GetInput([NativeTypeName("UINT32")] uint index, ID2D1Image** input) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((ID2D1Effect*)Unsafe.AsPointer(ref this), index, input); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - [return: NativeTypeName("UINT32")] - public uint GetInputCount() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((ID2D1Effect*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public void GetOutput(ID2D1Image** outputImage) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1Effect*)Unsafe.AsPointer(ref this), outputImage); - } - - public interface Interface : ID2D1Properties.Interface - { - [VtblIndex(14)] - void SetInput([NativeTypeName("UINT32")] uint index, ID2D1Image* input, [Optional, DefaultParameterValue(1)] BOOL invalidate); - - [VtblIndex(15)] - HRESULT SetInputCount([NativeTypeName("UINT32")] uint inputCount); - - [VtblIndex(16)] - void GetInput([NativeTypeName("UINT32")] uint index, ID2D1Image** input); - - [VtblIndex(17)] - [return: NativeTypeName("UINT32")] - uint GetInputCount(); - - [VtblIndex(18)] - void GetOutput(ID2D1Image** outputImage); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("UINT32 () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPropertyCount; - - [NativeTypeName("HRESULT (UINT32, PWSTR, UINT32) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPropertyName; - - [NativeTypeName("UINT32 (UINT32) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPropertyNameLength; - - [NativeTypeName("D2D1_PROPERTY_TYPE (UINT32) const __attribute__((nothrow)) __attribute__((stdcall))")] - public new delegate* unmanaged[Stdcall] GetType; - - [NativeTypeName("UINT32 (PCWSTR) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPropertyIndex; - - [NativeTypeName("HRESULT (PCWSTR, D2D1_PROPERTY_TYPE, const BYTE *, UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetValueByName1; - - [NativeTypeName("HRESULT (UINT32, D2D1_PROPERTY_TYPE, const BYTE *, UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetValue1; - - [NativeTypeName("HRESULT (PCWSTR, D2D1_PROPERTY_TYPE, BYTE *, UINT32) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetValueByName1; - - [NativeTypeName("HRESULT (UINT32, D2D1_PROPERTY_TYPE, BYTE *, UINT32) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetValue1; - - [NativeTypeName("UINT32 (UINT32) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetValueSize; - - [NativeTypeName("HRESULT (UINT32, ID2D1Properties **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSubProperties; - - [NativeTypeName("void (UINT32, ID2D1Image *, BOOL) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetInput; - - [NativeTypeName("HRESULT (UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetInputCount; - - [NativeTypeName("void (UINT32, ID2D1Image **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetInput; - - [NativeTypeName("UINT32 () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetInputCount; - - [NativeTypeName("void (ID2D1Image **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetOutput; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1GdiMetafile.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1GdiMetafile.cs deleted file mode 100644 index da8b0ede..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1GdiMetafile.cs +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Versioning; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [SupportedOSPlatform("windows8.0")] - [Guid("2F543DC3-CFC1-4211-864F-CFD91C6F3395")] - [NativeTypeName("struct ID2D1GdiMetafile : ID2D1Resource")] - [NativeInheritance("ID2D1Resource")] - internal unsafe partial struct ID2D1GdiMetafile : ID2D1GdiMetafile.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1GdiMetafile*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1GdiMetafile*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1GdiMetafile*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1GdiMetafile*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT Stream(ID2D1GdiMetafileSink* sink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1GdiMetafile*)Unsafe.AsPointer(ref this), sink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetBounds([NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1GdiMetafile*)Unsafe.AsPointer(ref this), bounds); - } - - public interface Interface : ID2D1Resource.Interface - { - [VtblIndex(4)] - HRESULT Stream(ID2D1GdiMetafileSink* sink); - - [VtblIndex(5)] - HRESULT GetBounds([NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* bounds); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("HRESULT (ID2D1GdiMetafileSink *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Stream; - - [NativeTypeName("HRESULT (D2D1_RECT_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBounds; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1GdiMetafileSink.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1GdiMetafileSink.cs deleted file mode 100644 index 12c7b44e..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1GdiMetafileSink.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Versioning; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [SupportedOSPlatform("windows8.0")] - [Guid("82237326-8111-4F7C-BCF4-B5C1175564FE")] - [NativeTypeName("struct ID2D1GdiMetafileSink : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct ID2D1GdiMetafileSink : ID2D1GdiMetafileSink.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1GdiMetafileSink*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1GdiMetafileSink*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1GdiMetafileSink*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT ProcessRecord([NativeTypeName("DWORD")] uint recordType, [NativeTypeName("const void *")] void* recordData, [NativeTypeName("DWORD")] uint recordDataSize) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1GdiMetafileSink*)Unsafe.AsPointer(ref this), recordType, recordData, recordDataSize); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT ProcessRecord([NativeTypeName("DWORD")] uint recordType, [NativeTypeName("const void *")] void* recordData, [NativeTypeName("DWORD")] uint recordDataSize); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (DWORD, const void *, DWORD) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ProcessRecord; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1GradientStopCollection1.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1GradientStopCollection1.cs deleted file mode 100644 index dd0fc95d..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1GradientStopCollection1.cs +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("AE1572F4-5DD0-4777-998B-9279472AE63B")] - [NativeTypeName("struct ID2D1GradientStopCollection1 : ID2D1GradientStopCollection")] - [NativeInheritance("ID2D1GradientStopCollection")] - internal unsafe partial struct ID2D1GradientStopCollection1 : ID2D1GradientStopCollection1.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1GradientStopCollection1*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1GradientStopCollection1*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1GradientStopCollection1*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1GradientStopCollection1*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - [return: NativeTypeName("UINT32")] - public uint GetGradientStopCount() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1GradientStopCollection1*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public void GetGradientStops(D2D1_GRADIENT_STOP* gradientStops, [NativeTypeName("UINT32")] uint gradientStopsCount) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1GradientStopCollection1*)Unsafe.AsPointer(ref this), gradientStops, gradientStopsCount); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public D2D1_GAMMA GetColorInterpolationGamma() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1GradientStopCollection1*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public D2D1_EXTEND_MODE GetExtendMode() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1GradientStopCollection1*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public void GetGradientStops1(D2D1_GRADIENT_STOP* gradientStops, [NativeTypeName("UINT32")] uint gradientStopsCount) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1GradientStopCollection1*)Unsafe.AsPointer(ref this), gradientStops, gradientStopsCount); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public D2D1_COLOR_SPACE GetPreInterpolationSpace() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1GradientStopCollection1*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public D2D1_COLOR_SPACE GetPostInterpolationSpace() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1GradientStopCollection1*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public D2D1_BUFFER_PRECISION GetBufferPrecision() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1GradientStopCollection1*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public D2D1_COLOR_INTERPOLATION_MODE GetColorInterpolationMode() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1GradientStopCollection1*)Unsafe.AsPointer(ref this)); - } - - public interface Interface : ID2D1GradientStopCollection.Interface - { - [VtblIndex(8)] - void GetGradientStops1(D2D1_GRADIENT_STOP* gradientStops, [NativeTypeName("UINT32")] uint gradientStopsCount); - - [VtblIndex(9)] - D2D1_COLOR_SPACE GetPreInterpolationSpace(); - - [VtblIndex(10)] - D2D1_COLOR_SPACE GetPostInterpolationSpace(); - - [VtblIndex(11)] - D2D1_BUFFER_PRECISION GetBufferPrecision(); - - [VtblIndex(12)] - D2D1_COLOR_INTERPOLATION_MODE GetColorInterpolationMode(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("UINT32 () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetGradientStopCount; - - [NativeTypeName("void (D2D1_GRADIENT_STOP *, UINT32) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetGradientStops; - - [NativeTypeName("D2D1_GAMMA () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetColorInterpolationGamma; - - [NativeTypeName("D2D1_EXTEND_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetExtendMode; - - [NativeTypeName("void (D2D1_GRADIENT_STOP *, UINT32) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetGradientStops1; - - [NativeTypeName("D2D1_COLOR_SPACE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPreInterpolationSpace; - - [NativeTypeName("D2D1_COLOR_SPACE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPostInterpolationSpace; - - [NativeTypeName("D2D1_BUFFER_PRECISION () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBufferPrecision; - - [NativeTypeName("D2D1_COLOR_INTERPOLATION_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetColorInterpolationMode; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1ImageBrush.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1ImageBrush.cs deleted file mode 100644 index 9dabb799..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1ImageBrush.cs +++ /dev/null @@ -1,238 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("FE9E984D-3F95-407C-B5DB-CB94D4E8F87C")] - [NativeTypeName("struct ID2D1ImageBrush : ID2D1Brush")] - [NativeInheritance("ID2D1Brush")] - internal unsafe partial struct ID2D1ImageBrush : ID2D1ImageBrush.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1ImageBrush*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1ImageBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1ImageBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void GetFactory(ID2D1Factory** factory) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1ImageBrush*)Unsafe.AsPointer(ref this), factory); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public void SetOpacity(float opacity) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1ImageBrush*)Unsafe.AsPointer(ref this), opacity); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public void SetTransform([NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1ImageBrush*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public float GetOpacity() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1ImageBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public void GetTransform([NativeTypeName("D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F* transform) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1ImageBrush*)Unsafe.AsPointer(ref this), transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public void SetImage(ID2D1Image* image) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1ImageBrush*)Unsafe.AsPointer(ref this), image); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public void SetExtendModeX(D2D1_EXTEND_MODE extendModeX) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1ImageBrush*)Unsafe.AsPointer(ref this), extendModeX); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public void SetExtendModeY(D2D1_EXTEND_MODE extendModeY) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1ImageBrush*)Unsafe.AsPointer(ref this), extendModeY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public void SetInterpolationMode(D2D1_INTERPOLATION_MODE interpolationMode) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1ImageBrush*)Unsafe.AsPointer(ref this), interpolationMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public void SetSourceRectangle([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1ImageBrush*)Unsafe.AsPointer(ref this), sourceRectangle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public void GetImage(ID2D1Image** image) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1ImageBrush*)Unsafe.AsPointer(ref this), image); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public D2D1_EXTEND_MODE GetExtendModeX() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1ImageBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public D2D1_EXTEND_MODE GetExtendModeY() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1ImageBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public D2D1_INTERPOLATION_MODE GetInterpolationMode() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((ID2D1ImageBrush*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public void GetSourceRectangle([NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((ID2D1ImageBrush*)Unsafe.AsPointer(ref this), sourceRectangle); - } - - public interface Interface : ID2D1Brush.Interface - { - [VtblIndex(8)] - void SetImage(ID2D1Image* image); - - [VtblIndex(9)] - void SetExtendModeX(D2D1_EXTEND_MODE extendModeX); - - [VtblIndex(10)] - void SetExtendModeY(D2D1_EXTEND_MODE extendModeY); - - [VtblIndex(11)] - void SetInterpolationMode(D2D1_INTERPOLATION_MODE interpolationMode); - - [VtblIndex(12)] - void SetSourceRectangle([NativeTypeName("const D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle); - - [VtblIndex(13)] - void GetImage(ID2D1Image** image); - - [VtblIndex(14)] - D2D1_EXTEND_MODE GetExtendModeX(); - - [VtblIndex(15)] - D2D1_EXTEND_MODE GetExtendModeY(); - - [VtblIndex(16)] - D2D1_INTERPOLATION_MODE GetInterpolationMode(); - - [VtblIndex(17)] - void GetSourceRectangle([NativeTypeName("D2D1_RECT_F *")] D2D_RECT_F* sourceRectangle); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void (ID2D1Factory **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFactory; - - [NativeTypeName("void (FLOAT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetOpacity; - - [NativeTypeName("void (const D2D1_MATRIX_3X2_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTransform; - - [NativeTypeName("FLOAT () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetOpacity; - - [NativeTypeName("void (D2D1_MATRIX_3X2_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTransform; - - [NativeTypeName("void (ID2D1Image *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetImage; - - [NativeTypeName("void (D2D1_EXTEND_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetExtendModeX; - - [NativeTypeName("void (D2D1_EXTEND_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetExtendModeY; - - [NativeTypeName("void (D2D1_INTERPOLATION_MODE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetInterpolationMode; - - [NativeTypeName("void (const D2D1_RECT_F *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetSourceRectangle; - - [NativeTypeName("void (ID2D1Image **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetImage; - - [NativeTypeName("D2D1_EXTEND_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetExtendModeX; - - [NativeTypeName("D2D1_EXTEND_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetExtendModeY; - - [NativeTypeName("D2D1_INTERPOLATION_MODE () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetInterpolationMode; - - [NativeTypeName("void (D2D1_RECT_F *) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSourceRectangle; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1PrintControl.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1PrintControl.cs deleted file mode 100644 index cbc4156e..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1PrintControl.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2C1D867D-C290-41C8-AE7E-34A98702E9A5")] - [NativeTypeName("struct ID2D1PrintControl : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct ID2D1PrintControl : ID2D1PrintControl.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1PrintControl*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1PrintControl*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1PrintControl*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT AddPage(ID2D1CommandList* commandList, D2D_SIZE_F pageSize, IStream* pagePrintTicketStream, [NativeTypeName("D2D1_TAG *")] ulong* tag1 = null, [NativeTypeName("D2D1_TAG *")] ulong* tag2 = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1PrintControl*)Unsafe.AsPointer(ref this), commandList, pageSize, pagePrintTicketStream, tag1, tag2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT Close() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1PrintControl*)Unsafe.AsPointer(ref this)); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT AddPage(ID2D1CommandList* commandList, D2D_SIZE_F pageSize, IStream* pagePrintTicketStream, [NativeTypeName("D2D1_TAG *")] ulong* tag1 = null, [NativeTypeName("D2D1_TAG *")] ulong* tag2 = null); - - [VtblIndex(4)] - HRESULT Close(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (ID2D1CommandList *, D2D_SIZE_F, IStream *, D2D1_TAG *, D2D1_TAG *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddPage; - - [NativeTypeName("HRESULT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Close; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1Properties.cs b/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1Properties.cs deleted file mode 100644 index afa4202f..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d2d1_1/ID2D1Properties.cs +++ /dev/null @@ -1,230 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; -using static TerraFX.Interop.DirectX.D2D1_PROPERTY_TYPE; - -namespace TerraFX.Interop.DirectX -{ - [Guid("483473D7-CD46-4F9D-9D3A-3112AA80159D")] - [NativeTypeName("struct ID2D1Properties : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct ID2D1Properties : ID2D1Properties.Interface - { - public void** lpVtbl; - - public HRESULT SetValueByName([NativeTypeName("PCWSTR")] ushort* name, [NativeTypeName("const BYTE *")] byte* data, [NativeTypeName("UINT32")] uint dataSize) - { - return SetValueByName(name, D2D1_PROPERTY_TYPE_UNKNOWN, data, dataSize); - } - - public HRESULT SetValue([NativeTypeName("UINT32")] uint index, [NativeTypeName("const BYTE *")] byte* data, [NativeTypeName("UINT32")] uint dataSize) - { - return SetValue(index, D2D1_PROPERTY_TYPE_UNKNOWN, data, dataSize); - } - - public HRESULT GetValueByName([NativeTypeName("PCWSTR")] ushort* name, byte* data, [NativeTypeName("UINT32")] uint dataSize) - { - return GetValueByName(name, D2D1_PROPERTY_TYPE_UNKNOWN, data, dataSize); - } - - public HRESULT GetValue([NativeTypeName("UINT32")] uint index, byte* data, [NativeTypeName("UINT32")] uint dataSize) - { - return GetValue(index, D2D1_PROPERTY_TYPE_UNKNOWN, data, dataSize); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1Properties*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1Properties*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1Properties*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - [return: NativeTypeName("UINT32")] - public uint GetPropertyCount() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1Properties*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetPropertyName([NativeTypeName("UINT32")] uint index, [NativeTypeName("PWSTR")] ushort* name, [NativeTypeName("UINT32")] uint nameCount) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1Properties*)Unsafe.AsPointer(ref this), index, name, nameCount); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - [return: NativeTypeName("UINT32")] - public uint GetPropertyNameLength([NativeTypeName("UINT32")] uint index) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1Properties*)Unsafe.AsPointer(ref this), index); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public D2D1_PROPERTY_TYPE GetType([NativeTypeName("UINT32")] uint index) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1Properties*)Unsafe.AsPointer(ref this), index); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - [return: NativeTypeName("UINT32")] - public uint GetPropertyIndex([NativeTypeName("PCWSTR")] ushort* name) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1Properties*)Unsafe.AsPointer(ref this), name); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT SetValueByName([NativeTypeName("PCWSTR")] ushort* name, D2D1_PROPERTY_TYPE type, [NativeTypeName("const BYTE *")] byte* data, [NativeTypeName("UINT32")] uint dataSize) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1Properties*)Unsafe.AsPointer(ref this), name, type, data, dataSize); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT SetValue([NativeTypeName("UINT32")] uint index, D2D1_PROPERTY_TYPE type, [NativeTypeName("const BYTE *")] byte* data, [NativeTypeName("UINT32")] uint dataSize) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1Properties*)Unsafe.AsPointer(ref this), index, type, data, dataSize); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT GetValueByName([NativeTypeName("PCWSTR")] ushort* name, D2D1_PROPERTY_TYPE type, byte* data, [NativeTypeName("UINT32")] uint dataSize) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1Properties*)Unsafe.AsPointer(ref this), name, type, data, dataSize); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT GetValue([NativeTypeName("UINT32")] uint index, D2D1_PROPERTY_TYPE type, byte* data, [NativeTypeName("UINT32")] uint dataSize) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1Properties*)Unsafe.AsPointer(ref this), index, type, data, dataSize); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - [return: NativeTypeName("UINT32")] - public uint GetValueSize([NativeTypeName("UINT32")] uint index) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1Properties*)Unsafe.AsPointer(ref this), index); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT GetSubProperties([NativeTypeName("UINT32")] uint index, ID2D1Properties** subProperties) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1Properties*)Unsafe.AsPointer(ref this), index, subProperties); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - [return: NativeTypeName("UINT32")] - uint GetPropertyCount(); - - [VtblIndex(4)] - HRESULT GetPropertyName([NativeTypeName("UINT32")] uint index, [NativeTypeName("PWSTR")] ushort* name, [NativeTypeName("UINT32")] uint nameCount); - - [VtblIndex(5)] - [return: NativeTypeName("UINT32")] - uint GetPropertyNameLength([NativeTypeName("UINT32")] uint index); - - [VtblIndex(6)] - D2D1_PROPERTY_TYPE GetType([NativeTypeName("UINT32")] uint index); - - [VtblIndex(7)] - [return: NativeTypeName("UINT32")] - uint GetPropertyIndex([NativeTypeName("PCWSTR")] ushort* name); - - [VtblIndex(8)] - HRESULT SetValueByName([NativeTypeName("PCWSTR")] ushort* name, D2D1_PROPERTY_TYPE type, [NativeTypeName("const BYTE *")] byte* data, [NativeTypeName("UINT32")] uint dataSize); - - [VtblIndex(9)] - HRESULT SetValue([NativeTypeName("UINT32")] uint index, D2D1_PROPERTY_TYPE type, [NativeTypeName("const BYTE *")] byte* data, [NativeTypeName("UINT32")] uint dataSize); - - [VtblIndex(10)] - HRESULT GetValueByName([NativeTypeName("PCWSTR")] ushort* name, D2D1_PROPERTY_TYPE type, byte* data, [NativeTypeName("UINT32")] uint dataSize); - - [VtblIndex(11)] - HRESULT GetValue([NativeTypeName("UINT32")] uint index, D2D1_PROPERTY_TYPE type, byte* data, [NativeTypeName("UINT32")] uint dataSize); - - [VtblIndex(12)] - [return: NativeTypeName("UINT32")] - uint GetValueSize([NativeTypeName("UINT32")] uint index); - - [VtblIndex(13)] - HRESULT GetSubProperties([NativeTypeName("UINT32")] uint index, ID2D1Properties** subProperties); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("UINT32 () const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPropertyCount; - - [NativeTypeName("HRESULT (UINT32, PWSTR, UINT32) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPropertyName; - - [NativeTypeName("UINT32 (UINT32) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPropertyNameLength; - - [NativeTypeName("D2D1_PROPERTY_TYPE (UINT32) const __attribute__((nothrow)) __attribute__((stdcall))")] - public new delegate* unmanaged[Stdcall] GetType; - - [NativeTypeName("UINT32 (PCWSTR) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPropertyIndex; - - [NativeTypeName("HRESULT (PCWSTR, D2D1_PROPERTY_TYPE, const BYTE *, UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetValueByName1; - - [NativeTypeName("HRESULT (UINT32, D2D1_PROPERTY_TYPE, const BYTE *, UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetValue1; - - [NativeTypeName("HRESULT (PCWSTR, D2D1_PROPERTY_TYPE, BYTE *, UINT32) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetValueByName1; - - [NativeTypeName("HRESULT (UINT32, D2D1_PROPERTY_TYPE, BYTE *, UINT32) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetValue1; - - [NativeTypeName("UINT32 (UINT32) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetValueSize; - - [NativeTypeName("HRESULT (UINT32, ID2D1Properties **) const __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSubProperties; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_BLEND.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_BLEND.cs deleted file mode 100644 index 099a1228..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_BLEND.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D12_BLEND - { - D3D12_BLEND_ZERO = 1, - D3D12_BLEND_ONE = 2, - D3D12_BLEND_SRC_COLOR = 3, - D3D12_BLEND_INV_SRC_COLOR = 4, - D3D12_BLEND_SRC_ALPHA = 5, - D3D12_BLEND_INV_SRC_ALPHA = 6, - D3D12_BLEND_DEST_ALPHA = 7, - D3D12_BLEND_INV_DEST_ALPHA = 8, - D3D12_BLEND_DEST_COLOR = 9, - D3D12_BLEND_INV_DEST_COLOR = 10, - D3D12_BLEND_SRC_ALPHA_SAT = 11, - D3D12_BLEND_BLEND_FACTOR = 14, - D3D12_BLEND_INV_BLEND_FACTOR = 15, - D3D12_BLEND_SRC1_COLOR = 16, - D3D12_BLEND_INV_SRC1_COLOR = 17, - D3D12_BLEND_SRC1_ALPHA = 18, - D3D12_BLEND_INV_SRC1_ALPHA = 19, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_BLEND_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_BLEND_DESC.cs deleted file mode 100644 index b556e67d..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_BLEND_DESC.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using TerraFX.Interop.Windows; -using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal; - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_BLEND_DESC - { - public BOOL AlphaToCoverageEnable; - - public BOOL IndependentBlendEnable; - - [NativeTypeName("D3D12_RENDER_TARGET_BLEND_DESC [8]")] - public _RenderTarget_e__FixedBuffer RenderTarget; - - internal partial struct _RenderTarget_e__FixedBuffer - { - public D3D12_RENDER_TARGET_BLEND_DESC e0; - public D3D12_RENDER_TARGET_BLEND_DESC e1; - public D3D12_RENDER_TARGET_BLEND_DESC e2; - public D3D12_RENDER_TARGET_BLEND_DESC e3; - public D3D12_RENDER_TARGET_BLEND_DESC e4; - public D3D12_RENDER_TARGET_BLEND_DESC e5; - public D3D12_RENDER_TARGET_BLEND_DESC e6; - public D3D12_RENDER_TARGET_BLEND_DESC e7; - - public ref D3D12_RENDER_TARGET_BLEND_DESC this[int index] - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref AsSpan()[index]; - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 8); - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_BLEND_OP.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_BLEND_OP.cs deleted file mode 100644 index dce0cc06..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_BLEND_OP.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D12_BLEND_OP - { - D3D12_BLEND_OP_ADD = 1, - D3D12_BLEND_OP_SUBTRACT = 2, - D3D12_BLEND_OP_REV_SUBTRACT = 3, - D3D12_BLEND_OP_MIN = 4, - D3D12_BLEND_OP_MAX = 5, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_BUFFER_RTV.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_BUFFER_RTV.cs deleted file mode 100644 index 0e79bc3f..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_BUFFER_RTV.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_BUFFER_RTV - { - [NativeTypeName("UINT64")] - public ulong FirstElement; - - public uint NumElements; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_CLEAR_FLAGS.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_CLEAR_FLAGS.cs deleted file mode 100644 index a004c3a4..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_CLEAR_FLAGS.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.DirectX -{ - [Flags] - internal enum D3D12_CLEAR_FLAGS - { - D3D12_CLEAR_FLAG_DEPTH = 0x1, - D3D12_CLEAR_FLAG_STENCIL = 0x2, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_COMMAND_SIGNATURE_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_COMMAND_SIGNATURE_DESC.cs deleted file mode 100644 index 1840c8e7..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_COMMAND_SIGNATURE_DESC.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D3D12_COMMAND_SIGNATURE_DESC - { - public uint ByteStride; - - public uint NumArgumentDescs; - - [NativeTypeName("const D3D12_INDIRECT_ARGUMENT_DESC *")] - public D3D12_INDIRECT_ARGUMENT_DESC* pArgumentDescs; - - public uint NodeMask; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_CONSERVATIVE_RASTERIZATION_MODE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_CONSERVATIVE_RASTERIZATION_MODE.cs deleted file mode 100644 index 7718ee8c..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_CONSERVATIVE_RASTERIZATION_MODE.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D12_CONSERVATIVE_RASTERIZATION_MODE - { - D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF = 0, - D3D12_CONSERVATIVE_RASTERIZATION_MODE_ON = 1, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_CULL_MODE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_CULL_MODE.cs deleted file mode 100644 index e0cd85e2..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_CULL_MODE.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D12_CULL_MODE - { - D3D12_CULL_MODE_NONE = 1, - D3D12_CULL_MODE_FRONT = 2, - D3D12_CULL_MODE_BACK = 3, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_DEPTH_STENCILOP_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_DEPTH_STENCILOP_DESC.cs deleted file mode 100644 index 19705fa9..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_DEPTH_STENCILOP_DESC.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_DEPTH_STENCILOP_DESC - { - public D3D12_STENCIL_OP StencilFailOp; - - public D3D12_STENCIL_OP StencilDepthFailOp; - - public D3D12_STENCIL_OP StencilPassOp; - - public D3D12_COMPARISON_FUNC StencilFunc; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_DEPTH_STENCIL_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_DEPTH_STENCIL_DESC.cs deleted file mode 100644 index a640b868..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_DEPTH_STENCIL_DESC.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_DEPTH_STENCIL_DESC - { - public BOOL DepthEnable; - - public D3D12_DEPTH_WRITE_MASK DepthWriteMask; - - public D3D12_COMPARISON_FUNC DepthFunc; - - public BOOL StencilEnable; - - [NativeTypeName("UINT8")] - public byte StencilReadMask; - - [NativeTypeName("UINT8")] - public byte StencilWriteMask; - - public D3D12_DEPTH_STENCILOP_DESC FrontFace; - - public D3D12_DEPTH_STENCILOP_DESC BackFace; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_DEPTH_STENCIL_VIEW_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_DEPTH_STENCIL_VIEW_DESC.cs deleted file mode 100644 index 37fa4d50..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_DEPTH_STENCIL_VIEW_DESC.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal; - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_DEPTH_STENCIL_VIEW_DESC - { - public DXGI_FORMAT Format; - - public D3D12_DSV_DIMENSION ViewDimension; - - public D3D12_DSV_FLAGS Flags; - - [NativeTypeName("D3D12_DEPTH_STENCIL_VIEW_DESC::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/d3d12.h:3462:5)")] - public _Anonymous_e__Union Anonymous; - - public ref D3D12_TEX1D_DSV Texture1D - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture1D, 1)); - } - } - - public ref D3D12_TEX1D_ARRAY_DSV Texture1DArray - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture1DArray, 1)); - } - } - - public ref D3D12_TEX2D_DSV Texture2D - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture2D, 1)); - } - } - - public ref D3D12_TEX2D_ARRAY_DSV Texture2DArray - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture2DArray, 1)); - } - } - - public ref D3D12_TEX2DMS_DSV Texture2DMS - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture2DMS, 1)); - } - } - - public ref D3D12_TEX2DMS_ARRAY_DSV Texture2DMSArray - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture2DMSArray, 1)); - } - } - - [StructLayout(LayoutKind.Explicit)] - internal partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public D3D12_TEX1D_DSV Texture1D; - - [FieldOffset(0)] - public D3D12_TEX1D_ARRAY_DSV Texture1DArray; - - [FieldOffset(0)] - public D3D12_TEX2D_DSV Texture2D; - - [FieldOffset(0)] - public D3D12_TEX2D_ARRAY_DSV Texture2DArray; - - [FieldOffset(0)] - public D3D12_TEX2DMS_DSV Texture2DMS; - - [FieldOffset(0)] - public D3D12_TEX2DMS_ARRAY_DSV Texture2DMSArray; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_DEPTH_WRITE_MASK.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_DEPTH_WRITE_MASK.cs deleted file mode 100644 index b50b0d20..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_DEPTH_WRITE_MASK.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D12_DEPTH_WRITE_MASK - { - D3D12_DEPTH_WRITE_MASK_ZERO = 0, - D3D12_DEPTH_WRITE_MASK_ALL = 1, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_DISCARD_REGION.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_DISCARD_REGION.cs deleted file mode 100644 index 23dcbf9d..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_DISCARD_REGION.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D3D12_DISCARD_REGION - { - public uint NumRects; - - [NativeTypeName("const D3D12_RECT *")] - public RECT* pRects; - - public uint FirstSubresource; - - public uint NumSubresources; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_DSV_DIMENSION.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_DSV_DIMENSION.cs deleted file mode 100644 index 38829b11..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_DSV_DIMENSION.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D12_DSV_DIMENSION - { - D3D12_DSV_DIMENSION_UNKNOWN = 0, - D3D12_DSV_DIMENSION_TEXTURE1D = 1, - D3D12_DSV_DIMENSION_TEXTURE1DARRAY = 2, - D3D12_DSV_DIMENSION_TEXTURE2D = 3, - D3D12_DSV_DIMENSION_TEXTURE2DARRAY = 4, - D3D12_DSV_DIMENSION_TEXTURE2DMS = 5, - D3D12_DSV_DIMENSION_TEXTURE2DMSARRAY = 6, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_DSV_FLAGS.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_DSV_FLAGS.cs deleted file mode 100644 index 8aa94b00..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_DSV_FLAGS.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.DirectX -{ - [Flags] - internal enum D3D12_DSV_FLAGS - { - D3D12_DSV_FLAG_NONE = 0, - D3D12_DSV_FLAG_READ_ONLY_DEPTH = 0x1, - D3D12_DSV_FLAG_READ_ONLY_STENCIL = 0x2, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_FEATURE_DATA_FORMAT_INFO.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_FEATURE_DATA_FORMAT_INFO.cs deleted file mode 100644 index 782bd2bd..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_FEATURE_DATA_FORMAT_INFO.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_FEATURE_DATA_FORMAT_INFO - { - public DXGI_FORMAT Format; - - [NativeTypeName("UINT8")] - public byte PlaneCount; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_FILL_MODE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_FILL_MODE.cs deleted file mode 100644 index 28c8ba77..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_FILL_MODE.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D12_FILL_MODE - { - D3D12_FILL_MODE_WIREFRAME = 2, - D3D12_FILL_MODE_SOLID = 3, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_GRAPHICS_PIPELINE_STATE_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_GRAPHICS_PIPELINE_STATE_DESC.cs deleted file mode 100644 index aeab95ae..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_GRAPHICS_PIPELINE_STATE_DESC.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal; - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D3D12_GRAPHICS_PIPELINE_STATE_DESC - { - public ID3D12RootSignature* pRootSignature; - - public D3D12_SHADER_BYTECODE VS; - - public D3D12_SHADER_BYTECODE PS; - - public D3D12_SHADER_BYTECODE DS; - - public D3D12_SHADER_BYTECODE HS; - - public D3D12_SHADER_BYTECODE GS; - - public D3D12_STREAM_OUTPUT_DESC StreamOutput; - - public D3D12_BLEND_DESC BlendState; - - public uint SampleMask; - - public D3D12_RASTERIZER_DESC RasterizerState; - - public D3D12_DEPTH_STENCIL_DESC DepthStencilState; - - public D3D12_INPUT_LAYOUT_DESC InputLayout; - - public D3D12_INDEX_BUFFER_STRIP_CUT_VALUE IBStripCutValue; - - public D3D12_PRIMITIVE_TOPOLOGY_TYPE PrimitiveTopologyType; - - public uint NumRenderTargets; - - [NativeTypeName("DXGI_FORMAT [8]")] - public _RTVFormats_e__FixedBuffer RTVFormats; - - public DXGI_FORMAT DSVFormat; - - public DXGI_SAMPLE_DESC SampleDesc; - - public uint NodeMask; - - public D3D12_CACHED_PIPELINE_STATE CachedPSO; - - public D3D12_PIPELINE_STATE_FLAGS Flags; - - internal partial struct _RTVFormats_e__FixedBuffer - { - public DXGI_FORMAT e0; - public DXGI_FORMAT e1; - public DXGI_FORMAT e2; - public DXGI_FORMAT e3; - public DXGI_FORMAT e4; - public DXGI_FORMAT e5; - public DXGI_FORMAT e6; - public DXGI_FORMAT e7; - - public ref DXGI_FORMAT this[int index] - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref AsSpan()[index]; - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 8); - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_INDEX_BUFFER_STRIP_CUT_VALUE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_INDEX_BUFFER_STRIP_CUT_VALUE.cs deleted file mode 100644 index a8fc25c7..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_INDEX_BUFFER_STRIP_CUT_VALUE.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D12_INDEX_BUFFER_STRIP_CUT_VALUE - { - D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_DISABLED = 0, - D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFF = 1, - D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFFFFFF = 2, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_INDEX_BUFFER_VIEW.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_INDEX_BUFFER_VIEW.cs deleted file mode 100644 index f35d832d..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_INDEX_BUFFER_VIEW.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_INDEX_BUFFER_VIEW - { - [NativeTypeName("D3D12_GPU_VIRTUAL_ADDRESS")] - public ulong BufferLocation; - - public uint SizeInBytes; - - public DXGI_FORMAT Format; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_INDIRECT_ARGUMENT_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_INDIRECT_ARGUMENT_DESC.cs deleted file mode 100644 index 562c0d45..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_INDIRECT_ARGUMENT_DESC.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal; - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_INDIRECT_ARGUMENT_DESC - { - public D3D12_INDIRECT_ARGUMENT_TYPE Type; - - [NativeTypeName("D3D12_INDIRECT_ARGUMENT_DESC::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/d3d12.h:4111:5)")] - public _Anonymous_e__Union Anonymous; - - public ref _Anonymous_e__Union._VertexBuffer_e__Struct VertexBuffer - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.VertexBuffer, 1)); - } - } - - public ref _Anonymous_e__Union._Constant_e__Struct Constant - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Constant, 1)); - } - } - - public ref _Anonymous_e__Union._ConstantBufferView_e__Struct ConstantBufferView - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.ConstantBufferView, 1)); - } - } - - public ref _Anonymous_e__Union._ShaderResourceView_e__Struct ShaderResourceView - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.ShaderResourceView, 1)); - } - } - - public ref _Anonymous_e__Union._UnorderedAccessView_e__Struct UnorderedAccessView - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.UnorderedAccessView, 1)); - } - } - - [StructLayout(LayoutKind.Explicit)] - internal partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/d3d12.h:4113:9)")] - public _VertexBuffer_e__Struct VertexBuffer; - - [FieldOffset(0)] - [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/d3d12.h:4117:9)")] - public _Constant_e__Struct Constant; - - [FieldOffset(0)] - [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/d3d12.h:4123:9)")] - public _ConstantBufferView_e__Struct ConstantBufferView; - - [FieldOffset(0)] - [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/d3d12.h:4127:9)")] - public _ShaderResourceView_e__Struct ShaderResourceView; - - [FieldOffset(0)] - [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/d3d12.h:4131:9)")] - public _UnorderedAccessView_e__Struct UnorderedAccessView; - - internal partial struct _VertexBuffer_e__Struct - { - public uint Slot; - } - - internal partial struct _Constant_e__Struct - { - public uint RootParameterIndex; - - public uint DestOffsetIn32BitValues; - - public uint Num32BitValuesToSet; - } - - internal partial struct _ConstantBufferView_e__Struct - { - public uint RootParameterIndex; - } - - internal partial struct _ShaderResourceView_e__Struct - { - public uint RootParameterIndex; - } - - internal partial struct _UnorderedAccessView_e__Struct - { - public uint RootParameterIndex; - } - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_INDIRECT_ARGUMENT_TYPE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_INDIRECT_ARGUMENT_TYPE.cs deleted file mode 100644 index b2b69d85..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_INDIRECT_ARGUMENT_TYPE.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D12_INDIRECT_ARGUMENT_TYPE - { - D3D12_INDIRECT_ARGUMENT_TYPE_DRAW = 0, - D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED = (D3D12_INDIRECT_ARGUMENT_TYPE_DRAW + 1), - D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH = (D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED + 1), - D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW = (D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH + 1), - D3D12_INDIRECT_ARGUMENT_TYPE_INDEX_BUFFER_VIEW = (D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW + 1), - D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT = (D3D12_INDIRECT_ARGUMENT_TYPE_INDEX_BUFFER_VIEW + 1), - D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW = (D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT + 1), - D3D12_INDIRECT_ARGUMENT_TYPE_SHADER_RESOURCE_VIEW = (D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW + 1), - D3D12_INDIRECT_ARGUMENT_TYPE_UNORDERED_ACCESS_VIEW = (D3D12_INDIRECT_ARGUMENT_TYPE_SHADER_RESOURCE_VIEW + 1), - D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH_RAYS = (D3D12_INDIRECT_ARGUMENT_TYPE_UNORDERED_ACCESS_VIEW + 1), - D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH_MESH = (D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH_RAYS + 1), - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_INPUT_CLASSIFICATION.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_INPUT_CLASSIFICATION.cs deleted file mode 100644 index d286cda6..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_INPUT_CLASSIFICATION.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D12_INPUT_CLASSIFICATION - { - D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA = 0, - D3D12_INPUT_CLASSIFICATION_PER_INSTANCE_DATA = 1, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_INPUT_ELEMENT_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_INPUT_ELEMENT_DESC.cs deleted file mode 100644 index c84972d3..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_INPUT_ELEMENT_DESC.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D3D12_INPUT_ELEMENT_DESC - { - [NativeTypeName("LPCSTR")] - public sbyte* SemanticName; - - public uint SemanticIndex; - - public DXGI_FORMAT Format; - - public uint InputSlot; - - public uint AlignedByteOffset; - - public D3D12_INPUT_CLASSIFICATION InputSlotClass; - - public uint InstanceDataStepRate; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_INPUT_LAYOUT_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_INPUT_LAYOUT_DESC.cs deleted file mode 100644 index d7e58d56..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_INPUT_LAYOUT_DESC.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D3D12_INPUT_LAYOUT_DESC - { - [NativeTypeName("const D3D12_INPUT_ELEMENT_DESC *")] - public D3D12_INPUT_ELEMENT_DESC* pInputElementDescs; - - public uint NumElements; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_LOGIC_OP.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_LOGIC_OP.cs deleted file mode 100644 index b5c45796..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_LOGIC_OP.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D12_LOGIC_OP - { - D3D12_LOGIC_OP_CLEAR = 0, - D3D12_LOGIC_OP_SET = (D3D12_LOGIC_OP_CLEAR + 1), - D3D12_LOGIC_OP_COPY = (D3D12_LOGIC_OP_SET + 1), - D3D12_LOGIC_OP_COPY_INVERTED = (D3D12_LOGIC_OP_COPY + 1), - D3D12_LOGIC_OP_NOOP = (D3D12_LOGIC_OP_COPY_INVERTED + 1), - D3D12_LOGIC_OP_INVERT = (D3D12_LOGIC_OP_NOOP + 1), - D3D12_LOGIC_OP_AND = (D3D12_LOGIC_OP_INVERT + 1), - D3D12_LOGIC_OP_NAND = (D3D12_LOGIC_OP_AND + 1), - D3D12_LOGIC_OP_OR = (D3D12_LOGIC_OP_NAND + 1), - D3D12_LOGIC_OP_NOR = (D3D12_LOGIC_OP_OR + 1), - D3D12_LOGIC_OP_XOR = (D3D12_LOGIC_OP_NOR + 1), - D3D12_LOGIC_OP_EQUIV = (D3D12_LOGIC_OP_XOR + 1), - D3D12_LOGIC_OP_AND_REVERSE = (D3D12_LOGIC_OP_EQUIV + 1), - D3D12_LOGIC_OP_AND_INVERTED = (D3D12_LOGIC_OP_AND_REVERSE + 1), - D3D12_LOGIC_OP_OR_REVERSE = (D3D12_LOGIC_OP_AND_INVERTED + 1), - D3D12_LOGIC_OP_OR_INVERTED = (D3D12_LOGIC_OP_OR_REVERSE + 1), - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_MEMCPY_DEST.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_MEMCPY_DEST.cs deleted file mode 100644 index b79c95a0..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_MEMCPY_DEST.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D3D12_MEMCPY_DEST - { - public void* pData; - - [NativeTypeName("SIZE_T")] - public nuint RowPitch; - - [NativeTypeName("SIZE_T")] - public nuint SlicePitch; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_PACKED_MIP_INFO.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_PACKED_MIP_INFO.cs deleted file mode 100644 index e5474b90..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_PACKED_MIP_INFO.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_PACKED_MIP_INFO - { - [NativeTypeName("UINT8")] - public byte NumStandardMips; - - [NativeTypeName("UINT8")] - public byte NumPackedMips; - - public uint NumTilesForPackedMips; - - public uint StartTileIndexInOverallResource; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_PREDICATION_OP.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_PREDICATION_OP.cs deleted file mode 100644 index d556a334..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_PREDICATION_OP.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D12_PREDICATION_OP - { - D3D12_PREDICATION_OP_EQUAL_ZERO = 0, - D3D12_PREDICATION_OP_NOT_EQUAL_ZERO = 1, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_PRIMITIVE_TOPOLOGY_TYPE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_PRIMITIVE_TOPOLOGY_TYPE.cs deleted file mode 100644 index 014e1f60..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_PRIMITIVE_TOPOLOGY_TYPE.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D12_PRIMITIVE_TOPOLOGY_TYPE - { - D3D12_PRIMITIVE_TOPOLOGY_TYPE_UNDEFINED = 0, - D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT = 1, - D3D12_PRIMITIVE_TOPOLOGY_TYPE_LINE = 2, - D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE = 3, - D3D12_PRIMITIVE_TOPOLOGY_TYPE_PATCH = 4, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_QUERY_HEAP_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_QUERY_HEAP_DESC.cs deleted file mode 100644 index 7f006c21..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_QUERY_HEAP_DESC.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_QUERY_HEAP_DESC - { - public D3D12_QUERY_HEAP_TYPE Type; - - public uint Count; - - public uint NodeMask; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_QUERY_HEAP_TYPE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_QUERY_HEAP_TYPE.cs deleted file mode 100644 index f20e067d..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_QUERY_HEAP_TYPE.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D12_QUERY_HEAP_TYPE - { - D3D12_QUERY_HEAP_TYPE_OCCLUSION = 0, - D3D12_QUERY_HEAP_TYPE_TIMESTAMP = 1, - D3D12_QUERY_HEAP_TYPE_PIPELINE_STATISTICS = 2, - D3D12_QUERY_HEAP_TYPE_SO_STATISTICS = 3, - D3D12_QUERY_HEAP_TYPE_VIDEO_DECODE_STATISTICS = 4, - D3D12_QUERY_HEAP_TYPE_COPY_QUEUE_TIMESTAMP = 5, - D3D12_QUERY_HEAP_TYPE_PIPELINE_STATISTICS1 = 7, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_QUERY_TYPE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_QUERY_TYPE.cs deleted file mode 100644 index 5dcdb87c..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_QUERY_TYPE.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D12_QUERY_TYPE - { - D3D12_QUERY_TYPE_OCCLUSION = 0, - D3D12_QUERY_TYPE_BINARY_OCCLUSION = 1, - D3D12_QUERY_TYPE_TIMESTAMP = 2, - D3D12_QUERY_TYPE_PIPELINE_STATISTICS = 3, - D3D12_QUERY_TYPE_SO_STATISTICS_STREAM0 = 4, - D3D12_QUERY_TYPE_SO_STATISTICS_STREAM1 = 5, - D3D12_QUERY_TYPE_SO_STATISTICS_STREAM2 = 6, - D3D12_QUERY_TYPE_SO_STATISTICS_STREAM3 = 7, - D3D12_QUERY_TYPE_VIDEO_DECODE_STATISTICS = 8, - D3D12_QUERY_TYPE_PIPELINE_STATISTICS1 = 10, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_RASTERIZER_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_RASTERIZER_DESC.cs deleted file mode 100644 index 90989793..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_RASTERIZER_DESC.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_RASTERIZER_DESC - { - public D3D12_FILL_MODE FillMode; - - public D3D12_CULL_MODE CullMode; - - public BOOL FrontCounterClockwise; - - public int DepthBias; - - public float DepthBiasClamp; - - public float SlopeScaledDepthBias; - - public BOOL DepthClipEnable; - - public BOOL MultisampleEnable; - - public BOOL AntialiasedLineEnable; - - public uint ForcedSampleCount; - - public D3D12_CONSERVATIVE_RASTERIZATION_MODE ConservativeRaster; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_RENDER_TARGET_BLEND_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_RENDER_TARGET_BLEND_DESC.cs deleted file mode 100644 index 30869699..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_RENDER_TARGET_BLEND_DESC.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_RENDER_TARGET_BLEND_DESC - { - public BOOL BlendEnable; - - public BOOL LogicOpEnable; - - public D3D12_BLEND SrcBlend; - - public D3D12_BLEND DestBlend; - - public D3D12_BLEND_OP BlendOp; - - public D3D12_BLEND SrcBlendAlpha; - - public D3D12_BLEND DestBlendAlpha; - - public D3D12_BLEND_OP BlendOpAlpha; - - public D3D12_LOGIC_OP LogicOp; - - [NativeTypeName("UINT8")] - public byte RenderTargetWriteMask; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_RENDER_TARGET_VIEW_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_RENDER_TARGET_VIEW_DESC.cs deleted file mode 100644 index d520dec5..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_RENDER_TARGET_VIEW_DESC.cs +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal; - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_RENDER_TARGET_VIEW_DESC - { - public DXGI_FORMAT Format; - - public D3D12_RTV_DIMENSION ViewDimension; - - [NativeTypeName("D3D12_RENDER_TARGET_VIEW_DESC::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/d3d12.h:3388:5)")] - public _Anonymous_e__Union Anonymous; - - public ref D3D12_BUFFER_RTV Buffer - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Buffer, 1)); - } - } - - public ref D3D12_TEX1D_RTV Texture1D - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture1D, 1)); - } - } - - public ref D3D12_TEX1D_ARRAY_RTV Texture1DArray - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture1DArray, 1)); - } - } - - public ref D3D12_TEX2D_RTV Texture2D - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture2D, 1)); - } - } - - public ref D3D12_TEX2D_ARRAY_RTV Texture2DArray - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture2DArray, 1)); - } - } - - public ref D3D12_TEX2DMS_RTV Texture2DMS - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture2DMS, 1)); - } - } - - public ref D3D12_TEX2DMS_ARRAY_RTV Texture2DMSArray - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture2DMSArray, 1)); - } - } - - public ref D3D12_TEX3D_RTV Texture3D - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture3D, 1)); - } - } - - [StructLayout(LayoutKind.Explicit)] - internal partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public D3D12_BUFFER_RTV Buffer; - - [FieldOffset(0)] - public D3D12_TEX1D_RTV Texture1D; - - [FieldOffset(0)] - public D3D12_TEX1D_ARRAY_RTV Texture1DArray; - - [FieldOffset(0)] - public D3D12_TEX2D_RTV Texture2D; - - [FieldOffset(0)] - public D3D12_TEX2D_ARRAY_RTV Texture2DArray; - - [FieldOffset(0)] - public D3D12_TEX2DMS_RTV Texture2DMS; - - [FieldOffset(0)] - public D3D12_TEX2DMS_ARRAY_RTV Texture2DMSArray; - - [FieldOffset(0)] - public D3D12_TEX3D_RTV Texture3D; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_RTV_DIMENSION.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_RTV_DIMENSION.cs deleted file mode 100644 index cd313e7e..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_RTV_DIMENSION.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D12_RTV_DIMENSION - { - D3D12_RTV_DIMENSION_UNKNOWN = 0, - D3D12_RTV_DIMENSION_BUFFER = 1, - D3D12_RTV_DIMENSION_TEXTURE1D = 2, - D3D12_RTV_DIMENSION_TEXTURE1DARRAY = 3, - D3D12_RTV_DIMENSION_TEXTURE2D = 4, - D3D12_RTV_DIMENSION_TEXTURE2DARRAY = 5, - D3D12_RTV_DIMENSION_TEXTURE2DMS = 6, - D3D12_RTV_DIMENSION_TEXTURE2DMSARRAY = 7, - D3D12_RTV_DIMENSION_TEXTURE3D = 8, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_SAMPLER_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_SAMPLER_DESC.cs deleted file mode 100644 index a3b0b371..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_SAMPLER_DESC.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D3D12_SAMPLER_DESC - { - public D3D12_FILTER Filter; - - public D3D12_TEXTURE_ADDRESS_MODE AddressU; - - public D3D12_TEXTURE_ADDRESS_MODE AddressV; - - public D3D12_TEXTURE_ADDRESS_MODE AddressW; - - public float MipLODBias; - - public uint MaxAnisotropy; - - public D3D12_COMPARISON_FUNC ComparisonFunc; - - [NativeTypeName("FLOAT [4]")] - public fixed float BorderColor[4]; - - public float MinLOD; - - public float MaxLOD; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_SO_DECLARATION_ENTRY.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_SO_DECLARATION_ENTRY.cs deleted file mode 100644 index cafc1eb5..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_SO_DECLARATION_ENTRY.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D3D12_SO_DECLARATION_ENTRY - { - public uint Stream; - - [NativeTypeName("LPCSTR")] - public sbyte* SemanticName; - - public uint SemanticIndex; - - public byte StartComponent; - - public byte ComponentCount; - - public byte OutputSlot; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_STENCIL_OP.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_STENCIL_OP.cs deleted file mode 100644 index f177e640..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_STENCIL_OP.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D12_STENCIL_OP - { - D3D12_STENCIL_OP_KEEP = 1, - D3D12_STENCIL_OP_ZERO = 2, - D3D12_STENCIL_OP_REPLACE = 3, - D3D12_STENCIL_OP_INCR_SAT = 4, - D3D12_STENCIL_OP_DECR_SAT = 5, - D3D12_STENCIL_OP_INVERT = 6, - D3D12_STENCIL_OP_INCR = 7, - D3D12_STENCIL_OP_DECR = 8, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_STREAM_OUTPUT_BUFFER_VIEW.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_STREAM_OUTPUT_BUFFER_VIEW.cs deleted file mode 100644 index 9f68d145..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_STREAM_OUTPUT_BUFFER_VIEW.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_STREAM_OUTPUT_BUFFER_VIEW - { - [NativeTypeName("D3D12_GPU_VIRTUAL_ADDRESS")] - public ulong BufferLocation; - - [NativeTypeName("UINT64")] - public ulong SizeInBytes; - - [NativeTypeName("D3D12_GPU_VIRTUAL_ADDRESS")] - public ulong BufferFilledSizeLocation; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_STREAM_OUTPUT_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_STREAM_OUTPUT_DESC.cs deleted file mode 100644 index f3462b04..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_STREAM_OUTPUT_DESC.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D3D12_STREAM_OUTPUT_DESC - { - [NativeTypeName("const D3D12_SO_DECLARATION_ENTRY *")] - public D3D12_SO_DECLARATION_ENTRY* pSODeclaration; - - public uint NumEntries; - - [NativeTypeName("const UINT *")] - public uint* pBufferStrides; - - public uint NumStrides; - - public uint RasterizedStream; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_SUBRESOURCE_DATA.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_SUBRESOURCE_DATA.cs deleted file mode 100644 index b6cc55df..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_SUBRESOURCE_DATA.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D3D12_SUBRESOURCE_DATA - { - [NativeTypeName("const void *")] - public void* pData; - - [NativeTypeName("LONG_PTR")] - public nint RowPitch; - - [NativeTypeName("LONG_PTR")] - public nint SlicePitch; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_SUBRESOURCE_TILING.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_SUBRESOURCE_TILING.cs deleted file mode 100644 index 8dae8eca..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_SUBRESOURCE_TILING.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_SUBRESOURCE_TILING - { - public uint WidthInTiles; - - [NativeTypeName("UINT16")] - public ushort HeightInTiles; - - [NativeTypeName("UINT16")] - public ushort DepthInTiles; - - public uint StartTileIndexInOverallResource; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX1D_ARRAY_DSV.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX1D_ARRAY_DSV.cs deleted file mode 100644 index ae56eda1..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX1D_ARRAY_DSV.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_TEX1D_ARRAY_DSV - { - public uint MipSlice; - - public uint FirstArraySlice; - - public uint ArraySize; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX1D_ARRAY_RTV.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX1D_ARRAY_RTV.cs deleted file mode 100644 index 251c4aa2..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX1D_ARRAY_RTV.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_TEX1D_ARRAY_RTV - { - public uint MipSlice; - - public uint FirstArraySlice; - - public uint ArraySize; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX1D_DSV.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX1D_DSV.cs deleted file mode 100644 index 951d4832..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX1D_DSV.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_TEX1D_DSV - { - public uint MipSlice; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX1D_RTV.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX1D_RTV.cs deleted file mode 100644 index f102b952..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX1D_RTV.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_TEX1D_RTV - { - public uint MipSlice; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2DMS_ARRAY_DSV.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2DMS_ARRAY_DSV.cs deleted file mode 100644 index fd06223b..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2DMS_ARRAY_DSV.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_TEX2DMS_ARRAY_DSV - { - public uint FirstArraySlice; - - public uint ArraySize; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2DMS_ARRAY_RTV.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2DMS_ARRAY_RTV.cs deleted file mode 100644 index 07e8b7f1..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2DMS_ARRAY_RTV.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_TEX2DMS_ARRAY_RTV - { - public uint FirstArraySlice; - - public uint ArraySize; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2DMS_DSV.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2DMS_DSV.cs deleted file mode 100644 index 8898cf80..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2DMS_DSV.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_TEX2DMS_DSV - { - public uint UnusedField_NothingToDefine; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2DMS_RTV.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2DMS_RTV.cs deleted file mode 100644 index fcf5f10c..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2DMS_RTV.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_TEX2DMS_RTV - { - public uint UnusedField_NothingToDefine; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2D_ARRAY_DSV.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2D_ARRAY_DSV.cs deleted file mode 100644 index f6be9b07..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2D_ARRAY_DSV.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_TEX2D_ARRAY_DSV - { - public uint MipSlice; - - public uint FirstArraySlice; - - public uint ArraySize; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2D_ARRAY_RTV.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2D_ARRAY_RTV.cs deleted file mode 100644 index 18d5246e..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2D_ARRAY_RTV.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_TEX2D_ARRAY_RTV - { - public uint MipSlice; - - public uint FirstArraySlice; - - public uint ArraySize; - - public uint PlaneSlice; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2D_DSV.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2D_DSV.cs deleted file mode 100644 index ccc71943..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2D_DSV.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_TEX2D_DSV - { - public uint MipSlice; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2D_RTV.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2D_RTV.cs deleted file mode 100644 index bfcfefbc..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX2D_RTV.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_TEX2D_RTV - { - public uint MipSlice; - - public uint PlaneSlice; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX3D_RTV.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX3D_RTV.cs deleted file mode 100644 index 407719e3..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEX3D_RTV.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_TEX3D_RTV - { - public uint MipSlice; - - public uint FirstWSlice; - - public uint WSize; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TILED_RESOURCE_COORDINATE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TILED_RESOURCE_COORDINATE.cs deleted file mode 100644 index fb6c21ba..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TILED_RESOURCE_COORDINATE.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_TILED_RESOURCE_COORDINATE - { - public uint X; - - public uint Y; - - public uint Z; - - public uint Subresource; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TILE_COPY_FLAGS.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TILE_COPY_FLAGS.cs deleted file mode 100644 index a781094c..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TILE_COPY_FLAGS.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.DirectX -{ - [Flags] - internal enum D3D12_TILE_COPY_FLAGS - { - D3D12_TILE_COPY_FLAG_NONE = 0, - D3D12_TILE_COPY_FLAG_NO_HAZARD = 0x1, - D3D12_TILE_COPY_FLAG_LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE = 0x2, - D3D12_TILE_COPY_FLAG_SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER = 0x4, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TILE_MAPPING_FLAGS.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TILE_MAPPING_FLAGS.cs deleted file mode 100644 index 57d60c00..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TILE_MAPPING_FLAGS.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.DirectX -{ - [Flags] - internal enum D3D12_TILE_MAPPING_FLAGS - { - D3D12_TILE_MAPPING_FLAG_NONE = 0, - D3D12_TILE_MAPPING_FLAG_NO_HAZARD = 0x1, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TILE_RANGE_FLAGS.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TILE_RANGE_FLAGS.cs deleted file mode 100644 index e5180254..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TILE_RANGE_FLAGS.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.DirectX -{ - [Flags] - internal enum D3D12_TILE_RANGE_FLAGS - { - D3D12_TILE_RANGE_FLAG_NONE = 0, - D3D12_TILE_RANGE_FLAG_NULL = 1, - D3D12_TILE_RANGE_FLAG_SKIP = 2, - D3D12_TILE_RANGE_FLAG_REUSE_SINGLE_TILE = 4, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TILE_REGION_SIZE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TILE_REGION_SIZE.cs deleted file mode 100644 index cdace365..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TILE_REGION_SIZE.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_TILE_REGION_SIZE - { - public uint NumTiles; - - public BOOL UseBox; - - public uint Width; - - [NativeTypeName("UINT16")] - public ushort Height; - - [NativeTypeName("UINT16")] - public ushort Depth; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TILE_SHAPE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TILE_SHAPE.cs deleted file mode 100644 index a2ce13a8..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TILE_SHAPE.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_TILE_SHAPE - { - public uint WidthInTexels; - - public uint HeightInTexels; - - public uint DepthInTexels; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_VERTEX_BUFFER_VIEW.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_VERTEX_BUFFER_VIEW.cs deleted file mode 100644 index cde05f68..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_VERTEX_BUFFER_VIEW.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_VERTEX_BUFFER_VIEW - { - [NativeTypeName("D3D12_GPU_VIRTUAL_ADDRESS")] - public ulong BufferLocation; - - public uint SizeInBytes; - - public uint StrideInBytes; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_VIEWPORT.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_VIEWPORT.cs deleted file mode 100644 index abb57abc..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_VIEWPORT.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D3D12_VIEWPORT - { - public float TopLeftX; - - public float TopLeftY; - - public float Width; - - public float Height; - - public float MinDepth; - - public float MaxDepth; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/DirectX.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/DirectX.cs index 49eb8045..58a52f64 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/DirectX.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/DirectX.cs @@ -4,8 +4,6 @@ // Original source is Copyright © Microsoft. All rights reserved. using System; -using System.Diagnostics; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using TerraFX.Interop.Windows; @@ -13,103 +11,13 @@ namespace TerraFX.Interop.DirectX { internal static unsafe partial class DirectX { - [DllImport("d3d12", ExactSpelling = true)] - public static extern HRESULT D3D12SerializeRootSignature([NativeTypeName("const D3D12_ROOT_SIGNATURE_DESC *")] D3D12_ROOT_SIGNATURE_DESC* pRootSignature, D3D_ROOT_SIGNATURE_VERSION Version, ID3DBlob** ppBlob, ID3DBlob** ppErrorBlob); - - [DllImport("d3d12", ExactSpelling = true)] - public static extern HRESULT D3D12CreateRootSignatureDeserializer([NativeTypeName("LPCVOID")] void* pSrcData, [NativeTypeName("SIZE_T")] nuint SrcDataSizeInBytes, [NativeTypeName("const IID &")] Guid* pRootSignatureDeserializerInterface, void** ppRootSignatureDeserializer); - [DllImport("d3d12", ExactSpelling = true)] public static extern HRESULT D3D12SerializeVersionedRootSignature([NativeTypeName("const D3D12_VERSIONED_ROOT_SIGNATURE_DESC *")] D3D12_VERSIONED_ROOT_SIGNATURE_DESC* pRootSignature, ID3DBlob** ppBlob, ID3DBlob** ppErrorBlob); - [DllImport("d3d12", ExactSpelling = true)] - public static extern HRESULT D3D12CreateVersionedRootSignatureDeserializer([NativeTypeName("LPCVOID")] void* pSrcData, [NativeTypeName("SIZE_T")] nuint SrcDataSizeInBytes, [NativeTypeName("const IID &")] Guid* pRootSignatureDeserializerInterface, void** ppRootSignatureDeserializer); - [DllImport("d3d12", ExactSpelling = true)] public static extern HRESULT D3D12CreateDevice(IUnknown* pAdapter, D3D_FEATURE_LEVEL MinimumFeatureLevel, [NativeTypeName("const IID &")] Guid* riid, void** ppDevice); [DllImport("d3d12", ExactSpelling = true)] public static extern HRESULT D3D12GetDebugInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvDebug); - - [DllImport("d3d12", ExactSpelling = true)] - public static extern HRESULT D3D12EnableExperimentalFeatures(uint NumFeatures, [NativeTypeName("const IID *")] Guid* pIIDs, void* pConfigurationStructs, uint* pConfigurationStructSizes); - - [NativeTypeName("const UUID")] - public static ref readonly Guid D3D12ExperimentalShaderModels - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x3E, 0x57, 0xF5, 0x76, - 0x3A, 0xF1, - 0xF5, 0x40, - 0xB2, - 0x97, - 0x81, - 0xCE, - 0x9E, - 0x18, - 0x93, - 0x3F - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const UUID")] - public static ref readonly Guid D3D12TiledResourceTier4 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x5F, 0x72, 0xC4, 0xC9, - 0x1A, 0xA8, - 0x56, 0x4F, - 0x8C, - 0x5B, - 0xC5, - 0x10, - 0x39, - 0xD6, - 0x94, - 0xFB - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const UUID")] - public static ref readonly Guid D3D12MetaCommand - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x7E, 0xC9, 0x34, 0xC7, - 0x77, 0x80, - 0xC8, 0x48, - 0x9F, - 0xDC, - 0xD9, - 0xD1, - 0xDD, - 0x31, - 0xDD, - 0x77 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [DllImport("d3d12", ExactSpelling = true)] - public static extern HRESULT D3D12GetInterface([NativeTypeName("const IID &")] Guid* rclsid, [NativeTypeName("const IID &")] Guid* riid, void** ppvDebug); } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12CommandAllocator.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12CommandAllocator.cs index f4b4e139..f0e4e20b 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12CommandAllocator.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12CommandAllocator.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("6102DEE4-AF59-4B09-B999-B44D73F09B24")] [NativeTypeName("struct ID3D12CommandAllocator : ID3D12Pageable")] [NativeInheritance("ID3D12Pageable")] - internal unsafe partial struct ID3D12CommandAllocator : ID3D12CommandAllocator.Interface + internal unsafe partial struct ID3D12CommandAllocator { public void** lpVtbl; @@ -81,41 +81,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID3D12CommandAllocator*)Unsafe.AsPointer(ref this)); } - - public interface Interface : ID3D12Pageable.Interface - { - [VtblIndex(8)] - HRESULT Reset(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (LPCWSTR) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetName; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDevice; - - [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Reset; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12CommandList.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12CommandList.cs index c74c0ddf..8f56a731 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12CommandList.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12CommandList.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("7116D91C-E7E4-47CE-B8C6-EC8168F437E5")] [NativeTypeName("struct ID3D12CommandList : ID3D12DeviceChild")] [NativeInheritance("ID3D12DeviceChild")] - internal unsafe partial struct ID3D12CommandList : ID3D12CommandList.Interface + internal unsafe partial struct ID3D12CommandList { public void** lpVtbl; @@ -81,41 +81,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID3D12CommandList*)Unsafe.AsPointer(ref this)); } - - public interface Interface : ID3D12DeviceChild.Interface - { - [VtblIndex(8)] - D3D12_COMMAND_LIST_TYPE GetType(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (LPCWSTR) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetName; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDevice; - - [NativeTypeName("D3D12_COMMAND_LIST_TYPE () __attribute__((stdcall))")] - public new delegate* unmanaged[Stdcall] GetType; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12CommandQueue.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12CommandQueue.cs index c4086d69..f8f9211c 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12CommandQueue.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12CommandQueue.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("0EC870A6-5D7E-4C22-8CFC-5BAAE07616ED")] [NativeTypeName("struct ID3D12CommandQueue : ID3D12Pageable")] [NativeInheritance("ID3D12Pageable")] - internal unsafe partial struct ID3D12CommandQueue : ID3D12CommandQueue.Interface + internal unsafe partial struct ID3D12CommandQueue { public void** lpVtbl; @@ -75,20 +75,6 @@ namespace TerraFX.Interop.DirectX return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID3D12CommandQueue*)Unsafe.AsPointer(ref this), riid, ppvDevice); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public void UpdateTileMappings(ID3D12Resource* pResource, uint NumResourceRegions, [NativeTypeName("const D3D12_TILED_RESOURCE_COORDINATE *")] D3D12_TILED_RESOURCE_COORDINATE* pResourceRegionStartCoordinates, [NativeTypeName("const D3D12_TILE_REGION_SIZE *")] D3D12_TILE_REGION_SIZE* pResourceRegionSizes, ID3D12Heap* pHeap, uint NumRanges, [NativeTypeName("const D3D12_TILE_RANGE_FLAGS *")] D3D12_TILE_RANGE_FLAGS* pRangeFlags, [NativeTypeName("const UINT *")] uint* pHeapRangeStartOffsets, [NativeTypeName("const UINT *")] uint* pRangeTileCounts, D3D12_TILE_MAPPING_FLAGS Flags) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID3D12CommandQueue*)Unsafe.AsPointer(ref this), pResource, NumResourceRegions, pResourceRegionStartCoordinates, pResourceRegionSizes, pHeap, NumRanges, pRangeFlags, pHeapRangeStartOffsets, pRangeTileCounts, Flags); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public void CopyTileMappings(ID3D12Resource* pDstResource, [NativeTypeName("const D3D12_TILED_RESOURCE_COORDINATE *")] D3D12_TILED_RESOURCE_COORDINATE* pDstRegionStartCoordinate, ID3D12Resource* pSrcResource, [NativeTypeName("const D3D12_TILED_RESOURCE_COORDINATE *")] D3D12_TILED_RESOURCE_COORDINATE* pSrcRegionStartCoordinate, [NativeTypeName("const D3D12_TILE_REGION_SIZE *")] D3D12_TILE_REGION_SIZE* pRegionSize, D3D12_TILE_MAPPING_FLAGS Flags) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID3D12CommandQueue*)Unsafe.AsPointer(ref this), pDstResource, pDstRegionStartCoordinate, pSrcResource, pSrcRegionStartCoordinate, pRegionSize, Flags); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(10)] public void ExecuteCommandLists(uint NumCommandLists, [NativeTypeName("ID3D12CommandList *const *")] ID3D12CommandList** ppCommandLists) @@ -152,101 +138,5 @@ namespace TerraFX.Interop.DirectX D3D12_COMMAND_QUEUE_DESC result; return *((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID3D12CommandQueue*)Unsafe.AsPointer(ref this), &result); } - - public interface Interface : ID3D12Pageable.Interface - { - [VtblIndex(8)] - void UpdateTileMappings(ID3D12Resource* pResource, uint NumResourceRegions, [NativeTypeName("const D3D12_TILED_RESOURCE_COORDINATE *")] D3D12_TILED_RESOURCE_COORDINATE* pResourceRegionStartCoordinates, [NativeTypeName("const D3D12_TILE_REGION_SIZE *")] D3D12_TILE_REGION_SIZE* pResourceRegionSizes, ID3D12Heap* pHeap, uint NumRanges, [NativeTypeName("const D3D12_TILE_RANGE_FLAGS *")] D3D12_TILE_RANGE_FLAGS* pRangeFlags, [NativeTypeName("const UINT *")] uint* pHeapRangeStartOffsets, [NativeTypeName("const UINT *")] uint* pRangeTileCounts, D3D12_TILE_MAPPING_FLAGS Flags); - - [VtblIndex(9)] - void CopyTileMappings(ID3D12Resource* pDstResource, [NativeTypeName("const D3D12_TILED_RESOURCE_COORDINATE *")] D3D12_TILED_RESOURCE_COORDINATE* pDstRegionStartCoordinate, ID3D12Resource* pSrcResource, [NativeTypeName("const D3D12_TILED_RESOURCE_COORDINATE *")] D3D12_TILED_RESOURCE_COORDINATE* pSrcRegionStartCoordinate, [NativeTypeName("const D3D12_TILE_REGION_SIZE *")] D3D12_TILE_REGION_SIZE* pRegionSize, D3D12_TILE_MAPPING_FLAGS Flags); - - [VtblIndex(10)] - void ExecuteCommandLists(uint NumCommandLists, [NativeTypeName("ID3D12CommandList *const *")] ID3D12CommandList** ppCommandLists); - - [VtblIndex(11)] - void SetMarker(uint Metadata, [NativeTypeName("const void *")] void* pData, uint Size); - - [VtblIndex(12)] - void BeginEvent(uint Metadata, [NativeTypeName("const void *")] void* pData, uint Size); - - [VtblIndex(13)] - void EndEvent(); - - [VtblIndex(14)] - HRESULT Signal(ID3D12Fence* pFence, [NativeTypeName("UINT64")] ulong Value); - - [VtblIndex(15)] - HRESULT Wait(ID3D12Fence* pFence, [NativeTypeName("UINT64")] ulong Value); - - [VtblIndex(16)] - HRESULT GetTimestampFrequency([NativeTypeName("UINT64 *")] ulong* pFrequency); - - [VtblIndex(17)] - HRESULT GetClockCalibration([NativeTypeName("UINT64 *")] ulong* pGpuTimestamp, [NativeTypeName("UINT64 *")] ulong* pCpuTimestamp); - - [VtblIndex(18)] - D3D12_COMMAND_QUEUE_DESC GetDesc(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (LPCWSTR) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetName; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDevice; - - [NativeTypeName("void (ID3D12Resource *, UINT, const D3D12_TILED_RESOURCE_COORDINATE *, const D3D12_TILE_REGION_SIZE *, ID3D12Heap *, UINT, const D3D12_TILE_RANGE_FLAGS *, const UINT *, const UINT *, D3D12_TILE_MAPPING_FLAGS) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] UpdateTileMappings; - - [NativeTypeName("void (ID3D12Resource *, const D3D12_TILED_RESOURCE_COORDINATE *, ID3D12Resource *, const D3D12_TILED_RESOURCE_COORDINATE *, const D3D12_TILE_REGION_SIZE *, D3D12_TILE_MAPPING_FLAGS) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyTileMappings; - - [NativeTypeName("void (UINT, ID3D12CommandList *const *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ExecuteCommandLists; - - [NativeTypeName("void (UINT, const void *, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetMarker; - - [NativeTypeName("void (UINT, const void *, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] BeginEvent; - - [NativeTypeName("void () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EndEvent; - - [NativeTypeName("HRESULT (ID3D12Fence *, UINT64) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Signal; - - [NativeTypeName("HRESULT (ID3D12Fence *, UINT64) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Wait; - - [NativeTypeName("HRESULT (UINT64 *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTimestampFrequency; - - [NativeTypeName("HRESULT (UINT64 *, UINT64 *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetClockCalibration; - - [NativeTypeName("D3D12_COMMAND_QUEUE_DESC () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDesc; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12CommandSignature.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12CommandSignature.cs deleted file mode 100644 index 283cd2ff..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12CommandSignature.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("C36A797C-EC80-4F0A-8985-A7B2475082D1")] - [NativeTypeName("struct ID3D12CommandSignature : ID3D12Pageable")] - [NativeInheritance("ID3D12Pageable")] - internal unsafe partial struct ID3D12CommandSignature : ID3D12CommandSignature.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID3D12CommandSignature*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID3D12CommandSignature*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID3D12CommandSignature*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetPrivateData([NativeTypeName("const GUID &")] Guid* guid, uint* pDataSize, void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID3D12CommandSignature*)Unsafe.AsPointer(ref this), guid, pDataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT SetPrivateData([NativeTypeName("const GUID &")] Guid* guid, uint DataSize, [NativeTypeName("const void *")] void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID3D12CommandSignature*)Unsafe.AsPointer(ref this), guid, DataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT SetPrivateDataInterface([NativeTypeName("const GUID &")] Guid* guid, [NativeTypeName("const IUnknown *")] IUnknown* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID3D12CommandSignature*)Unsafe.AsPointer(ref this), guid, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT SetName([NativeTypeName("LPCWSTR")] ushort* Name) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID3D12CommandSignature*)Unsafe.AsPointer(ref this), Name); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT GetDevice([NativeTypeName("const IID &")] Guid* riid, void** ppvDevice) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID3D12CommandSignature*)Unsafe.AsPointer(ref this), riid, ppvDevice); - } - - public interface Interface : ID3D12Pageable.Interface - { - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (LPCWSTR) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetName; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDevice; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12DescriptorHeap.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12DescriptorHeap.cs index 1796b377..d778c6e9 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12DescriptorHeap.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12DescriptorHeap.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("8EFB471D-616C-4F49-90F7-127BB763FA51")] [NativeTypeName("struct ID3D12DescriptorHeap : ID3D12Pageable")] [NativeInheritance("ID3D12Pageable")] - internal unsafe partial struct ID3D12DescriptorHeap : ID3D12DescriptorHeap.Interface + internal unsafe partial struct ID3D12DescriptorHeap { public void** lpVtbl; @@ -98,53 +98,5 @@ namespace TerraFX.Interop.DirectX D3D12_GPU_DESCRIPTOR_HANDLE result; return *((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID3D12DescriptorHeap*)Unsafe.AsPointer(ref this), &result); } - - public interface Interface : ID3D12Pageable.Interface - { - [VtblIndex(8)] - D3D12_DESCRIPTOR_HEAP_DESC GetDesc(); - - [VtblIndex(9)] - D3D12_CPU_DESCRIPTOR_HANDLE GetCPUDescriptorHandleForHeapStart(); - - [VtblIndex(10)] - D3D12_GPU_DESCRIPTOR_HANDLE GetGPUDescriptorHandleForHeapStart(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (LPCWSTR) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetName; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDevice; - - [NativeTypeName("D3D12_DESCRIPTOR_HEAP_DESC () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDesc; - - [NativeTypeName("D3D12_CPU_DESCRIPTOR_HANDLE () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetCPUDescriptorHandleForHeapStart; - - [NativeTypeName("D3D12_GPU_DESCRIPTOR_HANDLE () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetGPUDescriptorHandleForHeapStart; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Device.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Device.cs index 4fea6be8..9e6e5d67 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Device.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Device.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("189819F1-1DB6-4B57-BE54-1821339B85F7")] [NativeTypeName("struct ID3D12Device : ID3D12Object")] [NativeInheritance("ID3D12Object")] - internal unsafe partial struct ID3D12Device : ID3D12Device.Interface + internal unsafe partial struct ID3D12Device { public void** lpVtbl; @@ -89,13 +89,6 @@ namespace TerraFX.Interop.DirectX return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID3D12Device*)Unsafe.AsPointer(ref this), type, riid, ppCommandAllocator); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT CreateGraphicsPipelineState([NativeTypeName("const D3D12_GRAPHICS_PIPELINE_STATE_DESC *")] D3D12_GRAPHICS_PIPELINE_STATE_DESC* pDesc, [NativeTypeName("const IID &")] Guid* riid, void** ppPipelineState) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID3D12Device*)Unsafe.AsPointer(ref this), pDesc, riid, ppPipelineState); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(11)] public HRESULT CreateComputePipelineState([NativeTypeName("const D3D12_COMPUTE_PIPELINE_STATE_DESC *")] D3D12_COMPUTE_PIPELINE_STATE_DESC* pDesc, [NativeTypeName("const IID &")] Guid* riid, void** ppPipelineState) @@ -159,27 +152,6 @@ namespace TerraFX.Interop.DirectX ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID3D12Device*)Unsafe.AsPointer(ref this), pResource, pCounterResource, pDesc, DestDescriptor); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(20)] - public void CreateRenderTargetView(ID3D12Resource* pResource, [NativeTypeName("const D3D12_RENDER_TARGET_VIEW_DESC *")] D3D12_RENDER_TARGET_VIEW_DESC* pDesc, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((ID3D12Device*)Unsafe.AsPointer(ref this), pResource, pDesc, DestDescriptor); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(21)] - public void CreateDepthStencilView(ID3D12Resource* pResource, [NativeTypeName("const D3D12_DEPTH_STENCIL_VIEW_DESC *")] D3D12_DEPTH_STENCIL_VIEW_DESC* pDesc, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((ID3D12Device*)Unsafe.AsPointer(ref this), pResource, pDesc, DestDescriptor); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(22)] - public void CreateSampler([NativeTypeName("const D3D12_SAMPLER_DESC *")] D3D12_SAMPLER_DESC* pDesc, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((ID3D12Device*)Unsafe.AsPointer(ref this), pDesc, DestDescriptor); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(23)] public void CopyDescriptors(uint NumDestDescriptorRanges, [NativeTypeName("const D3D12_CPU_DESCRIPTOR_HANDLE *")] D3D12_CPU_DESCRIPTOR_HANDLE* pDestDescriptorRangeStarts, [NativeTypeName("const UINT *")] uint* pDestDescriptorRangeSizes, uint NumSrcDescriptorRanges, [NativeTypeName("const D3D12_CPU_DESCRIPTOR_HANDLE *")] D3D12_CPU_DESCRIPTOR_HANDLE* pSrcDescriptorRangeStarts, [NativeTypeName("const UINT *")] uint* pSrcDescriptorRangeSizes, D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType) @@ -238,13 +210,6 @@ namespace TerraFX.Interop.DirectX return ((delegate* unmanaged[Stdcall])(lpVtbl[30]))((ID3D12Device*)Unsafe.AsPointer(ref this), pDesc, InitialState, pOptimizedClearValue, riid, ppvResource); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(31)] - public HRESULT CreateSharedHandle(ID3D12DeviceChild* pObject, [NativeTypeName("const SECURITY_ATTRIBUTES *")] SECURITY_ATTRIBUTES* pAttributes, [NativeTypeName("DWORD")] uint Access, [NativeTypeName("LPCWSTR")] ushort* Name, HANDLE* pHandle) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[31]))((ID3D12Device*)Unsafe.AsPointer(ref this), pObject, pAttributes, Access, Name, pHandle); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(32)] public HRESULT OpenSharedHandle(HANDLE NTHandle, [NativeTypeName("const IID &")] Guid* riid, void** ppvObj) @@ -259,20 +224,6 @@ namespace TerraFX.Interop.DirectX return ((delegate* unmanaged[Stdcall])(lpVtbl[33]))((ID3D12Device*)Unsafe.AsPointer(ref this), Name, Access, pNTHandle); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(34)] - public HRESULT MakeResident(uint NumObjects, [NativeTypeName("ID3D12Pageable *const *")] ID3D12Pageable** ppObjects) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[34]))((ID3D12Device*)Unsafe.AsPointer(ref this), NumObjects, ppObjects); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(35)] - public HRESULT Evict(uint NumObjects, [NativeTypeName("ID3D12Pageable *const *")] ID3D12Pageable** ppObjects) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[35]))((ID3D12Device*)Unsafe.AsPointer(ref this), NumObjects, ppObjects); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(36)] public HRESULT CreateFence([NativeTypeName("UINT64")] ulong InitialValue, D3D12_FENCE_FLAGS Flags, [NativeTypeName("const IID &")] Guid* riid, void** ppFence) @@ -294,13 +245,6 @@ namespace TerraFX.Interop.DirectX ((delegate* unmanaged[Stdcall])(lpVtbl[38]))((ID3D12Device*)Unsafe.AsPointer(ref this), pResourceDesc, FirstSubresource, NumSubresources, BaseOffset, pLayouts, pNumRows, pRowSizeInBytes, pTotalBytes); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(39)] - public HRESULT CreateQueryHeap([NativeTypeName("const D3D12_QUERY_HEAP_DESC *")] D3D12_QUERY_HEAP_DESC* pDesc, [NativeTypeName("const IID &")] Guid* riid, void** ppvHeap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[39]))((ID3D12Device*)Unsafe.AsPointer(ref this), pDesc, riid, ppvHeap); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(40)] public HRESULT SetStablePowerState(BOOL Enable) @@ -308,20 +252,6 @@ namespace TerraFX.Interop.DirectX return ((delegate* unmanaged[Stdcall])(lpVtbl[40]))((ID3D12Device*)Unsafe.AsPointer(ref this), Enable); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(41)] - public HRESULT CreateCommandSignature([NativeTypeName("const D3D12_COMMAND_SIGNATURE_DESC *")] D3D12_COMMAND_SIGNATURE_DESC* pDesc, ID3D12RootSignature* pRootSignature, [NativeTypeName("const IID &")] Guid* riid, void** ppvCommandSignature) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[41]))((ID3D12Device*)Unsafe.AsPointer(ref this), pDesc, pRootSignature, riid, ppvCommandSignature); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(42)] - public void GetResourceTiling(ID3D12Resource* pTiledResource, uint* pNumTilesForEntireResource, D3D12_PACKED_MIP_INFO* pPackedMipDesc, D3D12_TILE_SHAPE* pStandardTileShapeForNonPackedMips, uint* pNumSubresourceTilings, uint FirstSubresourceTilingToGet, D3D12_SUBRESOURCE_TILING* pSubresourceTilingsForNonPackedMips) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[42]))((ID3D12Device*)Unsafe.AsPointer(ref this), pTiledResource, pNumTilesForEntireResource, pPackedMipDesc, pStandardTileShapeForNonPackedMips, pNumSubresourceTilings, FirstSubresourceTilingToGet, pSubresourceTilingsForNonPackedMips); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(43)] public LUID GetAdapterLuid() @@ -329,254 +259,5 @@ namespace TerraFX.Interop.DirectX LUID result; return *((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12Device*)Unsafe.AsPointer(ref this), &result); } - - public interface Interface : ID3D12Object.Interface - { - [VtblIndex(7)] - uint GetNodeCount(); - - [VtblIndex(8)] - HRESULT CreateCommandQueue([NativeTypeName("const D3D12_COMMAND_QUEUE_DESC *")] D3D12_COMMAND_QUEUE_DESC* pDesc, [NativeTypeName("const IID &")] Guid* riid, void** ppCommandQueue); - - [VtblIndex(9)] - HRESULT CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE type, [NativeTypeName("const IID &")] Guid* riid, void** ppCommandAllocator); - - [VtblIndex(10)] - HRESULT CreateGraphicsPipelineState([NativeTypeName("const D3D12_GRAPHICS_PIPELINE_STATE_DESC *")] D3D12_GRAPHICS_PIPELINE_STATE_DESC* pDesc, [NativeTypeName("const IID &")] Guid* riid, void** ppPipelineState); - - [VtblIndex(11)] - HRESULT CreateComputePipelineState([NativeTypeName("const D3D12_COMPUTE_PIPELINE_STATE_DESC *")] D3D12_COMPUTE_PIPELINE_STATE_DESC* pDesc, [NativeTypeName("const IID &")] Guid* riid, void** ppPipelineState); - - [VtblIndex(12)] - HRESULT CreateCommandList(uint nodeMask, D3D12_COMMAND_LIST_TYPE type, ID3D12CommandAllocator* pCommandAllocator, ID3D12PipelineState* pInitialState, [NativeTypeName("const IID &")] Guid* riid, void** ppCommandList); - - [VtblIndex(13)] - HRESULT CheckFeatureSupport(D3D12_FEATURE Feature, void* pFeatureSupportData, uint FeatureSupportDataSize); - - [VtblIndex(14)] - HRESULT CreateDescriptorHeap([NativeTypeName("const D3D12_DESCRIPTOR_HEAP_DESC *")] D3D12_DESCRIPTOR_HEAP_DESC* pDescriptorHeapDesc, [NativeTypeName("const IID &")] Guid* riid, void** ppvHeap); - - [VtblIndex(15)] - uint GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapType); - - [VtblIndex(16)] - HRESULT CreateRootSignature(uint nodeMask, [NativeTypeName("const void *")] void* pBlobWithRootSignature, [NativeTypeName("SIZE_T")] nuint blobLengthInBytes, [NativeTypeName("const IID &")] Guid* riid, void** ppvRootSignature); - - [VtblIndex(17)] - void CreateConstantBufferView([NativeTypeName("const D3D12_CONSTANT_BUFFER_VIEW_DESC *")] D3D12_CONSTANT_BUFFER_VIEW_DESC* pDesc, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); - - [VtblIndex(18)] - void CreateShaderResourceView(ID3D12Resource* pResource, [NativeTypeName("const D3D12_SHADER_RESOURCE_VIEW_DESC *")] D3D12_SHADER_RESOURCE_VIEW_DESC* pDesc, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); - - [VtblIndex(19)] - void CreateUnorderedAccessView(ID3D12Resource* pResource, ID3D12Resource* pCounterResource, [NativeTypeName("const D3D12_UNORDERED_ACCESS_VIEW_DESC *")] D3D12_UNORDERED_ACCESS_VIEW_DESC* pDesc, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); - - [VtblIndex(20)] - void CreateRenderTargetView(ID3D12Resource* pResource, [NativeTypeName("const D3D12_RENDER_TARGET_VIEW_DESC *")] D3D12_RENDER_TARGET_VIEW_DESC* pDesc, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); - - [VtblIndex(21)] - void CreateDepthStencilView(ID3D12Resource* pResource, [NativeTypeName("const D3D12_DEPTH_STENCIL_VIEW_DESC *")] D3D12_DEPTH_STENCIL_VIEW_DESC* pDesc, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); - - [VtblIndex(22)] - void CreateSampler([NativeTypeName("const D3D12_SAMPLER_DESC *")] D3D12_SAMPLER_DESC* pDesc, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); - - [VtblIndex(23)] - void CopyDescriptors(uint NumDestDescriptorRanges, [NativeTypeName("const D3D12_CPU_DESCRIPTOR_HANDLE *")] D3D12_CPU_DESCRIPTOR_HANDLE* pDestDescriptorRangeStarts, [NativeTypeName("const UINT *")] uint* pDestDescriptorRangeSizes, uint NumSrcDescriptorRanges, [NativeTypeName("const D3D12_CPU_DESCRIPTOR_HANDLE *")] D3D12_CPU_DESCRIPTOR_HANDLE* pSrcDescriptorRangeStarts, [NativeTypeName("const UINT *")] uint* pSrcDescriptorRangeSizes, D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType); - - [VtblIndex(24)] - void CopyDescriptorsSimple(uint NumDescriptors, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptorRangeStart, D3D12_CPU_DESCRIPTOR_HANDLE SrcDescriptorRangeStart, D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType); - - [VtblIndex(25)] - D3D12_RESOURCE_ALLOCATION_INFO GetResourceAllocationInfo(uint visibleMask, uint numResourceDescs, [NativeTypeName("const D3D12_RESOURCE_DESC *")] D3D12_RESOURCE_DESC* pResourceDescs); - - [VtblIndex(26)] - D3D12_HEAP_PROPERTIES GetCustomHeapProperties(uint nodeMask, D3D12_HEAP_TYPE heapType); - - [VtblIndex(27)] - HRESULT CreateCommittedResource([NativeTypeName("const D3D12_HEAP_PROPERTIES *")] D3D12_HEAP_PROPERTIES* pHeapProperties, D3D12_HEAP_FLAGS HeapFlags, [NativeTypeName("const D3D12_RESOURCE_DESC *")] D3D12_RESOURCE_DESC* pDesc, D3D12_RESOURCE_STATES InitialResourceState, [NativeTypeName("const D3D12_CLEAR_VALUE *")] D3D12_CLEAR_VALUE* pOptimizedClearValue, [NativeTypeName("const IID &")] Guid* riidResource, void** ppvResource); - - [VtblIndex(28)] - HRESULT CreateHeap([NativeTypeName("const D3D12_HEAP_DESC *")] D3D12_HEAP_DESC* pDesc, [NativeTypeName("const IID &")] Guid* riid, void** ppvHeap); - - [VtblIndex(29)] - HRESULT CreatePlacedResource(ID3D12Heap* pHeap, [NativeTypeName("UINT64")] ulong HeapOffset, [NativeTypeName("const D3D12_RESOURCE_DESC *")] D3D12_RESOURCE_DESC* pDesc, D3D12_RESOURCE_STATES InitialState, [NativeTypeName("const D3D12_CLEAR_VALUE *")] D3D12_CLEAR_VALUE* pOptimizedClearValue, [NativeTypeName("const IID &")] Guid* riid, void** ppvResource); - - [VtblIndex(30)] - HRESULT CreateReservedResource([NativeTypeName("const D3D12_RESOURCE_DESC *")] D3D12_RESOURCE_DESC* pDesc, D3D12_RESOURCE_STATES InitialState, [NativeTypeName("const D3D12_CLEAR_VALUE *")] D3D12_CLEAR_VALUE* pOptimizedClearValue, [NativeTypeName("const IID &")] Guid* riid, void** ppvResource); - - [VtblIndex(31)] - HRESULT CreateSharedHandle(ID3D12DeviceChild* pObject, [NativeTypeName("const SECURITY_ATTRIBUTES *")] SECURITY_ATTRIBUTES* pAttributes, [NativeTypeName("DWORD")] uint Access, [NativeTypeName("LPCWSTR")] ushort* Name, HANDLE* pHandle); - - [VtblIndex(32)] - HRESULT OpenSharedHandle(HANDLE NTHandle, [NativeTypeName("const IID &")] Guid* riid, void** ppvObj); - - [VtblIndex(33)] - HRESULT OpenSharedHandleByName([NativeTypeName("LPCWSTR")] ushort* Name, [NativeTypeName("DWORD")] uint Access, HANDLE* pNTHandle); - - [VtblIndex(34)] - HRESULT MakeResident(uint NumObjects, [NativeTypeName("ID3D12Pageable *const *")] ID3D12Pageable** ppObjects); - - [VtblIndex(35)] - HRESULT Evict(uint NumObjects, [NativeTypeName("ID3D12Pageable *const *")] ID3D12Pageable** ppObjects); - - [VtblIndex(36)] - HRESULT CreateFence([NativeTypeName("UINT64")] ulong InitialValue, D3D12_FENCE_FLAGS Flags, [NativeTypeName("const IID &")] Guid* riid, void** ppFence); - - [VtblIndex(37)] - HRESULT GetDeviceRemovedReason(); - - [VtblIndex(38)] - void GetCopyableFootprints([NativeTypeName("const D3D12_RESOURCE_DESC *")] D3D12_RESOURCE_DESC* pResourceDesc, uint FirstSubresource, uint NumSubresources, [NativeTypeName("UINT64")] ulong BaseOffset, D3D12_PLACED_SUBRESOURCE_FOOTPRINT* pLayouts, uint* pNumRows, [NativeTypeName("UINT64 *")] ulong* pRowSizeInBytes, [NativeTypeName("UINT64 *")] ulong* pTotalBytes); - - [VtblIndex(39)] - HRESULT CreateQueryHeap([NativeTypeName("const D3D12_QUERY_HEAP_DESC *")] D3D12_QUERY_HEAP_DESC* pDesc, [NativeTypeName("const IID &")] Guid* riid, void** ppvHeap); - - [VtblIndex(40)] - HRESULT SetStablePowerState(BOOL Enable); - - [VtblIndex(41)] - HRESULT CreateCommandSignature([NativeTypeName("const D3D12_COMMAND_SIGNATURE_DESC *")] D3D12_COMMAND_SIGNATURE_DESC* pDesc, ID3D12RootSignature* pRootSignature, [NativeTypeName("const IID &")] Guid* riid, void** ppvCommandSignature); - - [VtblIndex(42)] - void GetResourceTiling(ID3D12Resource* pTiledResource, uint* pNumTilesForEntireResource, D3D12_PACKED_MIP_INFO* pPackedMipDesc, D3D12_TILE_SHAPE* pStandardTileShapeForNonPackedMips, uint* pNumSubresourceTilings, uint FirstSubresourceTilingToGet, D3D12_SUBRESOURCE_TILING* pSubresourceTilingsForNonPackedMips); - - [VtblIndex(43)] - LUID GetAdapterLuid(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (LPCWSTR) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetName; - - [NativeTypeName("UINT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetNodeCount; - - [NativeTypeName("HRESULT (const D3D12_COMMAND_QUEUE_DESC *, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateCommandQueue; - - [NativeTypeName("HRESULT (D3D12_COMMAND_LIST_TYPE, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateCommandAllocator; - - [NativeTypeName("HRESULT (const D3D12_GRAPHICS_PIPELINE_STATE_DESC *, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateGraphicsPipelineState; - - [NativeTypeName("HRESULT (const D3D12_COMPUTE_PIPELINE_STATE_DESC *, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateComputePipelineState; - - [NativeTypeName("HRESULT (UINT, D3D12_COMMAND_LIST_TYPE, ID3D12CommandAllocator *, ID3D12PipelineState *, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateCommandList; - - [NativeTypeName("HRESULT (D3D12_FEATURE, void *, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CheckFeatureSupport; - - [NativeTypeName("HRESULT (const D3D12_DESCRIPTOR_HEAP_DESC *, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateDescriptorHeap; - - [NativeTypeName("UINT (D3D12_DESCRIPTOR_HEAP_TYPE) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDescriptorHandleIncrementSize; - - [NativeTypeName("HRESULT (UINT, const void *, SIZE_T, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateRootSignature; - - [NativeTypeName("void (const D3D12_CONSTANT_BUFFER_VIEW_DESC *, D3D12_CPU_DESCRIPTOR_HANDLE) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateConstantBufferView; - - [NativeTypeName("void (ID3D12Resource *, const D3D12_SHADER_RESOURCE_VIEW_DESC *, D3D12_CPU_DESCRIPTOR_HANDLE) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateShaderResourceView; - - [NativeTypeName("void (ID3D12Resource *, ID3D12Resource *, const D3D12_UNORDERED_ACCESS_VIEW_DESC *, D3D12_CPU_DESCRIPTOR_HANDLE) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateUnorderedAccessView; - - [NativeTypeName("void (ID3D12Resource *, const D3D12_RENDER_TARGET_VIEW_DESC *, D3D12_CPU_DESCRIPTOR_HANDLE) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateRenderTargetView; - - [NativeTypeName("void (ID3D12Resource *, const D3D12_DEPTH_STENCIL_VIEW_DESC *, D3D12_CPU_DESCRIPTOR_HANDLE) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateDepthStencilView; - - [NativeTypeName("void (const D3D12_SAMPLER_DESC *, D3D12_CPU_DESCRIPTOR_HANDLE) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSampler; - - [NativeTypeName("void (UINT, const D3D12_CPU_DESCRIPTOR_HANDLE *, const UINT *, UINT, const D3D12_CPU_DESCRIPTOR_HANDLE *, const UINT *, D3D12_DESCRIPTOR_HEAP_TYPE) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyDescriptors; - - [NativeTypeName("void (UINT, D3D12_CPU_DESCRIPTOR_HANDLE, D3D12_CPU_DESCRIPTOR_HANDLE, D3D12_DESCRIPTOR_HEAP_TYPE) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyDescriptorsSimple; - - [NativeTypeName("D3D12_RESOURCE_ALLOCATION_INFO (UINT, UINT, const D3D12_RESOURCE_DESC *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetResourceAllocationInfo; - - [NativeTypeName("D3D12_HEAP_PROPERTIES (UINT, D3D12_HEAP_TYPE) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetCustomHeapProperties; - - [NativeTypeName("HRESULT (const D3D12_HEAP_PROPERTIES *, D3D12_HEAP_FLAGS, const D3D12_RESOURCE_DESC *, D3D12_RESOURCE_STATES, const D3D12_CLEAR_VALUE *, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateCommittedResource; - - [NativeTypeName("HRESULT (const D3D12_HEAP_DESC *, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateHeap; - - [NativeTypeName("HRESULT (ID3D12Heap *, UINT64, const D3D12_RESOURCE_DESC *, D3D12_RESOURCE_STATES, const D3D12_CLEAR_VALUE *, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreatePlacedResource; - - [NativeTypeName("HRESULT (const D3D12_RESOURCE_DESC *, D3D12_RESOURCE_STATES, const D3D12_CLEAR_VALUE *, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateReservedResource; - - [NativeTypeName("HRESULT (ID3D12DeviceChild *, const SECURITY_ATTRIBUTES *, DWORD, LPCWSTR, HANDLE *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateSharedHandle; - - [NativeTypeName("HRESULT (HANDLE, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] OpenSharedHandle; - - [NativeTypeName("HRESULT (LPCWSTR, DWORD, HANDLE *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] OpenSharedHandleByName; - - [NativeTypeName("HRESULT (UINT, ID3D12Pageable *const *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] MakeResident; - - [NativeTypeName("HRESULT (UINT, ID3D12Pageable *const *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Evict; - - [NativeTypeName("HRESULT (UINT64, D3D12_FENCE_FLAGS, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateFence; - - [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDeviceRemovedReason; - - [NativeTypeName("void (const D3D12_RESOURCE_DESC *, UINT, UINT, UINT64, D3D12_PLACED_SUBRESOURCE_FOOTPRINT *, UINT *, UINT64 *, UINT64 *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetCopyableFootprints; - - [NativeTypeName("HRESULT (const D3D12_QUERY_HEAP_DESC *, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateQueryHeap; - - [NativeTypeName("HRESULT (BOOL) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetStablePowerState; - - [NativeTypeName("HRESULT (const D3D12_COMMAND_SIGNATURE_DESC *, ID3D12RootSignature *, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateCommandSignature; - - [NativeTypeName("void (ID3D12Resource *, UINT *, D3D12_PACKED_MIP_INFO *, D3D12_TILE_SHAPE *, UINT *, UINT, D3D12_SUBRESOURCE_TILING *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetResourceTiling; - - [NativeTypeName("LUID () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetAdapterLuid; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12DeviceChild.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12DeviceChild.cs deleted file mode 100644 index 2e1c5af4..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12DeviceChild.cs +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("905DB94B-A00C-4140-9DF5-2B64CA9EA357")] - [NativeTypeName("struct ID3D12DeviceChild : ID3D12Object")] - [NativeInheritance("ID3D12Object")] - internal unsafe partial struct ID3D12DeviceChild : ID3D12DeviceChild.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID3D12DeviceChild*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID3D12DeviceChild*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID3D12DeviceChild*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetPrivateData([NativeTypeName("const GUID &")] Guid* guid, uint* pDataSize, void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID3D12DeviceChild*)Unsafe.AsPointer(ref this), guid, pDataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT SetPrivateData([NativeTypeName("const GUID &")] Guid* guid, uint DataSize, [NativeTypeName("const void *")] void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID3D12DeviceChild*)Unsafe.AsPointer(ref this), guid, DataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT SetPrivateDataInterface([NativeTypeName("const GUID &")] Guid* guid, [NativeTypeName("const IUnknown *")] IUnknown* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID3D12DeviceChild*)Unsafe.AsPointer(ref this), guid, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT SetName([NativeTypeName("LPCWSTR")] ushort* Name) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID3D12DeviceChild*)Unsafe.AsPointer(ref this), Name); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT GetDevice([NativeTypeName("const IID &")] Guid* riid, void** ppvDevice) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID3D12DeviceChild*)Unsafe.AsPointer(ref this), riid, ppvDevice); - } - - public interface Interface : ID3D12Object.Interface - { - [VtblIndex(7)] - HRESULT GetDevice([NativeTypeName("const IID &")] Guid* riid, void** ppvDevice); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (LPCWSTR) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetName; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDevice; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Fence.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Fence.cs index 68644cad..fb7b58d5 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Fence.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Fence.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("0A753DCF-C4D8-4B91-ADF6-BE5A60D95A76")] [NativeTypeName("struct ID3D12Fence : ID3D12Pageable")] [NativeInheritance("ID3D12Pageable")] - internal unsafe partial struct ID3D12Fence : ID3D12Fence.Interface + internal unsafe partial struct ID3D12Fence { public void** lpVtbl; @@ -96,54 +96,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID3D12Fence*)Unsafe.AsPointer(ref this), Value); } - - public interface Interface : ID3D12Pageable.Interface - { - [VtblIndex(8)] - [return: NativeTypeName("UINT64")] - ulong GetCompletedValue(); - - [VtblIndex(9)] - HRESULT SetEventOnCompletion([NativeTypeName("UINT64")] ulong Value, HANDLE hEvent); - - [VtblIndex(10)] - HRESULT Signal([NativeTypeName("UINT64")] ulong Value); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (LPCWSTR) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetName; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDevice; - - [NativeTypeName("UINT64 () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetCompletedValue; - - [NativeTypeName("HRESULT (UINT64, HANDLE) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetEventOnCompletion; - - [NativeTypeName("HRESULT (UINT64) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Signal; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12GraphicsCommandList.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12GraphicsCommandList.cs index a3c32cd4..cace23fe 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12GraphicsCommandList.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12GraphicsCommandList.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("5B160D0F-AC1B-4185-8BA8-B3AE42A5A455")] [NativeTypeName("struct ID3D12GraphicsCommandList : ID3D12CommandList")] [NativeInheritance("ID3D12CommandList")] - internal unsafe partial struct ID3D12GraphicsCommandList : ID3D12GraphicsCommandList.Interface + internal unsafe partial struct ID3D12GraphicsCommandList { public void** lpVtbl; @@ -145,13 +145,6 @@ namespace TerraFX.Interop.DirectX ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), pDstResource, pSrcResource); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public void CopyTiles(ID3D12Resource* pTiledResource, [NativeTypeName("const D3D12_TILED_RESOURCE_COORDINATE *")] D3D12_TILED_RESOURCE_COORDINATE* pTileRegionStartCoordinate, [NativeTypeName("const D3D12_TILE_REGION_SIZE *")] D3D12_TILE_REGION_SIZE* pTileRegionSize, ID3D12Resource* pBuffer, [NativeTypeName("UINT64")] ulong BufferStartOffsetInBytes, D3D12_TILE_COPY_FLAGS Flags) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), pTiledResource, pTileRegionStartCoordinate, pTileRegionSize, pBuffer, BufferStartOffsetInBytes, Flags); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(19)] public void ResolveSubresource(ID3D12Resource* pDstResource, uint DstSubresource, ID3D12Resource* pSrcResource, uint SrcSubresource, DXGI_FORMAT Format) @@ -166,20 +159,6 @@ namespace TerraFX.Interop.DirectX ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), PrimitiveTopology); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(21)] - public void RSSetViewports(uint NumViewports, [NativeTypeName("const D3D12_VIEWPORT *")] D3D12_VIEWPORT* pViewports) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), NumViewports, pViewports); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(22)] - public void RSSetScissorRects(uint NumRects, [NativeTypeName("const D3D12_RECT *")] RECT* pRects) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), NumRects, pRects); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(23)] public void OMSetBlendFactor([NativeTypeName("const FLOAT [4]")] float* BlendFactor) @@ -319,463 +298,5 @@ namespace TerraFX.Interop.DirectX { ((delegate* unmanaged[Stdcall])(lpVtbl[42]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), RootParameterIndex, BufferLocation); } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(43)] - public void IASetIndexBuffer([NativeTypeName("const D3D12_INDEX_BUFFER_VIEW *")] D3D12_INDEX_BUFFER_VIEW* pView) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), pView); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(44)] - public void IASetVertexBuffers(uint StartSlot, uint NumViews, [NativeTypeName("const D3D12_VERTEX_BUFFER_VIEW *")] D3D12_VERTEX_BUFFER_VIEW* pViews) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[44]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), StartSlot, NumViews, pViews); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(45)] - public void SOSetTargets(uint StartSlot, uint NumViews, [NativeTypeName("const D3D12_STREAM_OUTPUT_BUFFER_VIEW *")] D3D12_STREAM_OUTPUT_BUFFER_VIEW* pViews) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[45]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), StartSlot, NumViews, pViews); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(46)] - public void OMSetRenderTargets(uint NumRenderTargetDescriptors, [NativeTypeName("const D3D12_CPU_DESCRIPTOR_HANDLE *")] D3D12_CPU_DESCRIPTOR_HANDLE* pRenderTargetDescriptors, BOOL RTsSingleHandleToDescriptorRange, [NativeTypeName("const D3D12_CPU_DESCRIPTOR_HANDLE *")] D3D12_CPU_DESCRIPTOR_HANDLE* pDepthStencilDescriptor) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[46]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), NumRenderTargetDescriptors, pRenderTargetDescriptors, RTsSingleHandleToDescriptorRange, pDepthStencilDescriptor); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(47)] - public void ClearDepthStencilView(D3D12_CPU_DESCRIPTOR_HANDLE DepthStencilView, D3D12_CLEAR_FLAGS ClearFlags, float Depth, [NativeTypeName("UINT8")] byte Stencil, uint NumRects, [NativeTypeName("const D3D12_RECT *")] RECT* pRects) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[47]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), DepthStencilView, ClearFlags, Depth, Stencil, NumRects, pRects); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(48)] - public void ClearRenderTargetView(D3D12_CPU_DESCRIPTOR_HANDLE RenderTargetView, [NativeTypeName("const FLOAT [4]")] float* ColorRGBA, uint NumRects, [NativeTypeName("const D3D12_RECT *")] RECT* pRects) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[48]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), RenderTargetView, ColorRGBA, NumRects, pRects); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(49)] - public void ClearUnorderedAccessViewUint(D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, ID3D12Resource* pResource, [NativeTypeName("const UINT [4]")] uint* Values, uint NumRects, [NativeTypeName("const D3D12_RECT *")] RECT* pRects) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[49]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, Values, NumRects, pRects); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(50)] - public void ClearUnorderedAccessViewFloat(D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, ID3D12Resource* pResource, [NativeTypeName("const FLOAT [4]")] float* Values, uint NumRects, [NativeTypeName("const D3D12_RECT *")] RECT* pRects) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[50]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, Values, NumRects, pRects); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(51)] - public void DiscardResource(ID3D12Resource* pResource, [NativeTypeName("const D3D12_DISCARD_REGION *")] D3D12_DISCARD_REGION* pRegion) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[51]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), pResource, pRegion); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(52)] - public void BeginQuery(ID3D12QueryHeap* pQueryHeap, D3D12_QUERY_TYPE Type, uint Index) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[52]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), pQueryHeap, Type, Index); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(53)] - public void EndQuery(ID3D12QueryHeap* pQueryHeap, D3D12_QUERY_TYPE Type, uint Index) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), pQueryHeap, Type, Index); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(54)] - public void ResolveQueryData(ID3D12QueryHeap* pQueryHeap, D3D12_QUERY_TYPE Type, uint StartIndex, uint NumQueries, ID3D12Resource* pDestinationBuffer, [NativeTypeName("UINT64")] ulong AlignedDestinationBufferOffset) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), pQueryHeap, Type, StartIndex, NumQueries, pDestinationBuffer, AlignedDestinationBufferOffset); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(55)] - public void SetPredication(ID3D12Resource* pBuffer, [NativeTypeName("UINT64")] ulong AlignedBufferOffset, D3D12_PREDICATION_OP Operation) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[55]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), pBuffer, AlignedBufferOffset, Operation); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(56)] - public void SetMarker(uint Metadata, [NativeTypeName("const void *")] void* pData, uint Size) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[56]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), Metadata, pData, Size); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(57)] - public void BeginEvent(uint Metadata, [NativeTypeName("const void *")] void* pData, uint Size) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[57]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), Metadata, pData, Size); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(58)] - public void EndEvent() - { - ((delegate* unmanaged[Stdcall])(lpVtbl[58]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(59)] - public void ExecuteIndirect(ID3D12CommandSignature* pCommandSignature, uint MaxCommandCount, ID3D12Resource* pArgumentBuffer, [NativeTypeName("UINT64")] ulong ArgumentBufferOffset, ID3D12Resource* pCountBuffer, [NativeTypeName("UINT64")] ulong CountBufferOffset) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[59]))((ID3D12GraphicsCommandList*)Unsafe.AsPointer(ref this), pCommandSignature, MaxCommandCount, pArgumentBuffer, ArgumentBufferOffset, pCountBuffer, CountBufferOffset); - } - - public interface Interface : ID3D12CommandList.Interface - { - [VtblIndex(9)] - HRESULT Close(); - - [VtblIndex(10)] - HRESULT Reset(ID3D12CommandAllocator* pAllocator, ID3D12PipelineState* pInitialState); - - [VtblIndex(11)] - void ClearState(ID3D12PipelineState* pPipelineState); - - [VtblIndex(12)] - void DrawInstanced(uint VertexCountPerInstance, uint InstanceCount, uint StartVertexLocation, uint StartInstanceLocation); - - [VtblIndex(13)] - void DrawIndexedInstanced(uint IndexCountPerInstance, uint InstanceCount, uint StartIndexLocation, int BaseVertexLocation, uint StartInstanceLocation); - - [VtblIndex(14)] - void Dispatch(uint ThreadGroupCountX, uint ThreadGroupCountY, uint ThreadGroupCountZ); - - [VtblIndex(15)] - void CopyBufferRegion(ID3D12Resource* pDstBuffer, [NativeTypeName("UINT64")] ulong DstOffset, ID3D12Resource* pSrcBuffer, [NativeTypeName("UINT64")] ulong SrcOffset, [NativeTypeName("UINT64")] ulong NumBytes); - - [VtblIndex(16)] - void CopyTextureRegion([NativeTypeName("const D3D12_TEXTURE_COPY_LOCATION *")] D3D12_TEXTURE_COPY_LOCATION* pDst, uint DstX, uint DstY, uint DstZ, [NativeTypeName("const D3D12_TEXTURE_COPY_LOCATION *")] D3D12_TEXTURE_COPY_LOCATION* pSrc, [NativeTypeName("const D3D12_BOX *")] D3D12_BOX* pSrcBox); - - [VtblIndex(17)] - void CopyResource(ID3D12Resource* pDstResource, ID3D12Resource* pSrcResource); - - [VtblIndex(18)] - void CopyTiles(ID3D12Resource* pTiledResource, [NativeTypeName("const D3D12_TILED_RESOURCE_COORDINATE *")] D3D12_TILED_RESOURCE_COORDINATE* pTileRegionStartCoordinate, [NativeTypeName("const D3D12_TILE_REGION_SIZE *")] D3D12_TILE_REGION_SIZE* pTileRegionSize, ID3D12Resource* pBuffer, [NativeTypeName("UINT64")] ulong BufferStartOffsetInBytes, D3D12_TILE_COPY_FLAGS Flags); - - [VtblIndex(19)] - void ResolveSubresource(ID3D12Resource* pDstResource, uint DstSubresource, ID3D12Resource* pSrcResource, uint SrcSubresource, DXGI_FORMAT Format); - - [VtblIndex(20)] - void IASetPrimitiveTopology([NativeTypeName("D3D12_PRIMITIVE_TOPOLOGY")] D3D_PRIMITIVE_TOPOLOGY PrimitiveTopology); - - [VtblIndex(21)] - void RSSetViewports(uint NumViewports, [NativeTypeName("const D3D12_VIEWPORT *")] D3D12_VIEWPORT* pViewports); - - [VtblIndex(22)] - void RSSetScissorRects(uint NumRects, [NativeTypeName("const D3D12_RECT *")] RECT* pRects); - - [VtblIndex(23)] - void OMSetBlendFactor([NativeTypeName("const FLOAT [4]")] float* BlendFactor); - - [VtblIndex(24)] - void OMSetStencilRef(uint StencilRef); - - [VtblIndex(25)] - void SetPipelineState(ID3D12PipelineState* pPipelineState); - - [VtblIndex(26)] - void ResourceBarrier(uint NumBarriers, [NativeTypeName("const D3D12_RESOURCE_BARRIER *")] D3D12_RESOURCE_BARRIER* pBarriers); - - [VtblIndex(27)] - void ExecuteBundle(ID3D12GraphicsCommandList* pCommandList); - - [VtblIndex(28)] - void SetDescriptorHeaps(uint NumDescriptorHeaps, [NativeTypeName("ID3D12DescriptorHeap *const *")] ID3D12DescriptorHeap** ppDescriptorHeaps); - - [VtblIndex(29)] - void SetComputeRootSignature(ID3D12RootSignature* pRootSignature); - - [VtblIndex(30)] - void SetGraphicsRootSignature(ID3D12RootSignature* pRootSignature); - - [VtblIndex(31)] - void SetComputeRootDescriptorTable(uint RootParameterIndex, D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor); - - [VtblIndex(32)] - void SetGraphicsRootDescriptorTable(uint RootParameterIndex, D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor); - - [VtblIndex(33)] - void SetComputeRoot32BitConstant(uint RootParameterIndex, uint SrcData, uint DestOffsetIn32BitValues); - - [VtblIndex(34)] - void SetGraphicsRoot32BitConstant(uint RootParameterIndex, uint SrcData, uint DestOffsetIn32BitValues); - - [VtblIndex(35)] - void SetComputeRoot32BitConstants(uint RootParameterIndex, uint Num32BitValuesToSet, [NativeTypeName("const void *")] void* pSrcData, uint DestOffsetIn32BitValues); - - [VtblIndex(36)] - void SetGraphicsRoot32BitConstants(uint RootParameterIndex, uint Num32BitValuesToSet, [NativeTypeName("const void *")] void* pSrcData, uint DestOffsetIn32BitValues); - - [VtblIndex(37)] - void SetComputeRootConstantBufferView(uint RootParameterIndex, [NativeTypeName("D3D12_GPU_VIRTUAL_ADDRESS")] ulong BufferLocation); - - [VtblIndex(38)] - void SetGraphicsRootConstantBufferView(uint RootParameterIndex, [NativeTypeName("D3D12_GPU_VIRTUAL_ADDRESS")] ulong BufferLocation); - - [VtblIndex(39)] - void SetComputeRootShaderResourceView(uint RootParameterIndex, [NativeTypeName("D3D12_GPU_VIRTUAL_ADDRESS")] ulong BufferLocation); - - [VtblIndex(40)] - void SetGraphicsRootShaderResourceView(uint RootParameterIndex, [NativeTypeName("D3D12_GPU_VIRTUAL_ADDRESS")] ulong BufferLocation); - - [VtblIndex(41)] - void SetComputeRootUnorderedAccessView(uint RootParameterIndex, [NativeTypeName("D3D12_GPU_VIRTUAL_ADDRESS")] ulong BufferLocation); - - [VtblIndex(42)] - void SetGraphicsRootUnorderedAccessView(uint RootParameterIndex, [NativeTypeName("D3D12_GPU_VIRTUAL_ADDRESS")] ulong BufferLocation); - - [VtblIndex(43)] - void IASetIndexBuffer([NativeTypeName("const D3D12_INDEX_BUFFER_VIEW *")] D3D12_INDEX_BUFFER_VIEW* pView); - - [VtblIndex(44)] - void IASetVertexBuffers(uint StartSlot, uint NumViews, [NativeTypeName("const D3D12_VERTEX_BUFFER_VIEW *")] D3D12_VERTEX_BUFFER_VIEW* pViews); - - [VtblIndex(45)] - void SOSetTargets(uint StartSlot, uint NumViews, [NativeTypeName("const D3D12_STREAM_OUTPUT_BUFFER_VIEW *")] D3D12_STREAM_OUTPUT_BUFFER_VIEW* pViews); - - [VtblIndex(46)] - void OMSetRenderTargets(uint NumRenderTargetDescriptors, [NativeTypeName("const D3D12_CPU_DESCRIPTOR_HANDLE *")] D3D12_CPU_DESCRIPTOR_HANDLE* pRenderTargetDescriptors, BOOL RTsSingleHandleToDescriptorRange, [NativeTypeName("const D3D12_CPU_DESCRIPTOR_HANDLE *")] D3D12_CPU_DESCRIPTOR_HANDLE* pDepthStencilDescriptor); - - [VtblIndex(47)] - void ClearDepthStencilView(D3D12_CPU_DESCRIPTOR_HANDLE DepthStencilView, D3D12_CLEAR_FLAGS ClearFlags, float Depth, [NativeTypeName("UINT8")] byte Stencil, uint NumRects, [NativeTypeName("const D3D12_RECT *")] RECT* pRects); - - [VtblIndex(48)] - void ClearRenderTargetView(D3D12_CPU_DESCRIPTOR_HANDLE RenderTargetView, [NativeTypeName("const FLOAT [4]")] float* ColorRGBA, uint NumRects, [NativeTypeName("const D3D12_RECT *")] RECT* pRects); - - [VtblIndex(49)] - void ClearUnorderedAccessViewUint(D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, ID3D12Resource* pResource, [NativeTypeName("const UINT [4]")] uint* Values, uint NumRects, [NativeTypeName("const D3D12_RECT *")] RECT* pRects); - - [VtblIndex(50)] - void ClearUnorderedAccessViewFloat(D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, ID3D12Resource* pResource, [NativeTypeName("const FLOAT [4]")] float* Values, uint NumRects, [NativeTypeName("const D3D12_RECT *")] RECT* pRects); - - [VtblIndex(51)] - void DiscardResource(ID3D12Resource* pResource, [NativeTypeName("const D3D12_DISCARD_REGION *")] D3D12_DISCARD_REGION* pRegion); - - [VtblIndex(52)] - void BeginQuery(ID3D12QueryHeap* pQueryHeap, D3D12_QUERY_TYPE Type, uint Index); - - [VtblIndex(53)] - void EndQuery(ID3D12QueryHeap* pQueryHeap, D3D12_QUERY_TYPE Type, uint Index); - - [VtblIndex(54)] - void ResolveQueryData(ID3D12QueryHeap* pQueryHeap, D3D12_QUERY_TYPE Type, uint StartIndex, uint NumQueries, ID3D12Resource* pDestinationBuffer, [NativeTypeName("UINT64")] ulong AlignedDestinationBufferOffset); - - [VtblIndex(55)] - void SetPredication(ID3D12Resource* pBuffer, [NativeTypeName("UINT64")] ulong AlignedBufferOffset, D3D12_PREDICATION_OP Operation); - - [VtblIndex(56)] - void SetMarker(uint Metadata, [NativeTypeName("const void *")] void* pData, uint Size); - - [VtblIndex(57)] - void BeginEvent(uint Metadata, [NativeTypeName("const void *")] void* pData, uint Size); - - [VtblIndex(58)] - void EndEvent(); - - [VtblIndex(59)] - void ExecuteIndirect(ID3D12CommandSignature* pCommandSignature, uint MaxCommandCount, ID3D12Resource* pArgumentBuffer, [NativeTypeName("UINT64")] ulong ArgumentBufferOffset, ID3D12Resource* pCountBuffer, [NativeTypeName("UINT64")] ulong CountBufferOffset); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (LPCWSTR) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetName; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDevice; - - [NativeTypeName("D3D12_COMMAND_LIST_TYPE () __attribute__((stdcall))")] - public new delegate* unmanaged[Stdcall] GetType; - - [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Close; - - [NativeTypeName("HRESULT (ID3D12CommandAllocator *, ID3D12PipelineState *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Reset; - - [NativeTypeName("void (ID3D12PipelineState *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ClearState; - - [NativeTypeName("void (UINT, UINT, UINT, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawInstanced; - - [NativeTypeName("void (UINT, UINT, UINT, INT, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawIndexedInstanced; - - [NativeTypeName("void (UINT, UINT, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Dispatch; - - [NativeTypeName("void (ID3D12Resource *, UINT64, ID3D12Resource *, UINT64, UINT64) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyBufferRegion; - - [NativeTypeName("void (const D3D12_TEXTURE_COPY_LOCATION *, UINT, UINT, UINT, const D3D12_TEXTURE_COPY_LOCATION *, const D3D12_BOX *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyTextureRegion; - - [NativeTypeName("void (ID3D12Resource *, ID3D12Resource *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyResource; - - [NativeTypeName("void (ID3D12Resource *, const D3D12_TILED_RESOURCE_COORDINATE *, const D3D12_TILE_REGION_SIZE *, ID3D12Resource *, UINT64, D3D12_TILE_COPY_FLAGS) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyTiles; - - [NativeTypeName("void (ID3D12Resource *, UINT, ID3D12Resource *, UINT, DXGI_FORMAT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ResolveSubresource; - - [NativeTypeName("void (D3D12_PRIMITIVE_TOPOLOGY) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IASetPrimitiveTopology; - - [NativeTypeName("void (UINT, const D3D12_VIEWPORT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RSSetViewports; - - [NativeTypeName("void (UINT, const D3D12_RECT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RSSetScissorRects; - - [NativeTypeName("void (const FLOAT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] OMSetBlendFactor; - - [NativeTypeName("void (UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] OMSetStencilRef; - - [NativeTypeName("void (ID3D12PipelineState *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPipelineState; - - [NativeTypeName("void (UINT, const D3D12_RESOURCE_BARRIER *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ResourceBarrier; - - [NativeTypeName("void (ID3D12GraphicsCommandList *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ExecuteBundle; - - [NativeTypeName("void (UINT, ID3D12DescriptorHeap *const *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetDescriptorHeaps; - - [NativeTypeName("void (ID3D12RootSignature *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetComputeRootSignature; - - [NativeTypeName("void (ID3D12RootSignature *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetGraphicsRootSignature; - - [NativeTypeName("void (UINT, D3D12_GPU_DESCRIPTOR_HANDLE) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetComputeRootDescriptorTable; - - [NativeTypeName("void (UINT, D3D12_GPU_DESCRIPTOR_HANDLE) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetGraphicsRootDescriptorTable; - - [NativeTypeName("void (UINT, UINT, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetComputeRoot32BitConstant; - - [NativeTypeName("void (UINT, UINT, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetGraphicsRoot32BitConstant; - - [NativeTypeName("void (UINT, UINT, const void *, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetComputeRoot32BitConstants; - - [NativeTypeName("void (UINT, UINT, const void *, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetGraphicsRoot32BitConstants; - - [NativeTypeName("void (UINT, D3D12_GPU_VIRTUAL_ADDRESS) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetComputeRootConstantBufferView; - - [NativeTypeName("void (UINT, D3D12_GPU_VIRTUAL_ADDRESS) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetGraphicsRootConstantBufferView; - - [NativeTypeName("void (UINT, D3D12_GPU_VIRTUAL_ADDRESS) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetComputeRootShaderResourceView; - - [NativeTypeName("void (UINT, D3D12_GPU_VIRTUAL_ADDRESS) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetGraphicsRootShaderResourceView; - - [NativeTypeName("void (UINT, D3D12_GPU_VIRTUAL_ADDRESS) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetComputeRootUnorderedAccessView; - - [NativeTypeName("void (UINT, D3D12_GPU_VIRTUAL_ADDRESS) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetGraphicsRootUnorderedAccessView; - - [NativeTypeName("void (const D3D12_INDEX_BUFFER_VIEW *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IASetIndexBuffer; - - [NativeTypeName("void (UINT, UINT, const D3D12_VERTEX_BUFFER_VIEW *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IASetVertexBuffers; - - [NativeTypeName("void (UINT, UINT, const D3D12_STREAM_OUTPUT_BUFFER_VIEW *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SOSetTargets; - - [NativeTypeName("void (UINT, const D3D12_CPU_DESCRIPTOR_HANDLE *, BOOL, const D3D12_CPU_DESCRIPTOR_HANDLE *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] OMSetRenderTargets; - - [NativeTypeName("void (D3D12_CPU_DESCRIPTOR_HANDLE, D3D12_CLEAR_FLAGS, FLOAT, UINT8, UINT, const D3D12_RECT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ClearDepthStencilView; - - [NativeTypeName("void (D3D12_CPU_DESCRIPTOR_HANDLE, const FLOAT *, UINT, const D3D12_RECT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ClearRenderTargetView; - - [NativeTypeName("void (D3D12_GPU_DESCRIPTOR_HANDLE, D3D12_CPU_DESCRIPTOR_HANDLE, ID3D12Resource *, const UINT *, UINT, const D3D12_RECT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ClearUnorderedAccessViewUint; - - [NativeTypeName("void (D3D12_GPU_DESCRIPTOR_HANDLE, D3D12_CPU_DESCRIPTOR_HANDLE, ID3D12Resource *, const FLOAT *, UINT, const D3D12_RECT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ClearUnorderedAccessViewFloat; - - [NativeTypeName("void (ID3D12Resource *, const D3D12_DISCARD_REGION *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DiscardResource; - - [NativeTypeName("void (ID3D12QueryHeap *, D3D12_QUERY_TYPE, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] BeginQuery; - - [NativeTypeName("void (ID3D12QueryHeap *, D3D12_QUERY_TYPE, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EndQuery; - - [NativeTypeName("void (ID3D12QueryHeap *, D3D12_QUERY_TYPE, UINT, UINT, ID3D12Resource *, UINT64) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ResolveQueryData; - - [NativeTypeName("void (ID3D12Resource *, UINT64, D3D12_PREDICATION_OP) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPredication; - - [NativeTypeName("void (UINT, const void *, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetMarker; - - [NativeTypeName("void (UINT, const void *, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] BeginEvent; - - [NativeTypeName("void () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EndEvent; - - [NativeTypeName("void (ID3D12CommandSignature *, UINT, ID3D12Resource *, UINT64, ID3D12Resource *, UINT64) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ExecuteIndirect; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Heap.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Heap.cs index b28333d3..4bb283ef 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Heap.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Heap.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("6B3B2502-6E51-45B3-90EE-9884265E8DF3")] [NativeTypeName("struct ID3D12Heap : ID3D12Pageable")] [NativeInheritance("ID3D12Pageable")] - internal unsafe partial struct ID3D12Heap : ID3D12Heap.Interface + internal unsafe partial struct ID3D12Heap { public void** lpVtbl; @@ -82,41 +82,5 @@ namespace TerraFX.Interop.DirectX D3D12_HEAP_DESC result; return *((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID3D12Heap*)Unsafe.AsPointer(ref this), &result); } - - public interface Interface : ID3D12Pageable.Interface - { - [VtblIndex(8)] - D3D12_HEAP_DESC GetDesc(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (LPCWSTR) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetName; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDevice; - - [NativeTypeName("D3D12_HEAP_DESC () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDesc; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Object.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Object.cs deleted file mode 100644 index 9593968a..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Object.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("C4FEC28F-7966-4E95-9F94-F431CB56C3B8")] - [NativeTypeName("struct ID3D12Object : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct ID3D12Object : ID3D12Object.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID3D12Object*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID3D12Object*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID3D12Object*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetPrivateData([NativeTypeName("const GUID &")] Guid* guid, uint* pDataSize, void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID3D12Object*)Unsafe.AsPointer(ref this), guid, pDataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT SetPrivateData([NativeTypeName("const GUID &")] Guid* guid, uint DataSize, [NativeTypeName("const void *")] void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID3D12Object*)Unsafe.AsPointer(ref this), guid, DataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT SetPrivateDataInterface([NativeTypeName("const GUID &")] Guid* guid, [NativeTypeName("const IUnknown *")] IUnknown* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID3D12Object*)Unsafe.AsPointer(ref this), guid, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT SetName([NativeTypeName("LPCWSTR")] ushort* Name) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID3D12Object*)Unsafe.AsPointer(ref this), Name); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT GetPrivateData([NativeTypeName("const GUID &")] Guid* guid, uint* pDataSize, void* pData); - - [VtblIndex(4)] - HRESULT SetPrivateData([NativeTypeName("const GUID &")] Guid* guid, uint DataSize, [NativeTypeName("const void *")] void* pData); - - [VtblIndex(5)] - HRESULT SetPrivateDataInterface([NativeTypeName("const GUID &")] Guid* guid, [NativeTypeName("const IUnknown *")] IUnknown* pData); - - [VtblIndex(6)] - HRESULT SetName([NativeTypeName("LPCWSTR")] ushort* Name); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (LPCWSTR) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetName; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Pageable.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Pageable.cs deleted file mode 100644 index a5897e69..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Pageable.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("63EE58FB-1268-4835-86DA-F008CE62F0D6")] - [NativeTypeName("struct ID3D12Pageable : ID3D12DeviceChild")] - [NativeInheritance("ID3D12DeviceChild")] - internal unsafe partial struct ID3D12Pageable : ID3D12Pageable.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID3D12Pageable*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID3D12Pageable*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID3D12Pageable*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetPrivateData([NativeTypeName("const GUID &")] Guid* guid, uint* pDataSize, void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID3D12Pageable*)Unsafe.AsPointer(ref this), guid, pDataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT SetPrivateData([NativeTypeName("const GUID &")] Guid* guid, uint DataSize, [NativeTypeName("const void *")] void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID3D12Pageable*)Unsafe.AsPointer(ref this), guid, DataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT SetPrivateDataInterface([NativeTypeName("const GUID &")] Guid* guid, [NativeTypeName("const IUnknown *")] IUnknown* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID3D12Pageable*)Unsafe.AsPointer(ref this), guid, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT SetName([NativeTypeName("LPCWSTR")] ushort* Name) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID3D12Pageable*)Unsafe.AsPointer(ref this), Name); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT GetDevice([NativeTypeName("const IID &")] Guid* riid, void** ppvDevice) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID3D12Pageable*)Unsafe.AsPointer(ref this), riid, ppvDevice); - } - - public interface Interface : ID3D12DeviceChild.Interface - { - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (LPCWSTR) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetName; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDevice; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12PipelineState.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12PipelineState.cs index 59c5fb6f..d539b7d8 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12PipelineState.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12PipelineState.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("765A30F3-F624-4C6F-A828-ACE948622445")] [NativeTypeName("struct ID3D12PipelineState : ID3D12Pageable")] [NativeInheritance("ID3D12Pageable")] - internal unsafe partial struct ID3D12PipelineState : ID3D12PipelineState.Interface + internal unsafe partial struct ID3D12PipelineState { public void** lpVtbl; @@ -81,41 +81,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID3D12PipelineState*)Unsafe.AsPointer(ref this), ppBlob); } - - public interface Interface : ID3D12Pageable.Interface - { - [VtblIndex(8)] - HRESULT GetCachedBlob(ID3DBlob** ppBlob); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (LPCWSTR) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetName; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDevice; - - [NativeTypeName("HRESULT (ID3DBlob **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetCachedBlob; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12QueryHeap.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12QueryHeap.cs deleted file mode 100644 index bc98fa4a..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12QueryHeap.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("0D9658AE-ED45-469E-A61D-970EC583CAB4")] - [NativeTypeName("struct ID3D12QueryHeap : ID3D12Pageable")] - [NativeInheritance("ID3D12Pageable")] - internal unsafe partial struct ID3D12QueryHeap : ID3D12QueryHeap.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID3D12QueryHeap*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID3D12QueryHeap*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID3D12QueryHeap*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetPrivateData([NativeTypeName("const GUID &")] Guid* guid, uint* pDataSize, void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID3D12QueryHeap*)Unsafe.AsPointer(ref this), guid, pDataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT SetPrivateData([NativeTypeName("const GUID &")] Guid* guid, uint DataSize, [NativeTypeName("const void *")] void* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID3D12QueryHeap*)Unsafe.AsPointer(ref this), guid, DataSize, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT SetPrivateDataInterface([NativeTypeName("const GUID &")] Guid* guid, [NativeTypeName("const IUnknown *")] IUnknown* pData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID3D12QueryHeap*)Unsafe.AsPointer(ref this), guid, pData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT SetName([NativeTypeName("LPCWSTR")] ushort* Name) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID3D12QueryHeap*)Unsafe.AsPointer(ref this), Name); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT GetDevice([NativeTypeName("const IID &")] Guid* riid, void** ppvDevice) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID3D12QueryHeap*)Unsafe.AsPointer(ref this), riid, ppvDevice); - } - - public interface Interface : ID3D12Pageable.Interface - { - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (LPCWSTR) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetName; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDevice; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Resource.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Resource.cs index 7b59a0cc..a9424e62 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Resource.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12Resource.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("696442BE-A72E-4059-BC79-5B5C98040FAD")] [NativeTypeName("struct ID3D12Resource : ID3D12Pageable")] [NativeInheritance("ID3D12Pageable")] - internal unsafe partial struct ID3D12Resource : ID3D12Resource.Interface + internal unsafe partial struct ID3D12Resource { public void** lpVtbl; @@ -125,78 +125,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID3D12Resource*)Unsafe.AsPointer(ref this), pHeapProperties, pHeapFlags); } - - public interface Interface : ID3D12Pageable.Interface - { - [VtblIndex(8)] - HRESULT Map(uint Subresource, [NativeTypeName("const D3D12_RANGE *")] D3D12_RANGE* pReadRange, void** ppData); - - [VtblIndex(9)] - void Unmap(uint Subresource, [NativeTypeName("const D3D12_RANGE *")] D3D12_RANGE* pWrittenRange); - - [VtblIndex(10)] - D3D12_RESOURCE_DESC GetDesc(); - - [VtblIndex(11)] - [return: NativeTypeName("D3D12_GPU_VIRTUAL_ADDRESS")] - ulong GetGPUVirtualAddress(); - - [VtblIndex(12)] - HRESULT WriteToSubresource(uint DstSubresource, [NativeTypeName("const D3D12_BOX *")] D3D12_BOX* pDstBox, [NativeTypeName("const void *")] void* pSrcData, uint SrcRowPitch, uint SrcDepthPitch); - - [VtblIndex(13)] - HRESULT ReadFromSubresource(void* pDstData, uint DstRowPitch, uint DstDepthPitch, uint SrcSubresource, [NativeTypeName("const D3D12_BOX *")] D3D12_BOX* pSrcBox); - - [VtblIndex(14)] - HRESULT GetHeapProperties(D3D12_HEAP_PROPERTIES* pHeapProperties, D3D12_HEAP_FLAGS* pHeapFlags); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (LPCWSTR) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetName; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDevice; - - [NativeTypeName("HRESULT (UINT, const D3D12_RANGE *, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Map; - - [NativeTypeName("void (UINT, const D3D12_RANGE *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Unmap; - - [NativeTypeName("D3D12_RESOURCE_DESC () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDesc; - - [NativeTypeName("D3D12_GPU_VIRTUAL_ADDRESS () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetGPUVirtualAddress; - - [NativeTypeName("HRESULT (UINT, const D3D12_BOX *, const void *, UINT, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] WriteToSubresource; - - [NativeTypeName("HRESULT (void *, UINT, UINT, UINT, const D3D12_BOX *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ReadFromSubresource; - - [NativeTypeName("HRESULT (D3D12_HEAP_PROPERTIES *, D3D12_HEAP_FLAGS *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetHeapProperties; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12RootSignature.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12RootSignature.cs index a4bf3dc1..a96f1266 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12RootSignature.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/ID3D12RootSignature.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("C54A6B66-72DF-4EE8-8BE5-A946A1429214")] [NativeTypeName("struct ID3D12RootSignature : ID3D12DeviceChild")] [NativeInheritance("ID3D12DeviceChild")] - internal unsafe partial struct ID3D12RootSignature : ID3D12RootSignature.Interface + internal unsafe partial struct ID3D12RootSignature { public void** lpVtbl; @@ -74,36 +74,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID3D12RootSignature*)Unsafe.AsPointer(ref this), riid, ppvDevice); } - - public interface Interface : ID3D12DeviceChild.Interface - { - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const GUID &, UINT *, void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, UINT, const void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateData; - - [NativeTypeName("HRESULT (const GUID &, const IUnknown *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPrivateDataInterface; - - [NativeTypeName("HRESULT (LPCWSTR) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetName; - - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDevice; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12sdklayers/ID3D12Debug.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12sdklayers/ID3D12Debug.cs index 3c9fb4bb..b0016aac 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12sdklayers/ID3D12Debug.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12sdklayers/ID3D12Debug.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("344488B7-6846-474B-B989-F027448245E0")] [NativeTypeName("struct ID3D12Debug : IUnknown")] [NativeInheritance("IUnknown")] - internal unsafe partial struct ID3D12Debug : ID3D12Debug.Interface + internal unsafe partial struct ID3D12Debug { public void** lpVtbl; @@ -46,26 +46,5 @@ namespace TerraFX.Interop.DirectX { ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID3D12Debug*)Unsafe.AsPointer(ref this)); } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - void EnableDebugLayer(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnableDebugLayer; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12sdklayers/ID3D12Debug1.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12sdklayers/ID3D12Debug1.cs index 5b4eb72d..ab77db14 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12sdklayers/ID3D12Debug1.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12sdklayers/ID3D12Debug1.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("AFFAA4CA-63FE-4D8E-B8AD-159000AF4304")] [NativeTypeName("struct ID3D12Debug1 : IUnknown")] [NativeInheritance("IUnknown")] - internal unsafe partial struct ID3D12Debug1 : ID3D12Debug1.Interface + internal unsafe partial struct ID3D12Debug1 { public void** lpVtbl; @@ -60,38 +60,5 @@ namespace TerraFX.Interop.DirectX { ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID3D12Debug1*)Unsafe.AsPointer(ref this), Enable); } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - void EnableDebugLayer(); - - [VtblIndex(4)] - void SetEnableGPUBasedValidation(BOOL Enable); - - [VtblIndex(5)] - void SetEnableSynchronizedCommandQueueValidation(BOOL Enable); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnableDebugLayer; - - [NativeTypeName("void (BOOL) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetEnableGPUBasedValidation; - - [NativeTypeName("void (BOOL) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetEnableSynchronizedCommandQueueValidation; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12sdklayers/ID3D12InfoQueue.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12sdklayers/ID3D12InfoQueue.cs index 63e18c40..d72c17b3 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12sdklayers/ID3D12InfoQueue.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12sdklayers/ID3D12InfoQueue.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("0742A90B-C387-483F-B946-30A7E4E61458")] [NativeTypeName("struct ID3D12InfoQueue : IUnknown")] [NativeInheritance("IUnknown")] - internal unsafe partial struct ID3D12InfoQueue : ID3D12InfoQueue.Interface + internal unsafe partial struct ID3D12InfoQueue { public void** lpVtbl; @@ -290,236 +290,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[37]))((ID3D12InfoQueue*)Unsafe.AsPointer(ref this)); } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT SetMessageCountLimit([NativeTypeName("UINT64")] ulong MessageCountLimit); - - [VtblIndex(4)] - void ClearStoredMessages(); - - [VtblIndex(5)] - HRESULT GetMessage([NativeTypeName("UINT64")] ulong MessageIndex, D3D12_MESSAGE* pMessage, [NativeTypeName("SIZE_T *")] nuint* pMessageByteLength); - - [VtblIndex(6)] - [return: NativeTypeName("UINT64")] - ulong GetNumMessagesAllowedByStorageFilter(); - - [VtblIndex(7)] - [return: NativeTypeName("UINT64")] - ulong GetNumMessagesDeniedByStorageFilter(); - - [VtblIndex(8)] - [return: NativeTypeName("UINT64")] - ulong GetNumStoredMessages(); - - [VtblIndex(9)] - [return: NativeTypeName("UINT64")] - ulong GetNumStoredMessagesAllowedByRetrievalFilter(); - - [VtblIndex(10)] - [return: NativeTypeName("UINT64")] - ulong GetNumMessagesDiscardedByMessageCountLimit(); - - [VtblIndex(11)] - [return: NativeTypeName("UINT64")] - ulong GetMessageCountLimit(); - - [VtblIndex(12)] - HRESULT AddStorageFilterEntries(D3D12_INFO_QUEUE_FILTER* pFilter); - - [VtblIndex(13)] - HRESULT GetStorageFilter(D3D12_INFO_QUEUE_FILTER* pFilter, [NativeTypeName("SIZE_T *")] nuint* pFilterByteLength); - - [VtblIndex(14)] - void ClearStorageFilter(); - - [VtblIndex(15)] - HRESULT PushEmptyStorageFilter(); - - [VtblIndex(16)] - HRESULT PushCopyOfStorageFilter(); - - [VtblIndex(17)] - HRESULT PushStorageFilter(D3D12_INFO_QUEUE_FILTER* pFilter); - - [VtblIndex(18)] - void PopStorageFilter(); - - [VtblIndex(19)] - uint GetStorageFilterStackSize(); - - [VtblIndex(20)] - HRESULT AddRetrievalFilterEntries(D3D12_INFO_QUEUE_FILTER* pFilter); - - [VtblIndex(21)] - HRESULT GetRetrievalFilter(D3D12_INFO_QUEUE_FILTER* pFilter, [NativeTypeName("SIZE_T *")] nuint* pFilterByteLength); - - [VtblIndex(22)] - void ClearRetrievalFilter(); - - [VtblIndex(23)] - HRESULT PushEmptyRetrievalFilter(); - - [VtblIndex(24)] - HRESULT PushCopyOfRetrievalFilter(); - - [VtblIndex(25)] - HRESULT PushRetrievalFilter(D3D12_INFO_QUEUE_FILTER* pFilter); - - [VtblIndex(26)] - void PopRetrievalFilter(); - - [VtblIndex(27)] - uint GetRetrievalFilterStackSize(); - - [VtblIndex(28)] - HRESULT AddMessage(D3D12_MESSAGE_CATEGORY Category, D3D12_MESSAGE_SEVERITY Severity, D3D12_MESSAGE_ID ID, [NativeTypeName("LPCSTR")] sbyte* pDescription); - - [VtblIndex(29)] - HRESULT AddApplicationMessage(D3D12_MESSAGE_SEVERITY Severity, [NativeTypeName("LPCSTR")] sbyte* pDescription); - - [VtblIndex(30)] - HRESULT SetBreakOnCategory(D3D12_MESSAGE_CATEGORY Category, BOOL bEnable); - - [VtblIndex(31)] - HRESULT SetBreakOnSeverity(D3D12_MESSAGE_SEVERITY Severity, BOOL bEnable); - - [VtblIndex(32)] - HRESULT SetBreakOnID(D3D12_MESSAGE_ID ID, BOOL bEnable); - - [VtblIndex(33)] - BOOL GetBreakOnCategory(D3D12_MESSAGE_CATEGORY Category); - - [VtblIndex(34)] - BOOL GetBreakOnSeverity(D3D12_MESSAGE_SEVERITY Severity); - - [VtblIndex(35)] - BOOL GetBreakOnID(D3D12_MESSAGE_ID ID); - - [VtblIndex(36)] - void SetMuteDebugOutput(BOOL bMute); - - [VtblIndex(37)] - BOOL GetMuteDebugOutput(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (UINT64) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetMessageCountLimit; - - [NativeTypeName("void () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ClearStoredMessages; - - [NativeTypeName("HRESULT (UINT64, D3D12_MESSAGE *, SIZE_T *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMessage; - - [NativeTypeName("UINT64 () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetNumMessagesAllowedByStorageFilter; - - [NativeTypeName("UINT64 () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetNumMessagesDeniedByStorageFilter; - - [NativeTypeName("UINT64 () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetNumStoredMessages; - - [NativeTypeName("UINT64 () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetNumStoredMessagesAllowedByRetrievalFilter; - - [NativeTypeName("UINT64 () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetNumMessagesDiscardedByMessageCountLimit; - - [NativeTypeName("UINT64 () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMessageCountLimit; - - [NativeTypeName("HRESULT (D3D12_INFO_QUEUE_FILTER *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddStorageFilterEntries; - - [NativeTypeName("HRESULT (D3D12_INFO_QUEUE_FILTER *, SIZE_T *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetStorageFilter; - - [NativeTypeName("void () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ClearStorageFilter; - - [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PushEmptyStorageFilter; - - [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PushCopyOfStorageFilter; - - [NativeTypeName("HRESULT (D3D12_INFO_QUEUE_FILTER *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PushStorageFilter; - - [NativeTypeName("void () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PopStorageFilter; - - [NativeTypeName("UINT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetStorageFilterStackSize; - - [NativeTypeName("HRESULT (D3D12_INFO_QUEUE_FILTER *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRetrievalFilterEntries; - - [NativeTypeName("HRESULT (D3D12_INFO_QUEUE_FILTER *, SIZE_T *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetRetrievalFilter; - - [NativeTypeName("void () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ClearRetrievalFilter; - - [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PushEmptyRetrievalFilter; - - [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PushCopyOfRetrievalFilter; - - [NativeTypeName("HRESULT (D3D12_INFO_QUEUE_FILTER *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PushRetrievalFilter; - - [NativeTypeName("void () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PopRetrievalFilter; - - [NativeTypeName("UINT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetRetrievalFilterStackSize; - - [NativeTypeName("HRESULT (D3D12_MESSAGE_CATEGORY, D3D12_MESSAGE_SEVERITY, D3D12_MESSAGE_ID, LPCSTR) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddMessage; - - [NativeTypeName("HRESULT (D3D12_MESSAGE_SEVERITY, LPCSTR) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddApplicationMessage; - - [NativeTypeName("HRESULT (D3D12_MESSAGE_CATEGORY, BOOL) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetBreakOnCategory; - - [NativeTypeName("HRESULT (D3D12_MESSAGE_SEVERITY, BOOL) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetBreakOnSeverity; - - [NativeTypeName("HRESULT (D3D12_MESSAGE_ID, BOOL) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetBreakOnID; - - [NativeTypeName("BOOL (D3D12_MESSAGE_CATEGORY) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBreakOnCategory; - - [NativeTypeName("BOOL (D3D12_MESSAGE_SEVERITY) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBreakOnSeverity; - - [NativeTypeName("BOOL (D3D12_MESSAGE_ID) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBreakOnID; - - [NativeTypeName("void (BOOL) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetMuteDebugOutput; - - [NativeTypeName("BOOL () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMuteDebugOutput; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/D3D12_SHADER_BUFFER_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/D3D12_SHADER_BUFFER_DESC.cs deleted file mode 100644 index 9f893ef1..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/D3D12_SHADER_BUFFER_DESC.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12shader.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D3D12_SHADER_BUFFER_DESC - { - [NativeTypeName("LPCSTR")] - public sbyte* Name; - - public D3D_CBUFFER_TYPE Type; - - public uint Variables; - - public uint Size; - - public uint uFlags; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/D3D12_SHADER_INPUT_BIND_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/D3D12_SHADER_INPUT_BIND_DESC.cs deleted file mode 100644 index 1fc1a615..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/D3D12_SHADER_INPUT_BIND_DESC.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12shader.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D3D12_SHADER_INPUT_BIND_DESC - { - [NativeTypeName("LPCSTR")] - public sbyte* Name; - - public D3D_SHADER_INPUT_TYPE Type; - - public uint BindPoint; - - public uint BindCount; - - public uint uFlags; - - public D3D_RESOURCE_RETURN_TYPE ReturnType; - - public D3D_SRV_DIMENSION Dimension; - - public uint NumSamples; - - public uint Space; - - public uint uID; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/D3D12_SHADER_TYPE_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/D3D12_SHADER_TYPE_DESC.cs deleted file mode 100644 index 7be27e14..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/D3D12_SHADER_TYPE_DESC.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12shader.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D3D12_SHADER_TYPE_DESC - { - public D3D_SHADER_VARIABLE_CLASS Class; - - public D3D_SHADER_VARIABLE_TYPE Type; - - public uint Rows; - - public uint Columns; - - public uint Elements; - - public uint Members; - - public uint Offset; - - [NativeTypeName("LPCSTR")] - public sbyte* Name; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/D3D12_SHADER_VARIABLE_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/D3D12_SHADER_VARIABLE_DESC.cs deleted file mode 100644 index e9260d25..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/D3D12_SHADER_VARIABLE_DESC.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12shader.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D3D12_SHADER_VARIABLE_DESC - { - [NativeTypeName("LPCSTR")] - public sbyte* Name; - - public uint StartOffset; - - public uint Size; - - public uint uFlags; - - [NativeTypeName("LPVOID")] - public void* DefaultValue; - - public uint StartTexture; - - public uint TextureSize; - - public uint StartSampler; - - public uint SamplerSize; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/D3D12_SIGNATURE_PARAMETER_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/D3D12_SIGNATURE_PARAMETER_DESC.cs deleted file mode 100644 index 088b1450..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/D3D12_SIGNATURE_PARAMETER_DESC.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12shader.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D3D12_SIGNATURE_PARAMETER_DESC - { - [NativeTypeName("LPCSTR")] - public sbyte* SemanticName; - - public uint SemanticIndex; - - public uint Register; - - public D3D_NAME SystemValueType; - - public D3D_REGISTER_COMPONENT_TYPE ComponentType; - - public byte Mask; - - public byte ReadWriteMask; - - public uint Stream; - - public D3D_MIN_PRECISION MinPrecision; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/ID3D12ShaderReflection.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/ID3D12ShaderReflection.cs index 27253a4a..cc101764 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/ID3D12ShaderReflection.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/ID3D12ShaderReflection.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("5A58797D-A72C-478D-8BA2-EFC6B0EFE88E")] [NativeTypeName("struct ID3D12ShaderReflection : IUnknown")] [NativeInheritance("IUnknown")] - internal unsafe partial struct ID3D12ShaderReflection : ID3D12ShaderReflection.Interface + internal unsafe partial struct ID3D12ShaderReflection { public void** lpVtbl; @@ -47,62 +47,6 @@ namespace TerraFX.Interop.DirectX return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID3D12ShaderReflection*)Unsafe.AsPointer(ref this), pDesc); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public ID3D12ShaderReflectionConstantBuffer* GetConstantBufferByIndex(uint Index) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID3D12ShaderReflection*)Unsafe.AsPointer(ref this), Index); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public ID3D12ShaderReflectionConstantBuffer* GetConstantBufferByName([NativeTypeName("LPCSTR")] sbyte* Name) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID3D12ShaderReflection*)Unsafe.AsPointer(ref this), Name); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetResourceBindingDesc(uint ResourceIndex, D3D12_SHADER_INPUT_BIND_DESC* pDesc) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID3D12ShaderReflection*)Unsafe.AsPointer(ref this), ResourceIndex, pDesc); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT GetInputParameterDesc(uint ParameterIndex, D3D12_SIGNATURE_PARAMETER_DESC* pDesc) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID3D12ShaderReflection*)Unsafe.AsPointer(ref this), ParameterIndex, pDesc); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT GetOutputParameterDesc(uint ParameterIndex, D3D12_SIGNATURE_PARAMETER_DESC* pDesc) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID3D12ShaderReflection*)Unsafe.AsPointer(ref this), ParameterIndex, pDesc); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT GetPatchConstantParameterDesc(uint ParameterIndex, D3D12_SIGNATURE_PARAMETER_DESC* pDesc) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID3D12ShaderReflection*)Unsafe.AsPointer(ref this), ParameterIndex, pDesc); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public ID3D12ShaderReflectionVariable* GetVariableByName([NativeTypeName("LPCSTR")] sbyte* Name) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID3D12ShaderReflection*)Unsafe.AsPointer(ref this), Name); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT GetResourceBindingDescByName([NativeTypeName("LPCSTR")] sbyte* Name, D3D12_SHADER_INPUT_BIND_DESC* pDesc) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID3D12ShaderReflection*)Unsafe.AsPointer(ref this), Name, pDesc); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(12)] public uint GetMovInstructionCount() @@ -173,135 +117,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((ID3D12ShaderReflection*)Unsafe.AsPointer(ref this)); } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT GetDesc(D3D12_SHADER_DESC* pDesc); - - [VtblIndex(4)] - ID3D12ShaderReflectionConstantBuffer* GetConstantBufferByIndex(uint Index); - - [VtblIndex(5)] - ID3D12ShaderReflectionConstantBuffer* GetConstantBufferByName([NativeTypeName("LPCSTR")] sbyte* Name); - - [VtblIndex(6)] - HRESULT GetResourceBindingDesc(uint ResourceIndex, D3D12_SHADER_INPUT_BIND_DESC* pDesc); - - [VtblIndex(7)] - HRESULT GetInputParameterDesc(uint ParameterIndex, D3D12_SIGNATURE_PARAMETER_DESC* pDesc); - - [VtblIndex(8)] - HRESULT GetOutputParameterDesc(uint ParameterIndex, D3D12_SIGNATURE_PARAMETER_DESC* pDesc); - - [VtblIndex(9)] - HRESULT GetPatchConstantParameterDesc(uint ParameterIndex, D3D12_SIGNATURE_PARAMETER_DESC* pDesc); - - [VtblIndex(10)] - ID3D12ShaderReflectionVariable* GetVariableByName([NativeTypeName("LPCSTR")] sbyte* Name); - - [VtblIndex(11)] - HRESULT GetResourceBindingDescByName([NativeTypeName("LPCSTR")] sbyte* Name, D3D12_SHADER_INPUT_BIND_DESC* pDesc); - - [VtblIndex(12)] - uint GetMovInstructionCount(); - - [VtblIndex(13)] - uint GetMovcInstructionCount(); - - [VtblIndex(14)] - uint GetConversionInstructionCount(); - - [VtblIndex(15)] - uint GetBitwiseInstructionCount(); - - [VtblIndex(16)] - D3D_PRIMITIVE GetGSInputPrimitive(); - - [VtblIndex(17)] - BOOL IsSampleFrequencyShader(); - - [VtblIndex(18)] - uint GetNumInterfaceSlots(); - - [VtblIndex(19)] - HRESULT GetMinFeatureLevel([NativeTypeName("enum D3D_FEATURE_LEVEL *")] D3D_FEATURE_LEVEL* pLevel); - - [VtblIndex(20)] - uint GetThreadGroupSize(uint* pSizeX, uint* pSizeY, uint* pSizeZ); - - [VtblIndex(21)] - [return: NativeTypeName("UINT64")] - ulong GetRequiresFlags(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (D3D12_SHADER_DESC *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDesc; - - [NativeTypeName("ID3D12ShaderReflectionConstantBuffer *(UINT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetConstantBufferByIndex; - - [NativeTypeName("ID3D12ShaderReflectionConstantBuffer *(LPCSTR) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetConstantBufferByName; - - [NativeTypeName("HRESULT (UINT, D3D12_SHADER_INPUT_BIND_DESC *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetResourceBindingDesc; - - [NativeTypeName("HRESULT (UINT, D3D12_SIGNATURE_PARAMETER_DESC *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetInputParameterDesc; - - [NativeTypeName("HRESULT (UINT, D3D12_SIGNATURE_PARAMETER_DESC *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetOutputParameterDesc; - - [NativeTypeName("HRESULT (UINT, D3D12_SIGNATURE_PARAMETER_DESC *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPatchConstantParameterDesc; - - [NativeTypeName("ID3D12ShaderReflectionVariable *(LPCSTR) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetVariableByName; - - [NativeTypeName("HRESULT (LPCSTR, D3D12_SHADER_INPUT_BIND_DESC *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetResourceBindingDescByName; - - [NativeTypeName("UINT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMovInstructionCount; - - [NativeTypeName("UINT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMovcInstructionCount; - - [NativeTypeName("UINT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetConversionInstructionCount; - - [NativeTypeName("UINT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBitwiseInstructionCount; - - [NativeTypeName("D3D_PRIMITIVE () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetGSInputPrimitive; - - [NativeTypeName("BOOL () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsSampleFrequencyShader; - - [NativeTypeName("UINT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetNumInterfaceSlots; - - [NativeTypeName("HRESULT (enum D3D_FEATURE_LEVEL *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMinFeatureLevel; - - [NativeTypeName("UINT (UINT *, UINT *, UINT *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetThreadGroupSize; - - [NativeTypeName("UINT64 () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetRequiresFlags; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/ID3D12ShaderReflectionConstantBuffer.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/ID3D12ShaderReflectionConstantBuffer.cs deleted file mode 100644 index 61bd074a..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/ID3D12ShaderReflectionConstantBuffer.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12shader.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("C59598B4-48B3-4869-B9B1-B1618B14A8B7")] - internal unsafe partial struct ID3D12ShaderReflectionConstantBuffer : ID3D12ShaderReflectionConstantBuffer.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT GetDesc(D3D12_SHADER_BUFFER_DESC* pDesc) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID3D12ShaderReflectionConstantBuffer*)Unsafe.AsPointer(ref this), pDesc); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - public ID3D12ShaderReflectionVariable* GetVariableByIndex(uint Index) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID3D12ShaderReflectionConstantBuffer*)Unsafe.AsPointer(ref this), Index); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - public ID3D12ShaderReflectionVariable* GetVariableByName([NativeTypeName("LPCSTR")] sbyte* Name) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID3D12ShaderReflectionConstantBuffer*)Unsafe.AsPointer(ref this), Name); - } - - public interface Interface - { - [VtblIndex(0)] - HRESULT GetDesc(D3D12_SHADER_BUFFER_DESC* pDesc); - - [VtblIndex(1)] - ID3D12ShaderReflectionVariable* GetVariableByIndex(uint Index); - - [VtblIndex(2)] - ID3D12ShaderReflectionVariable* GetVariableByName([NativeTypeName("LPCSTR")] sbyte* Name); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (D3D12_SHADER_BUFFER_DESC *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDesc; - - [NativeTypeName("ID3D12ShaderReflectionVariable *(UINT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetVariableByIndex; - - [NativeTypeName("ID3D12ShaderReflectionVariable *(LPCSTR) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetVariableByName; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/ID3D12ShaderReflectionType.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/ID3D12ShaderReflectionType.cs deleted file mode 100644 index 5d05431b..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/ID3D12ShaderReflectionType.cs +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12shader.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("E913C351-783D-48CA-A1D1-4F306284AD56")] - internal unsafe partial struct ID3D12ShaderReflectionType : ID3D12ShaderReflectionType.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT GetDesc(D3D12_SHADER_TYPE_DESC* pDesc) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID3D12ShaderReflectionType*)Unsafe.AsPointer(ref this), pDesc); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - public ID3D12ShaderReflectionType* GetMemberTypeByIndex(uint Index) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID3D12ShaderReflectionType*)Unsafe.AsPointer(ref this), Index); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - public ID3D12ShaderReflectionType* GetMemberTypeByName([NativeTypeName("LPCSTR")] sbyte* Name) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID3D12ShaderReflectionType*)Unsafe.AsPointer(ref this), Name); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - [return: NativeTypeName("LPCSTR")] - public sbyte* GetMemberTypeName(uint Index) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID3D12ShaderReflectionType*)Unsafe.AsPointer(ref this), Index); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT IsEqual(ID3D12ShaderReflectionType* pType) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID3D12ShaderReflectionType*)Unsafe.AsPointer(ref this), pType); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public ID3D12ShaderReflectionType* GetSubType() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID3D12ShaderReflectionType*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public ID3D12ShaderReflectionType* GetBaseClass() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID3D12ShaderReflectionType*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public uint GetNumInterfaces() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID3D12ShaderReflectionType*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public ID3D12ShaderReflectionType* GetInterfaceByIndex(uint uIndex) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID3D12ShaderReflectionType*)Unsafe.AsPointer(ref this), uIndex); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT IsOfType(ID3D12ShaderReflectionType* pType) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID3D12ShaderReflectionType*)Unsafe.AsPointer(ref this), pType); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT ImplementsInterface(ID3D12ShaderReflectionType* pBase) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID3D12ShaderReflectionType*)Unsafe.AsPointer(ref this), pBase); - } - - public interface Interface - { - [VtblIndex(0)] - HRESULT GetDesc(D3D12_SHADER_TYPE_DESC* pDesc); - - [VtblIndex(1)] - ID3D12ShaderReflectionType* GetMemberTypeByIndex(uint Index); - - [VtblIndex(2)] - ID3D12ShaderReflectionType* GetMemberTypeByName([NativeTypeName("LPCSTR")] sbyte* Name); - - [VtblIndex(3)] - [return: NativeTypeName("LPCSTR")] - sbyte* GetMemberTypeName(uint Index); - - [VtblIndex(4)] - HRESULT IsEqual(ID3D12ShaderReflectionType* pType); - - [VtblIndex(5)] - ID3D12ShaderReflectionType* GetSubType(); - - [VtblIndex(6)] - ID3D12ShaderReflectionType* GetBaseClass(); - - [VtblIndex(7)] - uint GetNumInterfaces(); - - [VtblIndex(8)] - ID3D12ShaderReflectionType* GetInterfaceByIndex(uint uIndex); - - [VtblIndex(9)] - HRESULT IsOfType(ID3D12ShaderReflectionType* pType); - - [VtblIndex(10)] - HRESULT ImplementsInterface(ID3D12ShaderReflectionType* pBase); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (D3D12_SHADER_TYPE_DESC *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDesc; - - [NativeTypeName("ID3D12ShaderReflectionType *(UINT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMemberTypeByIndex; - - [NativeTypeName("ID3D12ShaderReflectionType *(LPCSTR) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMemberTypeByName; - - [NativeTypeName("LPCSTR (UINT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMemberTypeName; - - [NativeTypeName("HRESULT (ID3D12ShaderReflectionType *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsEqual; - - [NativeTypeName("ID3D12ShaderReflectionType *() __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSubType; - - [NativeTypeName("ID3D12ShaderReflectionType *() __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBaseClass; - - [NativeTypeName("UINT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetNumInterfaces; - - [NativeTypeName("ID3D12ShaderReflectionType *(UINT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetInterfaceByIndex; - - [NativeTypeName("HRESULT (ID3D12ShaderReflectionType *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsOfType; - - [NativeTypeName("HRESULT (ID3D12ShaderReflectionType *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ImplementsInterface; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/ID3D12ShaderReflectionVariable.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/ID3D12ShaderReflectionVariable.cs deleted file mode 100644 index afab94c9..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12shader/ID3D12ShaderReflectionVariable.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12shader.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("8337A8A6-A216-444A-B2F4-314733A73AEA")] - internal unsafe partial struct ID3D12ShaderReflectionVariable : ID3D12ShaderReflectionVariable.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT GetDesc(D3D12_SHADER_VARIABLE_DESC* pDesc) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID3D12ShaderReflectionVariable*)Unsafe.AsPointer(ref this), pDesc); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - public new ID3D12ShaderReflectionType* GetType() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID3D12ShaderReflectionVariable*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - public ID3D12ShaderReflectionConstantBuffer* GetBuffer() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID3D12ShaderReflectionVariable*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public uint GetInterfaceSlot(uint uArrayIndex) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID3D12ShaderReflectionVariable*)Unsafe.AsPointer(ref this), uArrayIndex); - } - - public interface Interface - { - [VtblIndex(0)] - HRESULT GetDesc(D3D12_SHADER_VARIABLE_DESC* pDesc); - - [VtblIndex(1)] - ID3D12ShaderReflectionType* GetType(); - - [VtblIndex(2)] - ID3D12ShaderReflectionConstantBuffer* GetBuffer(); - - [VtblIndex(3)] - uint GetInterfaceSlot(uint uArrayIndex); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (D3D12_SHADER_VARIABLE_DESC *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDesc; - - [NativeTypeName("ID3D12ShaderReflectionType *() __attribute__((nothrow)) __attribute__((stdcall))")] - public new delegate* unmanaged[Stdcall] GetType; - - [NativeTypeName("ID3D12ShaderReflectionConstantBuffer *() __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBuffer; - - [NativeTypeName("UINT (UINT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetInterfaceSlot; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/D3D_CBUFFER_TYPE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/D3D_CBUFFER_TYPE.cs deleted file mode 100644 index e7ee72b5..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/D3D_CBUFFER_TYPE.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3dcommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D_CBUFFER_TYPE - { - D3D_CT_CBUFFER = 0, - D3D_CT_TBUFFER = (D3D_CT_CBUFFER + 1), - D3D_CT_INTERFACE_POINTERS = (D3D_CT_TBUFFER + 1), - D3D_CT_RESOURCE_BIND_INFO = (D3D_CT_INTERFACE_POINTERS + 1), - D3D10_CT_CBUFFER = D3D_CT_CBUFFER, - D3D10_CT_TBUFFER = D3D_CT_TBUFFER, - D3D11_CT_CBUFFER = D3D_CT_CBUFFER, - D3D11_CT_TBUFFER = D3D_CT_TBUFFER, - D3D11_CT_INTERFACE_POINTERS = D3D_CT_INTERFACE_POINTERS, - D3D11_CT_RESOURCE_BIND_INFO = D3D_CT_RESOURCE_BIND_INFO, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/D3D_RESOURCE_RETURN_TYPE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/D3D_RESOURCE_RETURN_TYPE.cs deleted file mode 100644 index e250ff54..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/D3D_RESOURCE_RETURN_TYPE.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3dcommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D_RESOURCE_RETURN_TYPE - { - D3D_RETURN_TYPE_UNORM = 1, - D3D_RETURN_TYPE_SNORM = 2, - D3D_RETURN_TYPE_SINT = 3, - D3D_RETURN_TYPE_UINT = 4, - D3D_RETURN_TYPE_FLOAT = 5, - D3D_RETURN_TYPE_MIXED = 6, - D3D_RETURN_TYPE_DOUBLE = 7, - D3D_RETURN_TYPE_CONTINUED = 8, - D3D10_RETURN_TYPE_UNORM = D3D_RETURN_TYPE_UNORM, - D3D10_RETURN_TYPE_SNORM = D3D_RETURN_TYPE_SNORM, - D3D10_RETURN_TYPE_SINT = D3D_RETURN_TYPE_SINT, - D3D10_RETURN_TYPE_UINT = D3D_RETURN_TYPE_UINT, - D3D10_RETURN_TYPE_FLOAT = D3D_RETURN_TYPE_FLOAT, - D3D10_RETURN_TYPE_MIXED = D3D_RETURN_TYPE_MIXED, - D3D11_RETURN_TYPE_UNORM = D3D_RETURN_TYPE_UNORM, - D3D11_RETURN_TYPE_SNORM = D3D_RETURN_TYPE_SNORM, - D3D11_RETURN_TYPE_SINT = D3D_RETURN_TYPE_SINT, - D3D11_RETURN_TYPE_UINT = D3D_RETURN_TYPE_UINT, - D3D11_RETURN_TYPE_FLOAT = D3D_RETURN_TYPE_FLOAT, - D3D11_RETURN_TYPE_MIXED = D3D_RETURN_TYPE_MIXED, - D3D11_RETURN_TYPE_DOUBLE = D3D_RETURN_TYPE_DOUBLE, - D3D11_RETURN_TYPE_CONTINUED = D3D_RETURN_TYPE_CONTINUED, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/D3D_SHADER_INPUT_TYPE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/D3D_SHADER_INPUT_TYPE.cs deleted file mode 100644 index 96b89855..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/D3D_SHADER_INPUT_TYPE.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3dcommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D_SHADER_INPUT_TYPE - { - D3D_SIT_CBUFFER = 0, - D3D_SIT_TBUFFER = (D3D_SIT_CBUFFER + 1), - D3D_SIT_TEXTURE = (D3D_SIT_TBUFFER + 1), - D3D_SIT_SAMPLER = (D3D_SIT_TEXTURE + 1), - D3D_SIT_UAV_RWTYPED = (D3D_SIT_SAMPLER + 1), - D3D_SIT_STRUCTURED = (D3D_SIT_UAV_RWTYPED + 1), - D3D_SIT_UAV_RWSTRUCTURED = (D3D_SIT_STRUCTURED + 1), - D3D_SIT_BYTEADDRESS = (D3D_SIT_UAV_RWSTRUCTURED + 1), - D3D_SIT_UAV_RWBYTEADDRESS = (D3D_SIT_BYTEADDRESS + 1), - D3D_SIT_UAV_APPEND_STRUCTURED = (D3D_SIT_UAV_RWBYTEADDRESS + 1), - D3D_SIT_UAV_CONSUME_STRUCTURED = (D3D_SIT_UAV_APPEND_STRUCTURED + 1), - D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER = (D3D_SIT_UAV_CONSUME_STRUCTURED + 1), - D3D_SIT_RTACCELERATIONSTRUCTURE = (D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER + 1), - D3D_SIT_UAV_FEEDBACKTEXTURE = (D3D_SIT_RTACCELERATIONSTRUCTURE + 1), - D3D10_SIT_CBUFFER = D3D_SIT_CBUFFER, - D3D10_SIT_TBUFFER = D3D_SIT_TBUFFER, - D3D10_SIT_TEXTURE = D3D_SIT_TEXTURE, - D3D10_SIT_SAMPLER = D3D_SIT_SAMPLER, - D3D11_SIT_UAV_RWTYPED = D3D_SIT_UAV_RWTYPED, - D3D11_SIT_STRUCTURED = D3D_SIT_STRUCTURED, - D3D11_SIT_UAV_RWSTRUCTURED = D3D_SIT_UAV_RWSTRUCTURED, - D3D11_SIT_BYTEADDRESS = D3D_SIT_BYTEADDRESS, - D3D11_SIT_UAV_RWBYTEADDRESS = D3D_SIT_UAV_RWBYTEADDRESS, - D3D11_SIT_UAV_APPEND_STRUCTURED = D3D_SIT_UAV_APPEND_STRUCTURED, - D3D11_SIT_UAV_CONSUME_STRUCTURED = D3D_SIT_UAV_CONSUME_STRUCTURED, - D3D11_SIT_UAV_RWSTRUCTURED_WITH_COUNTER = D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/D3D_SHADER_VARIABLE_CLASS.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/D3D_SHADER_VARIABLE_CLASS.cs deleted file mode 100644 index 71d0fca3..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/D3D_SHADER_VARIABLE_CLASS.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3dcommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D_SHADER_VARIABLE_CLASS - { - D3D_SVC_SCALAR = 0, - D3D_SVC_VECTOR = (D3D_SVC_SCALAR + 1), - D3D_SVC_MATRIX_ROWS = (D3D_SVC_VECTOR + 1), - D3D_SVC_MATRIX_COLUMNS = (D3D_SVC_MATRIX_ROWS + 1), - D3D_SVC_OBJECT = (D3D_SVC_MATRIX_COLUMNS + 1), - D3D_SVC_STRUCT = (D3D_SVC_OBJECT + 1), - D3D_SVC_INTERFACE_CLASS = (D3D_SVC_STRUCT + 1), - D3D_SVC_INTERFACE_POINTER = (D3D_SVC_INTERFACE_CLASS + 1), - D3D10_SVC_SCALAR = D3D_SVC_SCALAR, - D3D10_SVC_VECTOR = D3D_SVC_VECTOR, - D3D10_SVC_MATRIX_ROWS = D3D_SVC_MATRIX_ROWS, - D3D10_SVC_MATRIX_COLUMNS = D3D_SVC_MATRIX_COLUMNS, - D3D10_SVC_OBJECT = D3D_SVC_OBJECT, - D3D10_SVC_STRUCT = D3D_SVC_STRUCT, - D3D11_SVC_INTERFACE_CLASS = D3D_SVC_INTERFACE_CLASS, - D3D11_SVC_INTERFACE_POINTER = D3D_SVC_INTERFACE_POINTER, - D3D_SVC_FORCE_DWORD = 0x7fffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/D3D_SHADER_VARIABLE_TYPE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/D3D_SHADER_VARIABLE_TYPE.cs deleted file mode 100644 index 47e3aa40..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/D3D_SHADER_VARIABLE_TYPE.cs +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3dcommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D_SHADER_VARIABLE_TYPE - { - D3D_SVT_VOID = 0, - D3D_SVT_BOOL = 1, - D3D_SVT_INT = 2, - D3D_SVT_FLOAT = 3, - D3D_SVT_STRING = 4, - D3D_SVT_TEXTURE = 5, - D3D_SVT_TEXTURE1D = 6, - D3D_SVT_TEXTURE2D = 7, - D3D_SVT_TEXTURE3D = 8, - D3D_SVT_TEXTURECUBE = 9, - D3D_SVT_SAMPLER = 10, - D3D_SVT_SAMPLER1D = 11, - D3D_SVT_SAMPLER2D = 12, - D3D_SVT_SAMPLER3D = 13, - D3D_SVT_SAMPLERCUBE = 14, - D3D_SVT_PIXELSHADER = 15, - D3D_SVT_VERTEXSHADER = 16, - D3D_SVT_PIXELFRAGMENT = 17, - D3D_SVT_VERTEXFRAGMENT = 18, - D3D_SVT_UINT = 19, - D3D_SVT_UINT8 = 20, - D3D_SVT_GEOMETRYSHADER = 21, - D3D_SVT_RASTERIZER = 22, - D3D_SVT_DEPTHSTENCIL = 23, - D3D_SVT_BLEND = 24, - D3D_SVT_BUFFER = 25, - D3D_SVT_CBUFFER = 26, - D3D_SVT_TBUFFER = 27, - D3D_SVT_TEXTURE1DARRAY = 28, - D3D_SVT_TEXTURE2DARRAY = 29, - D3D_SVT_RENDERTARGETVIEW = 30, - D3D_SVT_DEPTHSTENCILVIEW = 31, - D3D_SVT_TEXTURE2DMS = 32, - D3D_SVT_TEXTURE2DMSARRAY = 33, - D3D_SVT_TEXTURECUBEARRAY = 34, - D3D_SVT_HULLSHADER = 35, - D3D_SVT_DOMAINSHADER = 36, - D3D_SVT_INTERFACE_POINTER = 37, - D3D_SVT_COMPUTESHADER = 38, - D3D_SVT_DOUBLE = 39, - D3D_SVT_RWTEXTURE1D = 40, - D3D_SVT_RWTEXTURE1DARRAY = 41, - D3D_SVT_RWTEXTURE2D = 42, - D3D_SVT_RWTEXTURE2DARRAY = 43, - D3D_SVT_RWTEXTURE3D = 44, - D3D_SVT_RWBUFFER = 45, - D3D_SVT_BYTEADDRESS_BUFFER = 46, - D3D_SVT_RWBYTEADDRESS_BUFFER = 47, - D3D_SVT_STRUCTURED_BUFFER = 48, - D3D_SVT_RWSTRUCTURED_BUFFER = 49, - D3D_SVT_APPEND_STRUCTURED_BUFFER = 50, - D3D_SVT_CONSUME_STRUCTURED_BUFFER = 51, - D3D_SVT_MIN8FLOAT = 52, - D3D_SVT_MIN10FLOAT = 53, - D3D_SVT_MIN16FLOAT = 54, - D3D_SVT_MIN12INT = 55, - D3D_SVT_MIN16INT = 56, - D3D_SVT_MIN16UINT = 57, - D3D10_SVT_VOID = D3D_SVT_VOID, - D3D10_SVT_BOOL = D3D_SVT_BOOL, - D3D10_SVT_INT = D3D_SVT_INT, - D3D10_SVT_FLOAT = D3D_SVT_FLOAT, - D3D10_SVT_STRING = D3D_SVT_STRING, - D3D10_SVT_TEXTURE = D3D_SVT_TEXTURE, - D3D10_SVT_TEXTURE1D = D3D_SVT_TEXTURE1D, - D3D10_SVT_TEXTURE2D = D3D_SVT_TEXTURE2D, - D3D10_SVT_TEXTURE3D = D3D_SVT_TEXTURE3D, - D3D10_SVT_TEXTURECUBE = D3D_SVT_TEXTURECUBE, - D3D10_SVT_SAMPLER = D3D_SVT_SAMPLER, - D3D10_SVT_SAMPLER1D = D3D_SVT_SAMPLER1D, - D3D10_SVT_SAMPLER2D = D3D_SVT_SAMPLER2D, - D3D10_SVT_SAMPLER3D = D3D_SVT_SAMPLER3D, - D3D10_SVT_SAMPLERCUBE = D3D_SVT_SAMPLERCUBE, - D3D10_SVT_PIXELSHADER = D3D_SVT_PIXELSHADER, - D3D10_SVT_VERTEXSHADER = D3D_SVT_VERTEXSHADER, - D3D10_SVT_PIXELFRAGMENT = D3D_SVT_PIXELFRAGMENT, - D3D10_SVT_VERTEXFRAGMENT = D3D_SVT_VERTEXFRAGMENT, - D3D10_SVT_UINT = D3D_SVT_UINT, - D3D10_SVT_UINT8 = D3D_SVT_UINT8, - D3D10_SVT_GEOMETRYSHADER = D3D_SVT_GEOMETRYSHADER, - D3D10_SVT_RASTERIZER = D3D_SVT_RASTERIZER, - D3D10_SVT_DEPTHSTENCIL = D3D_SVT_DEPTHSTENCIL, - D3D10_SVT_BLEND = D3D_SVT_BLEND, - D3D10_SVT_BUFFER = D3D_SVT_BUFFER, - D3D10_SVT_CBUFFER = D3D_SVT_CBUFFER, - D3D10_SVT_TBUFFER = D3D_SVT_TBUFFER, - D3D10_SVT_TEXTURE1DARRAY = D3D_SVT_TEXTURE1DARRAY, - D3D10_SVT_TEXTURE2DARRAY = D3D_SVT_TEXTURE2DARRAY, - D3D10_SVT_RENDERTARGETVIEW = D3D_SVT_RENDERTARGETVIEW, - D3D10_SVT_DEPTHSTENCILVIEW = D3D_SVT_DEPTHSTENCILVIEW, - D3D10_SVT_TEXTURE2DMS = D3D_SVT_TEXTURE2DMS, - D3D10_SVT_TEXTURE2DMSARRAY = D3D_SVT_TEXTURE2DMSARRAY, - D3D10_SVT_TEXTURECUBEARRAY = D3D_SVT_TEXTURECUBEARRAY, - D3D11_SVT_HULLSHADER = D3D_SVT_HULLSHADER, - D3D11_SVT_DOMAINSHADER = D3D_SVT_DOMAINSHADER, - D3D11_SVT_INTERFACE_POINTER = D3D_SVT_INTERFACE_POINTER, - D3D11_SVT_COMPUTESHADER = D3D_SVT_COMPUTESHADER, - D3D11_SVT_DOUBLE = D3D_SVT_DOUBLE, - D3D11_SVT_RWTEXTURE1D = D3D_SVT_RWTEXTURE1D, - D3D11_SVT_RWTEXTURE1DARRAY = D3D_SVT_RWTEXTURE1DARRAY, - D3D11_SVT_RWTEXTURE2D = D3D_SVT_RWTEXTURE2D, - D3D11_SVT_RWTEXTURE2DARRAY = D3D_SVT_RWTEXTURE2DARRAY, - D3D11_SVT_RWTEXTURE3D = D3D_SVT_RWTEXTURE3D, - D3D11_SVT_RWBUFFER = D3D_SVT_RWBUFFER, - D3D11_SVT_BYTEADDRESS_BUFFER = D3D_SVT_BYTEADDRESS_BUFFER, - D3D11_SVT_RWBYTEADDRESS_BUFFER = D3D_SVT_RWBYTEADDRESS_BUFFER, - D3D11_SVT_STRUCTURED_BUFFER = D3D_SVT_STRUCTURED_BUFFER, - D3D11_SVT_RWSTRUCTURED_BUFFER = D3D_SVT_RWSTRUCTURED_BUFFER, - D3D11_SVT_APPEND_STRUCTURED_BUFFER = D3D_SVT_APPEND_STRUCTURED_BUFFER, - D3D11_SVT_CONSUME_STRUCTURED_BUFFER = D3D_SVT_CONSUME_STRUCTURED_BUFFER, - D3D_SVT_FORCE_DWORD = 0x7fffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/D3D_SRV_DIMENSION.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/D3D_SRV_DIMENSION.cs deleted file mode 100644 index 71275c07..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/D3D_SRV_DIMENSION.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3dcommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D_SRV_DIMENSION - { - D3D_SRV_DIMENSION_UNKNOWN = 0, - D3D_SRV_DIMENSION_BUFFER = 1, - D3D_SRV_DIMENSION_TEXTURE1D = 2, - D3D_SRV_DIMENSION_TEXTURE1DARRAY = 3, - D3D_SRV_DIMENSION_TEXTURE2D = 4, - D3D_SRV_DIMENSION_TEXTURE2DARRAY = 5, - D3D_SRV_DIMENSION_TEXTURE2DMS = 6, - D3D_SRV_DIMENSION_TEXTURE2DMSARRAY = 7, - D3D_SRV_DIMENSION_TEXTURE3D = 8, - D3D_SRV_DIMENSION_TEXTURECUBE = 9, - D3D_SRV_DIMENSION_TEXTURECUBEARRAY = 10, - D3D_SRV_DIMENSION_BUFFEREX = 11, - D3D10_SRV_DIMENSION_UNKNOWN = D3D_SRV_DIMENSION_UNKNOWN, - D3D10_SRV_DIMENSION_BUFFER = D3D_SRV_DIMENSION_BUFFER, - D3D10_SRV_DIMENSION_TEXTURE1D = D3D_SRV_DIMENSION_TEXTURE1D, - D3D10_SRV_DIMENSION_TEXTURE1DARRAY = D3D_SRV_DIMENSION_TEXTURE1DARRAY, - D3D10_SRV_DIMENSION_TEXTURE2D = D3D_SRV_DIMENSION_TEXTURE2D, - D3D10_SRV_DIMENSION_TEXTURE2DARRAY = D3D_SRV_DIMENSION_TEXTURE2DARRAY, - D3D10_SRV_DIMENSION_TEXTURE2DMS = D3D_SRV_DIMENSION_TEXTURE2DMS, - D3D10_SRV_DIMENSION_TEXTURE2DMSARRAY = D3D_SRV_DIMENSION_TEXTURE2DMSARRAY, - D3D10_SRV_DIMENSION_TEXTURE3D = D3D_SRV_DIMENSION_TEXTURE3D, - D3D10_SRV_DIMENSION_TEXTURECUBE = D3D_SRV_DIMENSION_TEXTURECUBE, - D3D10_1_SRV_DIMENSION_UNKNOWN = D3D_SRV_DIMENSION_UNKNOWN, - D3D10_1_SRV_DIMENSION_BUFFER = D3D_SRV_DIMENSION_BUFFER, - D3D10_1_SRV_DIMENSION_TEXTURE1D = D3D_SRV_DIMENSION_TEXTURE1D, - D3D10_1_SRV_DIMENSION_TEXTURE1DARRAY = D3D_SRV_DIMENSION_TEXTURE1DARRAY, - D3D10_1_SRV_DIMENSION_TEXTURE2D = D3D_SRV_DIMENSION_TEXTURE2D, - D3D10_1_SRV_DIMENSION_TEXTURE2DARRAY = D3D_SRV_DIMENSION_TEXTURE2DARRAY, - D3D10_1_SRV_DIMENSION_TEXTURE2DMS = D3D_SRV_DIMENSION_TEXTURE2DMS, - D3D10_1_SRV_DIMENSION_TEXTURE2DMSARRAY = D3D_SRV_DIMENSION_TEXTURE2DMSARRAY, - D3D10_1_SRV_DIMENSION_TEXTURE3D = D3D_SRV_DIMENSION_TEXTURE3D, - D3D10_1_SRV_DIMENSION_TEXTURECUBE = D3D_SRV_DIMENSION_TEXTURECUBE, - D3D10_1_SRV_DIMENSION_TEXTURECUBEARRAY = D3D_SRV_DIMENSION_TEXTURECUBEARRAY, - D3D11_SRV_DIMENSION_UNKNOWN = D3D_SRV_DIMENSION_UNKNOWN, - D3D11_SRV_DIMENSION_BUFFER = D3D_SRV_DIMENSION_BUFFER, - D3D11_SRV_DIMENSION_TEXTURE1D = D3D_SRV_DIMENSION_TEXTURE1D, - D3D11_SRV_DIMENSION_TEXTURE1DARRAY = D3D_SRV_DIMENSION_TEXTURE1DARRAY, - D3D11_SRV_DIMENSION_TEXTURE2D = D3D_SRV_DIMENSION_TEXTURE2D, - D3D11_SRV_DIMENSION_TEXTURE2DARRAY = D3D_SRV_DIMENSION_TEXTURE2DARRAY, - D3D11_SRV_DIMENSION_TEXTURE2DMS = D3D_SRV_DIMENSION_TEXTURE2DMS, - D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY = D3D_SRV_DIMENSION_TEXTURE2DMSARRAY, - D3D11_SRV_DIMENSION_TEXTURE3D = D3D_SRV_DIMENSION_TEXTURE3D, - D3D11_SRV_DIMENSION_TEXTURECUBE = D3D_SRV_DIMENSION_TEXTURECUBE, - D3D11_SRV_DIMENSION_TEXTURECUBEARRAY = D3D_SRV_DIMENSION_TEXTURECUBEARRAY, - D3D11_SRV_DIMENSION_BUFFEREX = D3D_SRV_DIMENSION_BUFFEREX, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/ID3DBlob.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/ID3DBlob.cs index f42018a3..d4f4c705 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/ID3DBlob.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/d3dcommon/ID3DBlob.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("8BA5FB08-5195-40E2-AC58-0D989C3A0102")] [NativeTypeName("struct ID3D10Blob : IUnknown")] [NativeInheritance("IUnknown")] - internal unsafe partial struct ID3DBlob : ID3DBlob.Interface + internal unsafe partial struct ID3DBlob { public void** lpVtbl; @@ -55,34 +55,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID3DBlob*)Unsafe.AsPointer(ref this)); } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - [return: NativeTypeName("LPVOID")] - void* GetBufferPointer(); - - [VtblIndex(4)] - [return: NativeTypeName("SIZE_T")] - nuint GetBufferSize(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("LPVOID () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBufferPointer; - - [NativeTypeName("SIZE_T () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBufferSize; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D1_ALPHA_MODE.cs b/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D1_ALPHA_MODE.cs deleted file mode 100644 index 8760b06f..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D1_ALPHA_MODE.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dcommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D2D1_ALPHA_MODE : uint - { - D2D1_ALPHA_MODE_UNKNOWN = 0, - D2D1_ALPHA_MODE_PREMULTIPLIED = 1, - D2D1_ALPHA_MODE_STRAIGHT = 2, - D2D1_ALPHA_MODE_IGNORE = 3, - D2D1_ALPHA_MODE_FORCE_DWORD = 0xffffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D1_PIXEL_FORMAT.cs b/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D1_PIXEL_FORMAT.cs deleted file mode 100644 index 57a207a4..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D1_PIXEL_FORMAT.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dcommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D1_PIXEL_FORMAT - { - public DXGI_FORMAT format; - - public D2D1_ALPHA_MODE alphaMode; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_MATRIX_3X2_F.cs b/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_MATRIX_3X2_F.cs deleted file mode 100644 index 978d9b88..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_MATRIX_3X2_F.cs +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dcommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal; - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D2D_MATRIX_3X2_F - { - [NativeTypeName("D2D_MATRIX_3X2_F::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/dcommon.h:277:5)")] - public _Anonymous_e__Union Anonymous; - - public ref float m11 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.m11, 1)); - } - } - - public ref float m12 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.m12, 1)); - } - } - - public ref float m21 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.m21, 1)); - } - } - - public ref float m22 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.m22, 1)); - } - } - - public ref float dx - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.dx, 1)); - } - } - - public ref float dy - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.dy, 1)); - } - } - - public ref float _11 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2._11, 1)); - } - } - - public ref float _12 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2._12, 1)); - } - } - - public ref float _21 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2._21, 1)); - } - } - - public ref float _22 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2._22, 1)); - } - } - - public ref float _31 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2._31, 1)); - } - } - - public ref float _32 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2._32, 1)); - } - } - - public Span m - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return MemoryMarshal.CreateSpan(ref Anonymous.m[0], 3); - } - } - - [StructLayout(LayoutKind.Explicit)] - internal unsafe partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - [NativeTypeName("D2D_MATRIX_3X2_F::(anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/dcommon.h:279:9)")] - public _Anonymous1_e__Struct Anonymous1; - - [FieldOffset(0)] - [NativeTypeName("D2D_MATRIX_3X2_F::(anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/dcommon.h:312:9)")] - public _Anonymous2_e__Struct Anonymous2; - - [FieldOffset(0)] - [NativeTypeName("FLOAT [3][2]")] - public fixed float m[3 * 2]; - - internal partial struct _Anonymous1_e__Struct - { - public float m11; - - public float m12; - - public float m21; - - public float m22; - - public float dx; - - public float dy; - } - - internal partial struct _Anonymous2_e__Struct - { - public float _11; - - public float _12; - - public float _21; - - public float _22; - - public float _31; - - public float _32; - } - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_MATRIX_4X4_F.cs b/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_MATRIX_4X4_F.cs deleted file mode 100644 index f6ef905c..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_MATRIX_4X4_F.cs +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dcommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal; - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct D2D_MATRIX_4X4_F - { - [NativeTypeName("D2D_MATRIX_4X4_F::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/dcommon.h:352:5)")] - public _Anonymous_e__Union Anonymous; - - public ref float _11 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous._11, 1)); - } - } - - public ref float _12 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous._12, 1)); - } - } - - public ref float _13 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous._13, 1)); - } - } - - public ref float _14 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous._14, 1)); - } - } - - public ref float _21 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous._21, 1)); - } - } - - public ref float _22 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous._22, 1)); - } - } - - public ref float _23 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous._23, 1)); - } - } - - public ref float _24 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous._24, 1)); - } - } - - public ref float _31 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous._31, 1)); - } - } - - public ref float _32 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous._32, 1)); - } - } - - public ref float _33 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous._33, 1)); - } - } - - public ref float _34 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous._34, 1)); - } - } - - public ref float _41 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous._41, 1)); - } - } - - public ref float _42 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous._42, 1)); - } - } - - public ref float _43 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous._43, 1)); - } - } - - public ref float _44 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous._44, 1)); - } - } - - public Span m - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return MemoryMarshal.CreateSpan(ref Anonymous.m[0], 4); - } - } - - [StructLayout(LayoutKind.Explicit)] - internal unsafe partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - [NativeTypeName("D2D_MATRIX_4X4_F::(anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/dcommon.h:354:9)")] - public _Anonymous_e__Struct Anonymous; - - [FieldOffset(0)] - [NativeTypeName("FLOAT [4][4]")] - public fixed float m[4 * 4]; - - internal partial struct _Anonymous_e__Struct - { - public float _11; - - public float _12; - - public float _13; - - public float _14; - - public float _21; - - public float _22; - - public float _23; - - public float _24; - - public float _31; - - public float _32; - - public float _33; - - public float _34; - - public float _41; - - public float _42; - - public float _43; - - public float _44; - } - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_POINT_2F.cs b/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_POINT_2F.cs deleted file mode 100644 index 5d44db67..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_POINT_2F.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dcommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D_POINT_2F - { - public float x; - - public float y; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_POINT_2U.cs b/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_POINT_2U.cs deleted file mode 100644 index 64c6faa1..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_POINT_2U.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dcommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D_POINT_2U - { - [NativeTypeName("UINT32")] - public uint x; - - [NativeTypeName("UINT32")] - public uint y; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_RECT_F.cs b/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_RECT_F.cs deleted file mode 100644 index c41577c5..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_RECT_F.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dcommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D_RECT_F - { - public float left; - - public float top; - - public float right; - - public float bottom; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_RECT_U.cs b/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_RECT_U.cs deleted file mode 100644 index 075fa174..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_RECT_U.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dcommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D_RECT_U - { - [NativeTypeName("UINT32")] - public uint left; - - [NativeTypeName("UINT32")] - public uint top; - - [NativeTypeName("UINT32")] - public uint right; - - [NativeTypeName("UINT32")] - public uint bottom; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_SIZE_F.cs b/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_SIZE_F.cs deleted file mode 100644 index 012a5da9..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_SIZE_F.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dcommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D_SIZE_F - { - public float width; - - public float height; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_SIZE_U.cs b/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_SIZE_U.cs deleted file mode 100644 index bf883c70..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D2D_SIZE_U.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dcommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct D2D_SIZE_U - { - [NativeTypeName("UINT32")] - public uint width; - - [NativeTypeName("UINT32")] - public uint height; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D3D_MIN_PRECISION.cs b/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D3D_MIN_PRECISION.cs deleted file mode 100644 index d873b197..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D3D_MIN_PRECISION.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3dcommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D_MIN_PRECISION - { - D3D_MIN_PRECISION_DEFAULT = 0, - D3D_MIN_PRECISION_FLOAT_16 = 1, - D3D_MIN_PRECISION_FLOAT_2_8 = 2, - D3D_MIN_PRECISION_RESERVED = 3, - D3D_MIN_PRECISION_SINT_16 = 4, - D3D_MIN_PRECISION_UINT_16 = 5, - D3D_MIN_PRECISION_ANY_16 = 0xf0, - D3D_MIN_PRECISION_ANY_10 = 0xf1, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D3D_NAME.cs b/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D3D_NAME.cs deleted file mode 100644 index b99dceee..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D3D_NAME.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3dcommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D_NAME - { - D3D_NAME_UNDEFINED = 0, - D3D_NAME_POSITION = 1, - D3D_NAME_CLIP_DISTANCE = 2, - D3D_NAME_CULL_DISTANCE = 3, - D3D_NAME_RENDER_TARGET_ARRAY_INDEX = 4, - D3D_NAME_VIEWPORT_ARRAY_INDEX = 5, - D3D_NAME_VERTEX_ID = 6, - D3D_NAME_PRIMITIVE_ID = 7, - D3D_NAME_INSTANCE_ID = 8, - D3D_NAME_IS_FRONT_FACE = 9, - D3D_NAME_SAMPLE_INDEX = 10, - D3D_NAME_FINAL_QUAD_EDGE_TESSFACTOR = 11, - D3D_NAME_FINAL_QUAD_INSIDE_TESSFACTOR = 12, - D3D_NAME_FINAL_TRI_EDGE_TESSFACTOR = 13, - D3D_NAME_FINAL_TRI_INSIDE_TESSFACTOR = 14, - D3D_NAME_FINAL_LINE_DETAIL_TESSFACTOR = 15, - D3D_NAME_FINAL_LINE_DENSITY_TESSFACTOR = 16, - D3D_NAME_BARYCENTRICS = 23, - D3D_NAME_SHADINGRATE = 24, - D3D_NAME_CULLPRIMITIVE = 25, - D3D_NAME_TARGET = 64, - D3D_NAME_DEPTH = 65, - D3D_NAME_COVERAGE = 66, - D3D_NAME_DEPTH_GREATER_EQUAL = 67, - D3D_NAME_DEPTH_LESS_EQUAL = 68, - D3D_NAME_STENCIL_REF = 69, - D3D_NAME_INNER_COVERAGE = 70, - D3D10_NAME_UNDEFINED = D3D_NAME_UNDEFINED, - D3D10_NAME_POSITION = D3D_NAME_POSITION, - D3D10_NAME_CLIP_DISTANCE = D3D_NAME_CLIP_DISTANCE, - D3D10_NAME_CULL_DISTANCE = D3D_NAME_CULL_DISTANCE, - D3D10_NAME_RENDER_TARGET_ARRAY_INDEX = D3D_NAME_RENDER_TARGET_ARRAY_INDEX, - D3D10_NAME_VIEWPORT_ARRAY_INDEX = D3D_NAME_VIEWPORT_ARRAY_INDEX, - D3D10_NAME_VERTEX_ID = D3D_NAME_VERTEX_ID, - D3D10_NAME_PRIMITIVE_ID = D3D_NAME_PRIMITIVE_ID, - D3D10_NAME_INSTANCE_ID = D3D_NAME_INSTANCE_ID, - D3D10_NAME_IS_FRONT_FACE = D3D_NAME_IS_FRONT_FACE, - D3D10_NAME_SAMPLE_INDEX = D3D_NAME_SAMPLE_INDEX, - D3D10_NAME_TARGET = D3D_NAME_TARGET, - D3D10_NAME_DEPTH = D3D_NAME_DEPTH, - D3D10_NAME_COVERAGE = D3D_NAME_COVERAGE, - D3D11_NAME_FINAL_QUAD_EDGE_TESSFACTOR = D3D_NAME_FINAL_QUAD_EDGE_TESSFACTOR, - D3D11_NAME_FINAL_QUAD_INSIDE_TESSFACTOR = D3D_NAME_FINAL_QUAD_INSIDE_TESSFACTOR, - D3D11_NAME_FINAL_TRI_EDGE_TESSFACTOR = D3D_NAME_FINAL_TRI_EDGE_TESSFACTOR, - D3D11_NAME_FINAL_TRI_INSIDE_TESSFACTOR = D3D_NAME_FINAL_TRI_INSIDE_TESSFACTOR, - D3D11_NAME_FINAL_LINE_DETAIL_TESSFACTOR = D3D_NAME_FINAL_LINE_DETAIL_TESSFACTOR, - D3D11_NAME_FINAL_LINE_DENSITY_TESSFACTOR = D3D_NAME_FINAL_LINE_DENSITY_TESSFACTOR, - D3D11_NAME_DEPTH_GREATER_EQUAL = D3D_NAME_DEPTH_GREATER_EQUAL, - D3D11_NAME_DEPTH_LESS_EQUAL = D3D_NAME_DEPTH_LESS_EQUAL, - D3D11_NAME_STENCIL_REF = D3D_NAME_STENCIL_REF, - D3D11_NAME_INNER_COVERAGE = D3D_NAME_INNER_COVERAGE, - D3D12_NAME_BARYCENTRICS = D3D_NAME_BARYCENTRICS, - D3D12_NAME_SHADINGRATE = D3D_NAME_SHADINGRATE, - D3D12_NAME_CULLPRIMITIVE = D3D_NAME_CULLPRIMITIVE, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D3D_REGISTER_COMPONENT_TYPE.cs b/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D3D_REGISTER_COMPONENT_TYPE.cs deleted file mode 100644 index aeaee11c..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/D3D_REGISTER_COMPONENT_TYPE.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3dcommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum D3D_REGISTER_COMPONENT_TYPE - { - D3D_REGISTER_COMPONENT_UNKNOWN = 0, - D3D_REGISTER_COMPONENT_UINT32 = 1, - D3D_REGISTER_COMPONENT_SINT32 = 2, - D3D_REGISTER_COMPONENT_FLOAT32 = 3, - D3D10_REGISTER_COMPONENT_UNKNOWN = D3D_REGISTER_COMPONENT_UNKNOWN, - D3D10_REGISTER_COMPONENT_UINT32 = D3D_REGISTER_COMPONENT_UINT32, - D3D10_REGISTER_COMPONENT_SINT32 = D3D_REGISTER_COMPONENT_SINT32, - D3D10_REGISTER_COMPONENT_FLOAT32 = D3D_REGISTER_COMPONENT_FLOAT32, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/DWRITE_MEASURING_MODE.cs b/src/TerraFX.Interop.Windows/DirectX/um/dcommon/DWRITE_MEASURING_MODE.cs deleted file mode 100644 index 0a830568..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dcommon/DWRITE_MEASURING_MODE.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dcommon.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum DWRITE_MEASURING_MODE - { - DWRITE_MEASURING_MODE_NATURAL, - DWRITE_MEASURING_MODE_GDI_CLASSIC, - DWRITE_MEASURING_MODE_GDI_NATURAL, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_BREAK_CONDITION.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_BREAK_CONDITION.cs deleted file mode 100644 index 336c56d1..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_BREAK_CONDITION.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum DWRITE_BREAK_CONDITION - { - DWRITE_BREAK_CONDITION_NEUTRAL, - DWRITE_BREAK_CONDITION_CAN_BREAK, - DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, - DWRITE_BREAK_CONDITION_MUST_BREAK, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_CLUSTER_METRICS.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_CLUSTER_METRICS.cs deleted file mode 100644 index 828d50c6..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_CLUSTER_METRICS.cs +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System.Runtime.CompilerServices; - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DWRITE_CLUSTER_METRICS - { - public float width; - - [NativeTypeName("UINT16")] - public ushort length; - - public ushort _bitfield; - - [NativeTypeName("UINT16 : 1")] - public ushort canWrapLineAfter - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return (ushort)(_bitfield & 0x1u); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - set - { - _bitfield = (ushort)((_bitfield & ~0x1u) | (value & 0x1u)); - } - } - - [NativeTypeName("UINT16 : 1")] - public ushort isWhitespace - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return (ushort)((_bitfield >> 1) & 0x1u); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - set - { - _bitfield = (ushort)((_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1)); - } - } - - [NativeTypeName("UINT16 : 1")] - public ushort isNewline - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return (ushort)((_bitfield >> 2) & 0x1u); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - set - { - _bitfield = (ushort)((_bitfield & ~(0x1u << 2)) | ((value & 0x1u) << 2)); - } - } - - [NativeTypeName("UINT16 : 1")] - public ushort isSoftHyphen - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return (ushort)((_bitfield >> 3) & 0x1u); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - set - { - _bitfield = (ushort)((_bitfield & ~(0x1u << 3)) | ((value & 0x1u) << 3)); - } - } - - [NativeTypeName("UINT16 : 1")] - public ushort isRightToLeft - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return (ushort)((_bitfield >> 4) & 0x1u); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - set - { - _bitfield = (ushort)((_bitfield & ~(0x1u << 4)) | ((value & 0x1u) << 4)); - } - } - - [NativeTypeName("UINT16 : 11")] - public ushort padding - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return (ushort)((_bitfield >> 5) & 0x7FFu); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - set - { - _bitfield = (ushort)((_bitfield & ~(0x7FFu << 5)) | ((value & 0x7FFu) << 5)); - } - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FLOW_DIRECTION.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FLOW_DIRECTION.cs deleted file mode 100644 index 352e72e6..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FLOW_DIRECTION.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum DWRITE_FLOW_DIRECTION - { - DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM = 0, - DWRITE_FLOW_DIRECTION_BOTTOM_TO_TOP = 1, - DWRITE_FLOW_DIRECTION_LEFT_TO_RIGHT = 2, - DWRITE_FLOW_DIRECTION_RIGHT_TO_LEFT = 3, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_FACE_TYPE.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_FACE_TYPE.cs deleted file mode 100644 index b8e3a2cb..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_FACE_TYPE.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum DWRITE_FONT_FACE_TYPE - { - DWRITE_FONT_FACE_TYPE_CFF, - DWRITE_FONT_FACE_TYPE_TRUETYPE, - DWRITE_FONT_FACE_TYPE_OPENTYPE_COLLECTION, - DWRITE_FONT_FACE_TYPE_TYPE1, - DWRITE_FONT_FACE_TYPE_VECTOR, - DWRITE_FONT_FACE_TYPE_BITMAP, - DWRITE_FONT_FACE_TYPE_UNKNOWN, - DWRITE_FONT_FACE_TYPE_RAW_CFF, - DWRITE_FONT_FACE_TYPE_TRUETYPE_COLLECTION = DWRITE_FONT_FACE_TYPE_OPENTYPE_COLLECTION, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_FEATURE.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_FEATURE.cs deleted file mode 100644 index bf256235..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_FEATURE.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DWRITE_FONT_FEATURE - { - public DWRITE_FONT_FEATURE_TAG nameTag; - - [NativeTypeName("UINT32")] - public uint parameter; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_FEATURE_TAG.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_FEATURE_TAG.cs deleted file mode 100644 index db9ed133..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_FEATURE_TAG.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - [NativeTypeName("int")] - internal enum DWRITE_FONT_FEATURE_TAG : uint - { - DWRITE_FONT_FEATURE_TAG_ALTERNATIVE_FRACTIONS = (unchecked(((uint)((byte)('c')) << 24) | ((uint)((byte)('r')) << 16) | ((uint)((byte)('f')) << 8) | (uint)((byte)('a')))), - DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS_FROM_CAPITALS = (unchecked(((uint)((byte)('c')) << 24) | ((uint)((byte)('p')) << 16) | ((uint)((byte)('2')) << 8) | (uint)((byte)('c')))), - DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS_FROM_CAPITALS = (unchecked(((uint)((byte)('c')) << 24) | ((uint)((byte)('s')) << 16) | ((uint)((byte)('2')) << 8) | (uint)((byte)('c')))), - DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_ALTERNATES = (unchecked(((uint)((byte)('t')) << 24) | ((uint)((byte)('l')) << 16) | ((uint)((byte)('a')) << 8) | (uint)((byte)('c')))), - DWRITE_FONT_FEATURE_TAG_CASE_SENSITIVE_FORMS = (unchecked(((uint)((byte)('e')) << 24) | ((uint)((byte)('s')) << 16) | ((uint)((byte)('a')) << 8) | (uint)((byte)('c')))), - DWRITE_FONT_FEATURE_TAG_GLYPH_COMPOSITION_DECOMPOSITION = (unchecked(((uint)((byte)('p')) << 24) | ((uint)((byte)('m')) << 16) | ((uint)((byte)('c')) << 8) | (uint)((byte)('c')))), - DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_LIGATURES = (unchecked(((uint)((byte)('g')) << 24) | ((uint)((byte)('i')) << 16) | ((uint)((byte)('l')) << 8) | (uint)((byte)('c')))), - DWRITE_FONT_FEATURE_TAG_CAPITAL_SPACING = (unchecked(((uint)((byte)('p')) << 24) | ((uint)((byte)('s')) << 16) | ((uint)((byte)('p')) << 8) | (uint)((byte)('c')))), - DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_SWASH = (unchecked(((uint)((byte)('h')) << 24) | ((uint)((byte)('w')) << 16) | ((uint)((byte)('s')) << 8) | (uint)((byte)('c')))), - DWRITE_FONT_FEATURE_TAG_CURSIVE_POSITIONING = (unchecked(((uint)((byte)('s')) << 24) | ((uint)((byte)('r')) << 16) | ((uint)((byte)('u')) << 8) | (uint)((byte)('c')))), - DWRITE_FONT_FEATURE_TAG_DEFAULT = (unchecked(((uint)((byte)('t')) << 24) | ((uint)((byte)('l')) << 16) | ((uint)((byte)('f')) << 8) | (uint)((byte)('d')))), - DWRITE_FONT_FEATURE_TAG_DISCRETIONARY_LIGATURES = (unchecked(((uint)((byte)('g')) << 24) | ((uint)((byte)('i')) << 16) | ((uint)((byte)('l')) << 8) | (uint)((byte)('d')))), - DWRITE_FONT_FEATURE_TAG_EXPERT_FORMS = (unchecked(((uint)((byte)('t')) << 24) | ((uint)((byte)('p')) << 16) | ((uint)((byte)('x')) << 8) | (uint)((byte)('e')))), - DWRITE_FONT_FEATURE_TAG_FRACTIONS = (unchecked(((uint)((byte)('c')) << 24) | ((uint)((byte)('a')) << 16) | ((uint)((byte)('r')) << 8) | (uint)((byte)('f')))), - DWRITE_FONT_FEATURE_TAG_FULL_WIDTH = (unchecked(((uint)((byte)('d')) << 24) | ((uint)((byte)('i')) << 16) | ((uint)((byte)('w')) << 8) | (uint)((byte)('f')))), - DWRITE_FONT_FEATURE_TAG_HALF_FORMS = (unchecked(((uint)((byte)('f')) << 24) | ((uint)((byte)('l')) << 16) | ((uint)((byte)('a')) << 8) | (uint)((byte)('h')))), - DWRITE_FONT_FEATURE_TAG_HALANT_FORMS = (unchecked(((uint)((byte)('n')) << 24) | ((uint)((byte)('l')) << 16) | ((uint)((byte)('a')) << 8) | (uint)((byte)('h')))), - DWRITE_FONT_FEATURE_TAG_ALTERNATE_HALF_WIDTH = (unchecked(((uint)((byte)('t')) << 24) | ((uint)((byte)('l')) << 16) | ((uint)((byte)('a')) << 8) | (uint)((byte)('h')))), - DWRITE_FONT_FEATURE_TAG_HISTORICAL_FORMS = (unchecked(((uint)((byte)('t')) << 24) | ((uint)((byte)('s')) << 16) | ((uint)((byte)('i')) << 8) | (uint)((byte)('h')))), - DWRITE_FONT_FEATURE_TAG_HORIZONTAL_KANA_ALTERNATES = (unchecked(((uint)((byte)('a')) << 24) | ((uint)((byte)('n')) << 16) | ((uint)((byte)('k')) << 8) | (uint)((byte)('h')))), - DWRITE_FONT_FEATURE_TAG_HISTORICAL_LIGATURES = (unchecked(((uint)((byte)('g')) << 24) | ((uint)((byte)('i')) << 16) | ((uint)((byte)('l')) << 8) | (uint)((byte)('h')))), - DWRITE_FONT_FEATURE_TAG_HALF_WIDTH = (unchecked(((uint)((byte)('d')) << 24) | ((uint)((byte)('i')) << 16) | ((uint)((byte)('w')) << 8) | (uint)((byte)('h')))), - DWRITE_FONT_FEATURE_TAG_HOJO_KANJI_FORMS = (unchecked(((uint)((byte)('o')) << 24) | ((uint)((byte)('j')) << 16) | ((uint)((byte)('o')) << 8) | (uint)((byte)('h')))), - DWRITE_FONT_FEATURE_TAG_JIS04_FORMS = (unchecked(((uint)((byte)('4')) << 24) | ((uint)((byte)('0')) << 16) | ((uint)((byte)('p')) << 8) | (uint)((byte)('j')))), - DWRITE_FONT_FEATURE_TAG_JIS78_FORMS = (unchecked(((uint)((byte)('8')) << 24) | ((uint)((byte)('7')) << 16) | ((uint)((byte)('p')) << 8) | (uint)((byte)('j')))), - DWRITE_FONT_FEATURE_TAG_JIS83_FORMS = (unchecked(((uint)((byte)('3')) << 24) | ((uint)((byte)('8')) << 16) | ((uint)((byte)('p')) << 8) | (uint)((byte)('j')))), - DWRITE_FONT_FEATURE_TAG_JIS90_FORMS = (unchecked(((uint)((byte)('0')) << 24) | ((uint)((byte)('9')) << 16) | ((uint)((byte)('p')) << 8) | (uint)((byte)('j')))), - DWRITE_FONT_FEATURE_TAG_KERNING = (unchecked(((uint)((byte)('n')) << 24) | ((uint)((byte)('r')) << 16) | ((uint)((byte)('e')) << 8) | (uint)((byte)('k')))), - DWRITE_FONT_FEATURE_TAG_STANDARD_LIGATURES = (unchecked(((uint)((byte)('a')) << 24) | ((uint)((byte)('g')) << 16) | ((uint)((byte)('i')) << 8) | (uint)((byte)('l')))), - DWRITE_FONT_FEATURE_TAG_LINING_FIGURES = (unchecked(((uint)((byte)('m')) << 24) | ((uint)((byte)('u')) << 16) | ((uint)((byte)('n')) << 8) | (uint)((byte)('l')))), - DWRITE_FONT_FEATURE_TAG_LOCALIZED_FORMS = (unchecked(((uint)((byte)('l')) << 24) | ((uint)((byte)('c')) << 16) | ((uint)((byte)('o')) << 8) | (uint)((byte)('l')))), - DWRITE_FONT_FEATURE_TAG_MARK_POSITIONING = (unchecked(((uint)((byte)('k')) << 24) | ((uint)((byte)('r')) << 16) | ((uint)((byte)('a')) << 8) | (uint)((byte)('m')))), - DWRITE_FONT_FEATURE_TAG_MATHEMATICAL_GREEK = (unchecked(((uint)((byte)('k')) << 24) | ((uint)((byte)('r')) << 16) | ((uint)((byte)('g')) << 8) | (uint)((byte)('m')))), - DWRITE_FONT_FEATURE_TAG_MARK_TO_MARK_POSITIONING = (unchecked(((uint)((byte)('k')) << 24) | ((uint)((byte)('m')) << 16) | ((uint)((byte)('k')) << 8) | (uint)((byte)('m')))), - DWRITE_FONT_FEATURE_TAG_ALTERNATE_ANNOTATION_FORMS = (unchecked(((uint)((byte)('t')) << 24) | ((uint)((byte)('l')) << 16) | ((uint)((byte)('a')) << 8) | (uint)((byte)('n')))), - DWRITE_FONT_FEATURE_TAG_NLC_KANJI_FORMS = (unchecked(((uint)((byte)('k')) << 24) | ((uint)((byte)('c')) << 16) | ((uint)((byte)('l')) << 8) | (uint)((byte)('n')))), - DWRITE_FONT_FEATURE_TAG_OLD_STYLE_FIGURES = (unchecked(((uint)((byte)('m')) << 24) | ((uint)((byte)('u')) << 16) | ((uint)((byte)('n')) << 8) | (uint)((byte)('o')))), - DWRITE_FONT_FEATURE_TAG_ORDINALS = (unchecked(((uint)((byte)('n')) << 24) | ((uint)((byte)('d')) << 16) | ((uint)((byte)('r')) << 8) | (uint)((byte)('o')))), - DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_ALTERNATE_WIDTH = (unchecked(((uint)((byte)('t')) << 24) | ((uint)((byte)('l')) << 16) | ((uint)((byte)('a')) << 8) | (uint)((byte)('p')))), - DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS = (unchecked(((uint)((byte)('p')) << 24) | ((uint)((byte)('a')) << 16) | ((uint)((byte)('c')) << 8) | (uint)((byte)('p')))), - DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_FIGURES = (unchecked(((uint)((byte)('m')) << 24) | ((uint)((byte)('u')) << 16) | ((uint)((byte)('n')) << 8) | (uint)((byte)('p')))), - DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_WIDTHS = (unchecked(((uint)((byte)('d')) << 24) | ((uint)((byte)('i')) << 16) | ((uint)((byte)('w')) << 8) | (uint)((byte)('p')))), - DWRITE_FONT_FEATURE_TAG_QUARTER_WIDTHS = (unchecked(((uint)((byte)('d')) << 24) | ((uint)((byte)('i')) << 16) | ((uint)((byte)('w')) << 8) | (uint)((byte)('q')))), - DWRITE_FONT_FEATURE_TAG_REQUIRED_LIGATURES = (unchecked(((uint)((byte)('g')) << 24) | ((uint)((byte)('i')) << 16) | ((uint)((byte)('l')) << 8) | (uint)((byte)('r')))), - DWRITE_FONT_FEATURE_TAG_RUBY_NOTATION_FORMS = (unchecked(((uint)((byte)('y')) << 24) | ((uint)((byte)('b')) << 16) | ((uint)((byte)('u')) << 8) | (uint)((byte)('r')))), - DWRITE_FONT_FEATURE_TAG_STYLISTIC_ALTERNATES = (unchecked(((uint)((byte)('t')) << 24) | ((uint)((byte)('l')) << 16) | ((uint)((byte)('a')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_SCIENTIFIC_INFERIORS = (unchecked(((uint)((byte)('f')) << 24) | ((uint)((byte)('n')) << 16) | ((uint)((byte)('i')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS = (unchecked(((uint)((byte)('p')) << 24) | ((uint)((byte)('c')) << 16) | ((uint)((byte)('m')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_SIMPLIFIED_FORMS = (unchecked(((uint)((byte)('l')) << 24) | ((uint)((byte)('p')) << 16) | ((uint)((byte)('m')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1 = (unchecked(((uint)((byte)('1')) << 24) | ((uint)((byte)('0')) << 16) | ((uint)((byte)('s')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_2 = (unchecked(((uint)((byte)('2')) << 24) | ((uint)((byte)('0')) << 16) | ((uint)((byte)('s')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_3 = (unchecked(((uint)((byte)('3')) << 24) | ((uint)((byte)('0')) << 16) | ((uint)((byte)('s')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_4 = (unchecked(((uint)((byte)('4')) << 24) | ((uint)((byte)('0')) << 16) | ((uint)((byte)('s')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_5 = (unchecked(((uint)((byte)('5')) << 24) | ((uint)((byte)('0')) << 16) | ((uint)((byte)('s')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_6 = (unchecked(((uint)((byte)('6')) << 24) | ((uint)((byte)('0')) << 16) | ((uint)((byte)('s')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_7 = (unchecked(((uint)((byte)('7')) << 24) | ((uint)((byte)('0')) << 16) | ((uint)((byte)('s')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_8 = (unchecked(((uint)((byte)('8')) << 24) | ((uint)((byte)('0')) << 16) | ((uint)((byte)('s')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_9 = (unchecked(((uint)((byte)('9')) << 24) | ((uint)((byte)('0')) << 16) | ((uint)((byte)('s')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_10 = (unchecked(((uint)((byte)('0')) << 24) | ((uint)((byte)('1')) << 16) | ((uint)((byte)('s')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_11 = (unchecked(((uint)((byte)('1')) << 24) | ((uint)((byte)('1')) << 16) | ((uint)((byte)('s')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_12 = (unchecked(((uint)((byte)('2')) << 24) | ((uint)((byte)('1')) << 16) | ((uint)((byte)('s')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_13 = (unchecked(((uint)((byte)('3')) << 24) | ((uint)((byte)('1')) << 16) | ((uint)((byte)('s')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_14 = (unchecked(((uint)((byte)('4')) << 24) | ((uint)((byte)('1')) << 16) | ((uint)((byte)('s')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_15 = (unchecked(((uint)((byte)('5')) << 24) | ((uint)((byte)('1')) << 16) | ((uint)((byte)('s')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_16 = (unchecked(((uint)((byte)('6')) << 24) | ((uint)((byte)('1')) << 16) | ((uint)((byte)('s')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_17 = (unchecked(((uint)((byte)('7')) << 24) | ((uint)((byte)('1')) << 16) | ((uint)((byte)('s')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_18 = (unchecked(((uint)((byte)('8')) << 24) | ((uint)((byte)('1')) << 16) | ((uint)((byte)('s')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_19 = (unchecked(((uint)((byte)('9')) << 24) | ((uint)((byte)('1')) << 16) | ((uint)((byte)('s')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_20 = (unchecked(((uint)((byte)('0')) << 24) | ((uint)((byte)('2')) << 16) | ((uint)((byte)('s')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_SUBSCRIPT = (unchecked(((uint)((byte)('s')) << 24) | ((uint)((byte)('b')) << 16) | ((uint)((byte)('u')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_SUPERSCRIPT = (unchecked(((uint)((byte)('s')) << 24) | ((uint)((byte)('p')) << 16) | ((uint)((byte)('u')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_SWASH = (unchecked(((uint)((byte)('h')) << 24) | ((uint)((byte)('s')) << 16) | ((uint)((byte)('w')) << 8) | (uint)((byte)('s')))), - DWRITE_FONT_FEATURE_TAG_TITLING = (unchecked(((uint)((byte)('l')) << 24) | ((uint)((byte)('t')) << 16) | ((uint)((byte)('i')) << 8) | (uint)((byte)('t')))), - DWRITE_FONT_FEATURE_TAG_TRADITIONAL_NAME_FORMS = (unchecked(((uint)((byte)('m')) << 24) | ((uint)((byte)('a')) << 16) | ((uint)((byte)('n')) << 8) | (uint)((byte)('t')))), - DWRITE_FONT_FEATURE_TAG_TABULAR_FIGURES = (unchecked(((uint)((byte)('m')) << 24) | ((uint)((byte)('u')) << 16) | ((uint)((byte)('n')) << 8) | (uint)((byte)('t')))), - DWRITE_FONT_FEATURE_TAG_TRADITIONAL_FORMS = (unchecked(((uint)((byte)('d')) << 24) | ((uint)((byte)('a')) << 16) | ((uint)((byte)('r')) << 8) | (uint)((byte)('t')))), - DWRITE_FONT_FEATURE_TAG_THIRD_WIDTHS = (unchecked(((uint)((byte)('d')) << 24) | ((uint)((byte)('i')) << 16) | ((uint)((byte)('w')) << 8) | (uint)((byte)('t')))), - DWRITE_FONT_FEATURE_TAG_UNICASE = (unchecked(((uint)((byte)('c')) << 24) | ((uint)((byte)('i')) << 16) | ((uint)((byte)('n')) << 8) | (uint)((byte)('u')))), - DWRITE_FONT_FEATURE_TAG_VERTICAL_WRITING = (unchecked(((uint)((byte)('t')) << 24) | ((uint)((byte)('r')) << 16) | ((uint)((byte)('e')) << 8) | (uint)((byte)('v')))), - DWRITE_FONT_FEATURE_TAG_VERTICAL_ALTERNATES_AND_ROTATION = (unchecked(((uint)((byte)('2')) << 24) | ((uint)((byte)('t')) << 16) | ((uint)((byte)('r')) << 8) | (uint)((byte)('v')))), - DWRITE_FONT_FEATURE_TAG_SLASHED_ZERO = (unchecked(((uint)((byte)('o')) << 24) | ((uint)((byte)('r')) << 16) | ((uint)((byte)('e')) << 8) | (uint)((byte)('z')))), - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_FILE_TYPE.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_FILE_TYPE.cs deleted file mode 100644 index 4d37081c..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_FILE_TYPE.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum DWRITE_FONT_FILE_TYPE - { - DWRITE_FONT_FILE_TYPE_UNKNOWN, - DWRITE_FONT_FILE_TYPE_CFF, - DWRITE_FONT_FILE_TYPE_TRUETYPE, - DWRITE_FONT_FILE_TYPE_OPENTYPE_COLLECTION, - DWRITE_FONT_FILE_TYPE_TYPE1_PFM, - DWRITE_FONT_FILE_TYPE_TYPE1_PFB, - DWRITE_FONT_FILE_TYPE_VECTOR, - DWRITE_FONT_FILE_TYPE_BITMAP, - DWRITE_FONT_FILE_TYPE_TRUETYPE_COLLECTION = DWRITE_FONT_FILE_TYPE_OPENTYPE_COLLECTION, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_METRICS.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_METRICS.cs deleted file mode 100644 index 1d8600a0..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_METRICS.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DWRITE_FONT_METRICS - { - [NativeTypeName("UINT16")] - public ushort designUnitsPerEm; - - [NativeTypeName("UINT16")] - public ushort ascent; - - [NativeTypeName("UINT16")] - public ushort descent; - - [NativeTypeName("INT16")] - public short lineGap; - - [NativeTypeName("UINT16")] - public ushort capHeight; - - [NativeTypeName("UINT16")] - public ushort xHeight; - - [NativeTypeName("INT16")] - public short underlinePosition; - - [NativeTypeName("UINT16")] - public ushort underlineThickness; - - [NativeTypeName("INT16")] - public short strikethroughPosition; - - [NativeTypeName("UINT16")] - public ushort strikethroughThickness; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_SIMULATIONS.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_SIMULATIONS.cs deleted file mode 100644 index a2fe7cd5..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_SIMULATIONS.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.DirectX -{ - [Flags] - internal enum DWRITE_FONT_SIMULATIONS - { - DWRITE_FONT_SIMULATIONS_NONE = 0x0000, - DWRITE_FONT_SIMULATIONS_BOLD = 0x0001, - DWRITE_FONT_SIMULATIONS_OBLIQUE = 0x0002, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_STRETCH.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_STRETCH.cs deleted file mode 100644 index 1930d2be..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_STRETCH.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum DWRITE_FONT_STRETCH - { - DWRITE_FONT_STRETCH_UNDEFINED = 0, - DWRITE_FONT_STRETCH_ULTRA_CONDENSED = 1, - DWRITE_FONT_STRETCH_EXTRA_CONDENSED = 2, - DWRITE_FONT_STRETCH_CONDENSED = 3, - DWRITE_FONT_STRETCH_SEMI_CONDENSED = 4, - DWRITE_FONT_STRETCH_NORMAL = 5, - DWRITE_FONT_STRETCH_MEDIUM = 5, - DWRITE_FONT_STRETCH_SEMI_EXPANDED = 6, - DWRITE_FONT_STRETCH_EXPANDED = 7, - DWRITE_FONT_STRETCH_EXTRA_EXPANDED = 8, - DWRITE_FONT_STRETCH_ULTRA_EXPANDED = 9, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_STYLE.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_STYLE.cs deleted file mode 100644 index 5ddee995..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_STYLE.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum DWRITE_FONT_STYLE - { - DWRITE_FONT_STYLE_NORMAL, - DWRITE_FONT_STYLE_OBLIQUE, - DWRITE_FONT_STYLE_ITALIC, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_WEIGHT.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_WEIGHT.cs deleted file mode 100644 index d98e8e39..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_FONT_WEIGHT.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum DWRITE_FONT_WEIGHT - { - DWRITE_FONT_WEIGHT_THIN = 100, - DWRITE_FONT_WEIGHT_EXTRA_LIGHT = 200, - DWRITE_FONT_WEIGHT_ULTRA_LIGHT = 200, - DWRITE_FONT_WEIGHT_LIGHT = 300, - DWRITE_FONT_WEIGHT_SEMI_LIGHT = 350, - DWRITE_FONT_WEIGHT_NORMAL = 400, - DWRITE_FONT_WEIGHT_REGULAR = 400, - DWRITE_FONT_WEIGHT_MEDIUM = 500, - DWRITE_FONT_WEIGHT_DEMI_BOLD = 600, - DWRITE_FONT_WEIGHT_SEMI_BOLD = 600, - DWRITE_FONT_WEIGHT_BOLD = 700, - DWRITE_FONT_WEIGHT_EXTRA_BOLD = 800, - DWRITE_FONT_WEIGHT_ULTRA_BOLD = 800, - DWRITE_FONT_WEIGHT_BLACK = 900, - DWRITE_FONT_WEIGHT_HEAVY = 900, - DWRITE_FONT_WEIGHT_EXTRA_BLACK = 950, - DWRITE_FONT_WEIGHT_ULTRA_BLACK = 950, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_GLYPH_METRICS.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_GLYPH_METRICS.cs deleted file mode 100644 index 97f4332d..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_GLYPH_METRICS.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DWRITE_GLYPH_METRICS - { - [NativeTypeName("INT32")] - public int leftSideBearing; - - [NativeTypeName("UINT32")] - public uint advanceWidth; - - [NativeTypeName("INT32")] - public int rightSideBearing; - - [NativeTypeName("INT32")] - public int topSideBearing; - - [NativeTypeName("UINT32")] - public uint advanceHeight; - - [NativeTypeName("INT32")] - public int bottomSideBearing; - - [NativeTypeName("INT32")] - public int verticalOriginY; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_GLYPH_OFFSET.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_GLYPH_OFFSET.cs deleted file mode 100644 index cb6f00ba..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_GLYPH_OFFSET.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DWRITE_GLYPH_OFFSET - { - public float advanceOffset; - - public float ascenderOffset; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_GLYPH_RUN.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_GLYPH_RUN.cs deleted file mode 100644 index fe59e547..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_GLYPH_RUN.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct DWRITE_GLYPH_RUN - { - public IDWriteFontFace* fontFace; - - public float fontEmSize; - - [NativeTypeName("UINT32")] - public uint glyphCount; - - [NativeTypeName("const UINT16 *")] - public ushort* glyphIndices; - - [NativeTypeName("const FLOAT *")] - public float* glyphAdvances; - - [NativeTypeName("const DWRITE_GLYPH_OFFSET *")] - public DWRITE_GLYPH_OFFSET* glyphOffsets; - - public BOOL isSideways; - - [NativeTypeName("UINT32")] - public uint bidiLevel; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_GLYPH_RUN_DESCRIPTION.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_GLYPH_RUN_DESCRIPTION.cs deleted file mode 100644 index 6a0ff0d3..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_GLYPH_RUN_DESCRIPTION.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct DWRITE_GLYPH_RUN_DESCRIPTION - { - [NativeTypeName("const WCHAR *")] - public ushort* localeName; - - [NativeTypeName("const WCHAR *")] - public ushort* @string; - - [NativeTypeName("UINT32")] - public uint stringLength; - - [NativeTypeName("const UINT16 *")] - public ushort* clusterMap; - - [NativeTypeName("UINT32")] - public uint textPosition; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_HIT_TEST_METRICS.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_HIT_TEST_METRICS.cs deleted file mode 100644 index 98d61907..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_HIT_TEST_METRICS.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DWRITE_HIT_TEST_METRICS - { - [NativeTypeName("UINT32")] - public uint textPosition; - - [NativeTypeName("UINT32")] - public uint length; - - public float left; - - public float top; - - public float width; - - public float height; - - [NativeTypeName("UINT32")] - public uint bidiLevel; - - public BOOL isText; - - public BOOL isTrimmed; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_INFORMATIONAL_STRING_ID.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_INFORMATIONAL_STRING_ID.cs deleted file mode 100644 index 56e576f8..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_INFORMATIONAL_STRING_ID.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum DWRITE_INFORMATIONAL_STRING_ID - { - DWRITE_INFORMATIONAL_STRING_NONE, - DWRITE_INFORMATIONAL_STRING_COPYRIGHT_NOTICE, - DWRITE_INFORMATIONAL_STRING_VERSION_STRINGS, - DWRITE_INFORMATIONAL_STRING_TRADEMARK, - DWRITE_INFORMATIONAL_STRING_MANUFACTURER, - DWRITE_INFORMATIONAL_STRING_DESIGNER, - DWRITE_INFORMATIONAL_STRING_DESIGNER_URL, - DWRITE_INFORMATIONAL_STRING_DESCRIPTION, - DWRITE_INFORMATIONAL_STRING_FONT_VENDOR_URL, - DWRITE_INFORMATIONAL_STRING_LICENSE_DESCRIPTION, - DWRITE_INFORMATIONAL_STRING_LICENSE_INFO_URL, - DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES, - DWRITE_INFORMATIONAL_STRING_WIN32_SUBFAMILY_NAMES, - DWRITE_INFORMATIONAL_STRING_TYPOGRAPHIC_FAMILY_NAMES, - DWRITE_INFORMATIONAL_STRING_TYPOGRAPHIC_SUBFAMILY_NAMES, - DWRITE_INFORMATIONAL_STRING_SAMPLE_TEXT, - DWRITE_INFORMATIONAL_STRING_FULL_NAME, - DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_NAME, - DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_CID_NAME, - DWRITE_INFORMATIONAL_STRING_WEIGHT_STRETCH_STYLE_FAMILY_NAME, - DWRITE_INFORMATIONAL_STRING_DESIGN_SCRIPT_LANGUAGE_TAG, - DWRITE_INFORMATIONAL_STRING_SUPPORTED_SCRIPT_LANGUAGE_TAG, - DWRITE_INFORMATIONAL_STRING_PREFERRED_FAMILY_NAMES = DWRITE_INFORMATIONAL_STRING_TYPOGRAPHIC_FAMILY_NAMES, - DWRITE_INFORMATIONAL_STRING_PREFERRED_SUBFAMILY_NAMES = DWRITE_INFORMATIONAL_STRING_TYPOGRAPHIC_SUBFAMILY_NAMES, - DWRITE_INFORMATIONAL_STRING_WWS_FAMILY_NAME = DWRITE_INFORMATIONAL_STRING_WEIGHT_STRETCH_STYLE_FAMILY_NAME, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_INLINE_OBJECT_METRICS.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_INLINE_OBJECT_METRICS.cs deleted file mode 100644 index 04ab1be4..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_INLINE_OBJECT_METRICS.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DWRITE_INLINE_OBJECT_METRICS - { - public float width; - - public float height; - - public float baseline; - - public BOOL supportsSideways; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_LINE_METRICS.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_LINE_METRICS.cs deleted file mode 100644 index 259ea562..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_LINE_METRICS.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DWRITE_LINE_METRICS - { - [NativeTypeName("UINT32")] - public uint length; - - [NativeTypeName("UINT32")] - public uint trailingWhitespaceLength; - - [NativeTypeName("UINT32")] - public uint newlineLength; - - public float height; - - public float baseline; - - public BOOL isTrimmed; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_LINE_SPACING_METHOD.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_LINE_SPACING_METHOD.cs deleted file mode 100644 index dd7e2e91..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_LINE_SPACING_METHOD.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum DWRITE_LINE_SPACING_METHOD - { - DWRITE_LINE_SPACING_METHOD_DEFAULT, - DWRITE_LINE_SPACING_METHOD_UNIFORM, - DWRITE_LINE_SPACING_METHOD_PROPORTIONAL, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_MATRIX.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_MATRIX.cs deleted file mode 100644 index 44c99fbc..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_MATRIX.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DWRITE_MATRIX - { - public float m11; - - public float m12; - - public float m21; - - public float m22; - - public float dx; - - public float dy; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_OVERHANG_METRICS.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_OVERHANG_METRICS.cs deleted file mode 100644 index b04c1c25..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_OVERHANG_METRICS.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DWRITE_OVERHANG_METRICS - { - public float left; - - public float top; - - public float right; - - public float bottom; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_PARAGRAPH_ALIGNMENT.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_PARAGRAPH_ALIGNMENT.cs deleted file mode 100644 index 94dc4bae..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_PARAGRAPH_ALIGNMENT.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum DWRITE_PARAGRAPH_ALIGNMENT - { - DWRITE_PARAGRAPH_ALIGNMENT_NEAR, - DWRITE_PARAGRAPH_ALIGNMENT_FAR, - DWRITE_PARAGRAPH_ALIGNMENT_CENTER, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_PIXEL_GEOMETRY.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_PIXEL_GEOMETRY.cs deleted file mode 100644 index 8717e51f..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_PIXEL_GEOMETRY.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum DWRITE_PIXEL_GEOMETRY - { - DWRITE_PIXEL_GEOMETRY_FLAT, - DWRITE_PIXEL_GEOMETRY_RGB, - DWRITE_PIXEL_GEOMETRY_BGR, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_READING_DIRECTION.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_READING_DIRECTION.cs deleted file mode 100644 index 3555ba86..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_READING_DIRECTION.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum DWRITE_READING_DIRECTION - { - DWRITE_READING_DIRECTION_LEFT_TO_RIGHT = 0, - DWRITE_READING_DIRECTION_RIGHT_TO_LEFT = 1, - DWRITE_READING_DIRECTION_TOP_TO_BOTTOM = 2, - DWRITE_READING_DIRECTION_BOTTOM_TO_TOP = 3, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_RENDERING_MODE.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_RENDERING_MODE.cs deleted file mode 100644 index ce27e996..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_RENDERING_MODE.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum DWRITE_RENDERING_MODE - { - DWRITE_RENDERING_MODE_DEFAULT, - DWRITE_RENDERING_MODE_ALIASED, - DWRITE_RENDERING_MODE_GDI_CLASSIC, - DWRITE_RENDERING_MODE_GDI_NATURAL, - DWRITE_RENDERING_MODE_NATURAL, - DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC, - DWRITE_RENDERING_MODE_OUTLINE, - DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC = DWRITE_RENDERING_MODE_GDI_CLASSIC, - DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL = DWRITE_RENDERING_MODE_GDI_NATURAL, - DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL = DWRITE_RENDERING_MODE_NATURAL, - DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC = DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_STRIKETHROUGH.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_STRIKETHROUGH.cs deleted file mode 100644 index 6117a5d9..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_STRIKETHROUGH.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct DWRITE_STRIKETHROUGH - { - public float width; - - public float thickness; - - public float offset; - - public DWRITE_READING_DIRECTION readingDirection; - - public DWRITE_FLOW_DIRECTION flowDirection; - - [NativeTypeName("const WCHAR *")] - public ushort* localeName; - - public DWRITE_MEASURING_MODE measuringMode; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_TEXT_ALIGNMENT.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_TEXT_ALIGNMENT.cs deleted file mode 100644 index 4c59c94c..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_TEXT_ALIGNMENT.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum DWRITE_TEXT_ALIGNMENT - { - DWRITE_TEXT_ALIGNMENT_LEADING, - DWRITE_TEXT_ALIGNMENT_TRAILING, - DWRITE_TEXT_ALIGNMENT_CENTER, - DWRITE_TEXT_ALIGNMENT_JUSTIFIED, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_TEXT_METRICS.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_TEXT_METRICS.cs deleted file mode 100644 index bdc3c568..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_TEXT_METRICS.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DWRITE_TEXT_METRICS - { - public float left; - - public float top; - - public float width; - - public float widthIncludingTrailingWhitespace; - - public float height; - - public float layoutWidth; - - public float layoutHeight; - - [NativeTypeName("UINT32")] - public uint maxBidiReorderingDepth; - - [NativeTypeName("UINT32")] - public uint lineCount; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_TEXT_RANGE.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_TEXT_RANGE.cs deleted file mode 100644 index 6e960caa..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_TEXT_RANGE.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DWRITE_TEXT_RANGE - { - [NativeTypeName("UINT32")] - public uint startPosition; - - [NativeTypeName("UINT32")] - public uint length; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_TRIMMING.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_TRIMMING.cs deleted file mode 100644 index be174c75..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_TRIMMING.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal partial struct DWRITE_TRIMMING - { - public DWRITE_TRIMMING_GRANULARITY granularity; - - [NativeTypeName("UINT32")] - public uint delimiter; - - [NativeTypeName("UINT32")] - public uint delimiterCount; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_TRIMMING_GRANULARITY.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_TRIMMING_GRANULARITY.cs deleted file mode 100644 index f73ebc89..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_TRIMMING_GRANULARITY.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum DWRITE_TRIMMING_GRANULARITY - { - DWRITE_TRIMMING_GRANULARITY_NONE, - DWRITE_TRIMMING_GRANULARITY_CHARACTER, - DWRITE_TRIMMING_GRANULARITY_WORD, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_UNDERLINE.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_UNDERLINE.cs deleted file mode 100644 index c9bb5432..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_UNDERLINE.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal unsafe partial struct DWRITE_UNDERLINE - { - public float width; - - public float thickness; - - public float offset; - - public float runHeight; - - public DWRITE_READING_DIRECTION readingDirection; - - public DWRITE_FLOW_DIRECTION flowDirection; - - [NativeTypeName("const WCHAR *")] - public ushort* localeName; - - public DWRITE_MEASURING_MODE measuringMode; - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_WORD_WRAPPING.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_WORD_WRAPPING.cs deleted file mode 100644 index a9a39996..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/DWRITE_WORD_WRAPPING.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.DirectX -{ - internal enum DWRITE_WORD_WRAPPING - { - DWRITE_WORD_WRAPPING_WRAP = 0, - DWRITE_WORD_WRAPPING_NO_WRAP = 1, - DWRITE_WORD_WRAPPING_EMERGENCY_BREAK = 2, - DWRITE_WORD_WRAPPING_WHOLE_WORD = 3, - DWRITE_WORD_WRAPPING_CHARACTER = 4, - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFont.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFont.cs deleted file mode 100644 index fef2ffb0..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFont.cs +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("ACD16696-8C14-4F5D-877E-FE3FC1D32737")] - [NativeTypeName("struct IDWriteFont : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IDWriteFont : IDWriteFont.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDWriteFont*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDWriteFont*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDWriteFont*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetFontFamily(IDWriteFontFamily** fontFamily) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDWriteFont*)Unsafe.AsPointer(ref this), fontFamily); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public DWRITE_FONT_WEIGHT GetWeight() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDWriteFont*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public DWRITE_FONT_STRETCH GetStretch() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDWriteFont*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public DWRITE_FONT_STYLE GetStyle() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDWriteFont*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public BOOL IsSymbolFont() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDWriteFont*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT GetFaceNames(IDWriteLocalizedStrings** names) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDWriteFont*)Unsafe.AsPointer(ref this), names); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT GetInformationalStrings(DWRITE_INFORMATIONAL_STRING_ID informationalStringID, IDWriteLocalizedStrings** informationalStrings, BOOL* exists) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDWriteFont*)Unsafe.AsPointer(ref this), informationalStringID, informationalStrings, exists); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public DWRITE_FONT_SIMULATIONS GetSimulations() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IDWriteFont*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public void GetMetrics(DWRITE_FONT_METRICS* fontMetrics) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IDWriteFont*)Unsafe.AsPointer(ref this), fontMetrics); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT HasCharacter([NativeTypeName("UINT32")] uint unicodeValue, BOOL* exists) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IDWriteFont*)Unsafe.AsPointer(ref this), unicodeValue, exists); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT CreateFontFace(IDWriteFontFace** fontFace) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDWriteFont*)Unsafe.AsPointer(ref this), fontFace); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT GetFontFamily(IDWriteFontFamily** fontFamily); - - [VtblIndex(4)] - DWRITE_FONT_WEIGHT GetWeight(); - - [VtblIndex(5)] - DWRITE_FONT_STRETCH GetStretch(); - - [VtblIndex(6)] - DWRITE_FONT_STYLE GetStyle(); - - [VtblIndex(7)] - BOOL IsSymbolFont(); - - [VtblIndex(8)] - HRESULT GetFaceNames(IDWriteLocalizedStrings** names); - - [VtblIndex(9)] - HRESULT GetInformationalStrings(DWRITE_INFORMATIONAL_STRING_ID informationalStringID, IDWriteLocalizedStrings** informationalStrings, BOOL* exists); - - [VtblIndex(10)] - DWRITE_FONT_SIMULATIONS GetSimulations(); - - [VtblIndex(11)] - void GetMetrics(DWRITE_FONT_METRICS* fontMetrics); - - [VtblIndex(12)] - HRESULT HasCharacter([NativeTypeName("UINT32")] uint unicodeValue, BOOL* exists); - - [VtblIndex(13)] - HRESULT CreateFontFace(IDWriteFontFace** fontFace); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (IDWriteFontFamily **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontFamily; - - [NativeTypeName("DWRITE_FONT_WEIGHT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetWeight; - - [NativeTypeName("DWRITE_FONT_STRETCH () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetStretch; - - [NativeTypeName("DWRITE_FONT_STYLE () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetStyle; - - [NativeTypeName("BOOL () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsSymbolFont; - - [NativeTypeName("HRESULT (IDWriteLocalizedStrings **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFaceNames; - - [NativeTypeName("HRESULT (DWRITE_INFORMATIONAL_STRING_ID, IDWriteLocalizedStrings **, BOOL *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetInformationalStrings; - - [NativeTypeName("DWRITE_FONT_SIMULATIONS () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSimulations; - - [NativeTypeName("void (DWRITE_FONT_METRICS *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMetrics; - - [NativeTypeName("HRESULT (UINT32, BOOL *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] HasCharacter; - - [NativeTypeName("HRESULT (IDWriteFontFace **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateFontFace; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFontCollection.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFontCollection.cs deleted file mode 100644 index a9eb3475..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFontCollection.cs +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("A84CEE02-3EEA-4EEE-A827-87C1A02A0FCC")] - [NativeTypeName("struct IDWriteFontCollection : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IDWriteFontCollection : IDWriteFontCollection.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDWriteFontCollection*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDWriteFontCollection*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDWriteFontCollection*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - [return: NativeTypeName("UINT32")] - public uint GetFontFamilyCount() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDWriteFontCollection*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetFontFamily([NativeTypeName("UINT32")] uint index, IDWriteFontFamily** fontFamily) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDWriteFontCollection*)Unsafe.AsPointer(ref this), index, fontFamily); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT FindFamilyName([NativeTypeName("const WCHAR *")] ushort* familyName, [NativeTypeName("UINT32 *")] uint* index, BOOL* exists) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDWriteFontCollection*)Unsafe.AsPointer(ref this), familyName, index, exists); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetFontFromFontFace(IDWriteFontFace* fontFace, IDWriteFont** font) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDWriteFontCollection*)Unsafe.AsPointer(ref this), fontFace, font); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - [return: NativeTypeName("UINT32")] - uint GetFontFamilyCount(); - - [VtblIndex(4)] - HRESULT GetFontFamily([NativeTypeName("UINT32")] uint index, IDWriteFontFamily** fontFamily); - - [VtblIndex(5)] - HRESULT FindFamilyName([NativeTypeName("const WCHAR *")] ushort* familyName, [NativeTypeName("UINT32 *")] uint* index, BOOL* exists); - - [VtblIndex(6)] - HRESULT GetFontFromFontFace(IDWriteFontFace* fontFace, IDWriteFont** font); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("UINT32 () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontFamilyCount; - - [NativeTypeName("HRESULT (UINT32, IDWriteFontFamily **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontFamily; - - [NativeTypeName("HRESULT (const WCHAR *, UINT32 *, BOOL *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FindFamilyName; - - [NativeTypeName("HRESULT (IDWriteFontFace *, IDWriteFont **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontFromFontFace; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFontFace.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFontFace.cs deleted file mode 100644 index d112d1aa..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFontFace.cs +++ /dev/null @@ -1,257 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("5F49804D-7024-4D43-BFA9-D25984F53849")] - [NativeTypeName("struct IDWriteFontFace : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IDWriteFontFace : IDWriteFontFace.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDWriteFontFace*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDWriteFontFace*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDWriteFontFace*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public new DWRITE_FONT_FACE_TYPE GetType() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDWriteFontFace*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetFiles([NativeTypeName("UINT32 *")] uint* numberOfFiles, IDWriteFontFile** fontFiles) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDWriteFontFace*)Unsafe.AsPointer(ref this), numberOfFiles, fontFiles); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - [return: NativeTypeName("UINT32")] - public uint GetIndex() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDWriteFontFace*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public DWRITE_FONT_SIMULATIONS GetSimulations() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDWriteFontFace*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public BOOL IsSymbolFont() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDWriteFontFace*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public void GetMetrics(DWRITE_FONT_METRICS* fontFaceMetrics) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDWriteFontFace*)Unsafe.AsPointer(ref this), fontFaceMetrics); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - [return: NativeTypeName("UINT16")] - public ushort GetGlyphCount() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDWriteFontFace*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT GetDesignGlyphMetrics([NativeTypeName("const UINT16 *")] ushort* glyphIndices, [NativeTypeName("UINT32")] uint glyphCount, DWRITE_GLYPH_METRICS* glyphMetrics, [Optional] BOOL isSideways) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IDWriteFontFace*)Unsafe.AsPointer(ref this), glyphIndices, glyphCount, glyphMetrics, isSideways); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT GetGlyphIndices([NativeTypeName("const UINT32 *")] uint* codePoints, [NativeTypeName("UINT32")] uint codePointCount, [NativeTypeName("UINT16 *")] ushort* glyphIndices) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IDWriteFontFace*)Unsafe.AsPointer(ref this), codePoints, codePointCount, glyphIndices); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT TryGetFontTable([NativeTypeName("UINT32")] uint openTypeTableTag, [NativeTypeName("const void **")] void** tableData, [NativeTypeName("UINT32 *")] uint* tableSize, void** tableContext, BOOL* exists) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IDWriteFontFace*)Unsafe.AsPointer(ref this), openTypeTableTag, tableData, tableSize, tableContext, exists); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public void ReleaseFontTable(void* tableContext) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDWriteFontFace*)Unsafe.AsPointer(ref this), tableContext); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT GetGlyphRunOutline(float emSize, [NativeTypeName("const UINT16 *")] ushort* glyphIndices, [NativeTypeName("const FLOAT *")] float* glyphAdvances, [NativeTypeName("const DWRITE_GLYPH_OFFSET *")] DWRITE_GLYPH_OFFSET* glyphOffsets, [NativeTypeName("UINT32")] uint glyphCount, BOOL isSideways, BOOL isRightToLeft, [NativeTypeName("IDWriteGeometrySink *")] ID2D1SimplifiedGeometrySink* geometrySink) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IDWriteFontFace*)Unsafe.AsPointer(ref this), emSize, glyphIndices, glyphAdvances, glyphOffsets, glyphCount, isSideways, isRightToLeft, geometrySink); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT GetRecommendedRenderingMode(float emSize, float pixelsPerDip, DWRITE_MEASURING_MODE measuringMode, IDWriteRenderingParams* renderingParams, DWRITE_RENDERING_MODE* renderingMode) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IDWriteFontFace*)Unsafe.AsPointer(ref this), emSize, pixelsPerDip, measuringMode, renderingParams, renderingMode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT GetGdiCompatibleMetrics(float emSize, float pixelsPerDip, [NativeTypeName("const DWRITE_MATRIX *")] DWRITE_MATRIX* transform, DWRITE_FONT_METRICS* fontFaceMetrics) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IDWriteFontFace*)Unsafe.AsPointer(ref this), emSize, pixelsPerDip, transform, fontFaceMetrics); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public HRESULT GetGdiCompatibleGlyphMetrics(float emSize, float pixelsPerDip, [NativeTypeName("const DWRITE_MATRIX *")] DWRITE_MATRIX* transform, BOOL useGdiNatural, [NativeTypeName("const UINT16 *")] ushort* glyphIndices, [NativeTypeName("UINT32")] uint glyphCount, DWRITE_GLYPH_METRICS* glyphMetrics, [Optional] BOOL isSideways) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IDWriteFontFace*)Unsafe.AsPointer(ref this), emSize, pixelsPerDip, transform, useGdiNatural, glyphIndices, glyphCount, glyphMetrics, isSideways); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - DWRITE_FONT_FACE_TYPE GetType(); - - [VtblIndex(4)] - HRESULT GetFiles([NativeTypeName("UINT32 *")] uint* numberOfFiles, IDWriteFontFile** fontFiles); - - [VtblIndex(5)] - [return: NativeTypeName("UINT32")] - uint GetIndex(); - - [VtblIndex(6)] - DWRITE_FONT_SIMULATIONS GetSimulations(); - - [VtblIndex(7)] - BOOL IsSymbolFont(); - - [VtblIndex(8)] - void GetMetrics(DWRITE_FONT_METRICS* fontFaceMetrics); - - [VtblIndex(9)] - [return: NativeTypeName("UINT16")] - ushort GetGlyphCount(); - - [VtblIndex(10)] - HRESULT GetDesignGlyphMetrics([NativeTypeName("const UINT16 *")] ushort* glyphIndices, [NativeTypeName("UINT32")] uint glyphCount, DWRITE_GLYPH_METRICS* glyphMetrics, [Optional] BOOL isSideways); - - [VtblIndex(11)] - HRESULT GetGlyphIndices([NativeTypeName("const UINT32 *")] uint* codePoints, [NativeTypeName("UINT32")] uint codePointCount, [NativeTypeName("UINT16 *")] ushort* glyphIndices); - - [VtblIndex(12)] - HRESULT TryGetFontTable([NativeTypeName("UINT32")] uint openTypeTableTag, [NativeTypeName("const void **")] void** tableData, [NativeTypeName("UINT32 *")] uint* tableSize, void** tableContext, BOOL* exists); - - [VtblIndex(13)] - void ReleaseFontTable(void* tableContext); - - [VtblIndex(14)] - HRESULT GetGlyphRunOutline(float emSize, [NativeTypeName("const UINT16 *")] ushort* glyphIndices, [NativeTypeName("const FLOAT *")] float* glyphAdvances, [NativeTypeName("const DWRITE_GLYPH_OFFSET *")] DWRITE_GLYPH_OFFSET* glyphOffsets, [NativeTypeName("UINT32")] uint glyphCount, BOOL isSideways, BOOL isRightToLeft, [NativeTypeName("IDWriteGeometrySink *")] ID2D1SimplifiedGeometrySink* geometrySink); - - [VtblIndex(15)] - HRESULT GetRecommendedRenderingMode(float emSize, float pixelsPerDip, DWRITE_MEASURING_MODE measuringMode, IDWriteRenderingParams* renderingParams, DWRITE_RENDERING_MODE* renderingMode); - - [VtblIndex(16)] - HRESULT GetGdiCompatibleMetrics(float emSize, float pixelsPerDip, [NativeTypeName("const DWRITE_MATRIX *")] DWRITE_MATRIX* transform, DWRITE_FONT_METRICS* fontFaceMetrics); - - [VtblIndex(17)] - HRESULT GetGdiCompatibleGlyphMetrics(float emSize, float pixelsPerDip, [NativeTypeName("const DWRITE_MATRIX *")] DWRITE_MATRIX* transform, BOOL useGdiNatural, [NativeTypeName("const UINT16 *")] ushort* glyphIndices, [NativeTypeName("UINT32")] uint glyphCount, DWRITE_GLYPH_METRICS* glyphMetrics, [Optional] BOOL isSideways); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("DWRITE_FONT_FACE_TYPE () __attribute__((nothrow)) __attribute__((stdcall))")] - public new delegate* unmanaged[Stdcall] GetType; - - [NativeTypeName("HRESULT (UINT32 *, IDWriteFontFile **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFiles; - - [NativeTypeName("UINT32 () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetIndex; - - [NativeTypeName("DWRITE_FONT_SIMULATIONS () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSimulations; - - [NativeTypeName("BOOL () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsSymbolFont; - - [NativeTypeName("void (DWRITE_FONT_METRICS *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMetrics; - - [NativeTypeName("UINT16 () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetGlyphCount; - - [NativeTypeName("HRESULT (const UINT16 *, UINT32, DWRITE_GLYPH_METRICS *, BOOL) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDesignGlyphMetrics; - - [NativeTypeName("HRESULT (const UINT32 *, UINT32, UINT16 *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetGlyphIndices; - - [NativeTypeName("HRESULT (UINT32, const void **, UINT32 *, void **, BOOL *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] TryGetFontTable; - - [NativeTypeName("void (void *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ReleaseFontTable; - - [NativeTypeName("HRESULT (FLOAT, const UINT16 *, const FLOAT *, const DWRITE_GLYPH_OFFSET *, UINT32, BOOL, BOOL, IDWriteGeometrySink *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetGlyphRunOutline; - - [NativeTypeName("HRESULT (FLOAT, FLOAT, DWRITE_MEASURING_MODE, IDWriteRenderingParams *, DWRITE_RENDERING_MODE *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetRecommendedRenderingMode; - - [NativeTypeName("HRESULT (FLOAT, FLOAT, const DWRITE_MATRIX *, DWRITE_FONT_METRICS *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetGdiCompatibleMetrics; - - [NativeTypeName("HRESULT (FLOAT, FLOAT, const DWRITE_MATRIX *, BOOL, const UINT16 *, UINT32, DWRITE_GLYPH_METRICS *, BOOL) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetGdiCompatibleGlyphMetrics; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFontFamily.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFontFamily.cs deleted file mode 100644 index aa1595ee..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFontFamily.cs +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("DA20D8EF-812A-4C43-9802-62EC4ABD7ADD")] - [NativeTypeName("struct IDWriteFontFamily : IDWriteFontList")] - [NativeInheritance("IDWriteFontList")] - internal unsafe partial struct IDWriteFontFamily : IDWriteFontFamily.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDWriteFontFamily*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDWriteFontFamily*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDWriteFontFamily*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetFontCollection(IDWriteFontCollection** fontCollection) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDWriteFontFamily*)Unsafe.AsPointer(ref this), fontCollection); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - [return: NativeTypeName("UINT32")] - public uint GetFontCount() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDWriteFontFamily*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetFont([NativeTypeName("UINT32")] uint index, IDWriteFont** font) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDWriteFontFamily*)Unsafe.AsPointer(ref this), index, font); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetFamilyNames(IDWriteLocalizedStrings** names) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDWriteFontFamily*)Unsafe.AsPointer(ref this), names); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT GetFirstMatchingFont(DWRITE_FONT_WEIGHT weight, DWRITE_FONT_STRETCH stretch, DWRITE_FONT_STYLE style, IDWriteFont** matchingFont) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDWriteFontFamily*)Unsafe.AsPointer(ref this), weight, stretch, style, matchingFont); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT GetMatchingFonts(DWRITE_FONT_WEIGHT weight, DWRITE_FONT_STRETCH stretch, DWRITE_FONT_STYLE style, IDWriteFontList** matchingFonts) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDWriteFontFamily*)Unsafe.AsPointer(ref this), weight, stretch, style, matchingFonts); - } - - public interface Interface : IDWriteFontList.Interface - { - [VtblIndex(6)] - HRESULT GetFamilyNames(IDWriteLocalizedStrings** names); - - [VtblIndex(7)] - HRESULT GetFirstMatchingFont(DWRITE_FONT_WEIGHT weight, DWRITE_FONT_STRETCH stretch, DWRITE_FONT_STYLE style, IDWriteFont** matchingFont); - - [VtblIndex(8)] - HRESULT GetMatchingFonts(DWRITE_FONT_WEIGHT weight, DWRITE_FONT_STRETCH stretch, DWRITE_FONT_STYLE style, IDWriteFontList** matchingFonts); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (IDWriteFontCollection **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontCollection; - - [NativeTypeName("UINT32 () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontCount; - - [NativeTypeName("HRESULT (UINT32, IDWriteFont **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFont; - - [NativeTypeName("HRESULT (IDWriteLocalizedStrings **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFamilyNames; - - [NativeTypeName("HRESULT (DWRITE_FONT_WEIGHT, DWRITE_FONT_STRETCH, DWRITE_FONT_STYLE, IDWriteFont **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFirstMatchingFont; - - [NativeTypeName("HRESULT (DWRITE_FONT_WEIGHT, DWRITE_FONT_STRETCH, DWRITE_FONT_STYLE, IDWriteFontList **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMatchingFonts; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFontFile.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFontFile.cs deleted file mode 100644 index 56686ac6..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFontFile.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("739D886A-CEF5-47DC-8769-1A8B41BEBBB0")] - [NativeTypeName("struct IDWriteFontFile : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IDWriteFontFile : IDWriteFontFile.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDWriteFontFile*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDWriteFontFile*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDWriteFontFile*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetReferenceKey([NativeTypeName("const void **")] void** fontFileReferenceKey, [NativeTypeName("UINT32 *")] uint* fontFileReferenceKeySize) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDWriteFontFile*)Unsafe.AsPointer(ref this), fontFileReferenceKey, fontFileReferenceKeySize); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetLoader(IDWriteFontFileLoader** fontFileLoader) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDWriteFontFile*)Unsafe.AsPointer(ref this), fontFileLoader); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT Analyze(BOOL* isSupportedFontType, DWRITE_FONT_FILE_TYPE* fontFileType, DWRITE_FONT_FACE_TYPE* fontFaceType, [NativeTypeName("UINT32 *")] uint* numberOfFaces) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDWriteFontFile*)Unsafe.AsPointer(ref this), isSupportedFontType, fontFileType, fontFaceType, numberOfFaces); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT GetReferenceKey([NativeTypeName("const void **")] void** fontFileReferenceKey, [NativeTypeName("UINT32 *")] uint* fontFileReferenceKeySize); - - [VtblIndex(4)] - HRESULT GetLoader(IDWriteFontFileLoader** fontFileLoader); - - [VtblIndex(5)] - HRESULT Analyze(BOOL* isSupportedFontType, DWRITE_FONT_FILE_TYPE* fontFileType, DWRITE_FONT_FACE_TYPE* fontFaceType, [NativeTypeName("UINT32 *")] uint* numberOfFaces); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const void **, UINT32 *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetReferenceKey; - - [NativeTypeName("HRESULT (IDWriteFontFileLoader **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetLoader; - - [NativeTypeName("HRESULT (BOOL *, DWRITE_FONT_FILE_TYPE *, DWRITE_FONT_FACE_TYPE *, UINT32 *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Analyze; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFontFileLoader.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFontFileLoader.cs deleted file mode 100644 index 215ff171..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFontFileLoader.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("727CAD4E-D6AF-4C9E-8A08-D695B11CAA49")] - [NativeTypeName("struct IDWriteFontFileLoader : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IDWriteFontFileLoader : IDWriteFontFileLoader.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDWriteFontFileLoader*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDWriteFontFileLoader*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDWriteFontFileLoader*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT CreateStreamFromKey([NativeTypeName("const void *")] void* fontFileReferenceKey, [NativeTypeName("UINT32")] uint fontFileReferenceKeySize, IDWriteFontFileStream** fontFileStream) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDWriteFontFileLoader*)Unsafe.AsPointer(ref this), fontFileReferenceKey, fontFileReferenceKeySize, fontFileStream); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT CreateStreamFromKey([NativeTypeName("const void *")] void* fontFileReferenceKey, [NativeTypeName("UINT32")] uint fontFileReferenceKeySize, IDWriteFontFileStream** fontFileStream); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const void *, UINT32, IDWriteFontFileStream **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateStreamFromKey; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFontFileStream.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFontFileStream.cs deleted file mode 100644 index ffe6845c..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFontFileStream.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("6D4865FE-0AB8-4D91-8F62-5DD6BE34A3E0")] - [NativeTypeName("struct IDWriteFontFileStream : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IDWriteFontFileStream : IDWriteFontFileStream.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDWriteFontFileStream*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDWriteFontFileStream*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDWriteFontFileStream*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT ReadFileFragment([NativeTypeName("const void **")] void** fragmentStart, [NativeTypeName("UINT64")] ulong fileOffset, [NativeTypeName("UINT64")] ulong fragmentSize, void** fragmentContext) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDWriteFontFileStream*)Unsafe.AsPointer(ref this), fragmentStart, fileOffset, fragmentSize, fragmentContext); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public void ReleaseFileFragment(void* fragmentContext) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDWriteFontFileStream*)Unsafe.AsPointer(ref this), fragmentContext); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetFileSize([NativeTypeName("UINT64 *")] ulong* fileSize) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDWriteFontFileStream*)Unsafe.AsPointer(ref this), fileSize); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetLastWriteTime([NativeTypeName("UINT64 *")] ulong* lastWriteTime) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDWriteFontFileStream*)Unsafe.AsPointer(ref this), lastWriteTime); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT ReadFileFragment([NativeTypeName("const void **")] void** fragmentStart, [NativeTypeName("UINT64")] ulong fileOffset, [NativeTypeName("UINT64")] ulong fragmentSize, void** fragmentContext); - - [VtblIndex(4)] - void ReleaseFileFragment(void* fragmentContext); - - [VtblIndex(5)] - HRESULT GetFileSize([NativeTypeName("UINT64 *")] ulong* fileSize); - - [VtblIndex(6)] - HRESULT GetLastWriteTime([NativeTypeName("UINT64 *")] ulong* lastWriteTime); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const void **, UINT64, UINT64, void **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ReadFileFragment; - - [NativeTypeName("void (void *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ReleaseFileFragment; - - [NativeTypeName("HRESULT (UINT64 *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFileSize; - - [NativeTypeName("HRESULT (UINT64 *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetLastWriteTime; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFontList.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFontList.cs deleted file mode 100644 index 7878e30b..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteFontList.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("1A0D8438-1D97-4EC1-AEF9-A2FB86ED6ACB")] - [NativeTypeName("struct IDWriteFontList : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IDWriteFontList : IDWriteFontList.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDWriteFontList*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDWriteFontList*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDWriteFontList*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetFontCollection(IDWriteFontCollection** fontCollection) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDWriteFontList*)Unsafe.AsPointer(ref this), fontCollection); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - [return: NativeTypeName("UINT32")] - public uint GetFontCount() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDWriteFontList*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetFont([NativeTypeName("UINT32")] uint index, IDWriteFont** font) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDWriteFontList*)Unsafe.AsPointer(ref this), index, font); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT GetFontCollection(IDWriteFontCollection** fontCollection); - - [VtblIndex(4)] - [return: NativeTypeName("UINT32")] - uint GetFontCount(); - - [VtblIndex(5)] - HRESULT GetFont([NativeTypeName("UINT32")] uint index, IDWriteFont** font); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (IDWriteFontCollection **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontCollection; - - [NativeTypeName("UINT32 () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontCount; - - [NativeTypeName("HRESULT (UINT32, IDWriteFont **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFont; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteInlineObject.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteInlineObject.cs deleted file mode 100644 index 01d29c81..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteInlineObject.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("8339FDE3-106F-47AB-8373-1C6295EB10B3")] - [NativeTypeName("struct IDWriteInlineObject : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IDWriteInlineObject : IDWriteInlineObject.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDWriteInlineObject*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDWriteInlineObject*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDWriteInlineObject*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT Draw(void* clientDrawingContext, IDWriteTextRenderer* renderer, float originX, float originY, BOOL isSideways, BOOL isRightToLeft, IUnknown* clientDrawingEffect) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDWriteInlineObject*)Unsafe.AsPointer(ref this), clientDrawingContext, renderer, originX, originY, isSideways, isRightToLeft, clientDrawingEffect); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetMetrics(DWRITE_INLINE_OBJECT_METRICS* metrics) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDWriteInlineObject*)Unsafe.AsPointer(ref this), metrics); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetOverhangMetrics(DWRITE_OVERHANG_METRICS* overhangs) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDWriteInlineObject*)Unsafe.AsPointer(ref this), overhangs); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetBreakConditions(DWRITE_BREAK_CONDITION* breakConditionBefore, DWRITE_BREAK_CONDITION* breakConditionAfter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDWriteInlineObject*)Unsafe.AsPointer(ref this), breakConditionBefore, breakConditionAfter); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT Draw(void* clientDrawingContext, IDWriteTextRenderer* renderer, float originX, float originY, BOOL isSideways, BOOL isRightToLeft, IUnknown* clientDrawingEffect); - - [VtblIndex(4)] - HRESULT GetMetrics(DWRITE_INLINE_OBJECT_METRICS* metrics); - - [VtblIndex(5)] - HRESULT GetOverhangMetrics(DWRITE_OVERHANG_METRICS* overhangs); - - [VtblIndex(6)] - HRESULT GetBreakConditions(DWRITE_BREAK_CONDITION* breakConditionBefore, DWRITE_BREAK_CONDITION* breakConditionAfter); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (void *, IDWriteTextRenderer *, FLOAT, FLOAT, BOOL, BOOL, IUnknown *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Draw; - - [NativeTypeName("HRESULT (DWRITE_INLINE_OBJECT_METRICS *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMetrics; - - [NativeTypeName("HRESULT (DWRITE_OVERHANG_METRICS *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetOverhangMetrics; - - [NativeTypeName("HRESULT (DWRITE_BREAK_CONDITION *, DWRITE_BREAK_CONDITION *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBreakConditions; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteLocalizedStrings.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteLocalizedStrings.cs deleted file mode 100644 index f446f4a8..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteLocalizedStrings.cs +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("08256209-099A-4B34-B86D-C22B110E7771")] - [NativeTypeName("struct IDWriteLocalizedStrings : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IDWriteLocalizedStrings : IDWriteLocalizedStrings.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDWriteLocalizedStrings*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDWriteLocalizedStrings*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDWriteLocalizedStrings*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - [return: NativeTypeName("UINT32")] - public uint GetCount() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDWriteLocalizedStrings*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT FindLocaleName([NativeTypeName("const WCHAR *")] ushort* localeName, [NativeTypeName("UINT32 *")] uint* index, BOOL* exists) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDWriteLocalizedStrings*)Unsafe.AsPointer(ref this), localeName, index, exists); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetLocaleNameLength([NativeTypeName("UINT32")] uint index, [NativeTypeName("UINT32 *")] uint* length) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDWriteLocalizedStrings*)Unsafe.AsPointer(ref this), index, length); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetLocaleName([NativeTypeName("UINT32")] uint index, [NativeTypeName("WCHAR *")] ushort* localeName, [NativeTypeName("UINT32")] uint size) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDWriteLocalizedStrings*)Unsafe.AsPointer(ref this), index, localeName, size); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT GetStringLength([NativeTypeName("UINT32")] uint index, [NativeTypeName("UINT32 *")] uint* length) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDWriteLocalizedStrings*)Unsafe.AsPointer(ref this), index, length); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT GetString([NativeTypeName("UINT32")] uint index, [NativeTypeName("WCHAR *")] ushort* stringBuffer, [NativeTypeName("UINT32")] uint size) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDWriteLocalizedStrings*)Unsafe.AsPointer(ref this), index, stringBuffer, size); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - [return: NativeTypeName("UINT32")] - uint GetCount(); - - [VtblIndex(4)] - HRESULT FindLocaleName([NativeTypeName("const WCHAR *")] ushort* localeName, [NativeTypeName("UINT32 *")] uint* index, BOOL* exists); - - [VtblIndex(5)] - HRESULT GetLocaleNameLength([NativeTypeName("UINT32")] uint index, [NativeTypeName("UINT32 *")] uint* length); - - [VtblIndex(6)] - HRESULT GetLocaleName([NativeTypeName("UINT32")] uint index, [NativeTypeName("WCHAR *")] ushort* localeName, [NativeTypeName("UINT32")] uint size); - - [VtblIndex(7)] - HRESULT GetStringLength([NativeTypeName("UINT32")] uint index, [NativeTypeName("UINT32 *")] uint* length); - - [VtblIndex(8)] - HRESULT GetString([NativeTypeName("UINT32")] uint index, [NativeTypeName("WCHAR *")] ushort* stringBuffer, [NativeTypeName("UINT32")] uint size); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("UINT32 () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetCount; - - [NativeTypeName("HRESULT (const WCHAR *, UINT32 *, BOOL *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FindLocaleName; - - [NativeTypeName("HRESULT (UINT32, UINT32 *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetLocaleNameLength; - - [NativeTypeName("HRESULT (UINT32, WCHAR *, UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetLocaleName; - - [NativeTypeName("HRESULT (UINT32, UINT32 *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetStringLength; - - [NativeTypeName("HRESULT (UINT32, WCHAR *, UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetString; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWritePixelSnapping.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWritePixelSnapping.cs deleted file mode 100644 index 6680d397..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWritePixelSnapping.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("EAF3A2DA-ECF4-4D24-B644-B34F6842024B")] - [NativeTypeName("struct IDWritePixelSnapping : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IDWritePixelSnapping : IDWritePixelSnapping.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDWritePixelSnapping*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDWritePixelSnapping*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDWritePixelSnapping*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT IsPixelSnappingDisabled(void* clientDrawingContext, BOOL* isDisabled) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDWritePixelSnapping*)Unsafe.AsPointer(ref this), clientDrawingContext, isDisabled); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetCurrentTransform(void* clientDrawingContext, DWRITE_MATRIX* transform) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDWritePixelSnapping*)Unsafe.AsPointer(ref this), clientDrawingContext, transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetPixelsPerDip(void* clientDrawingContext, float* pixelsPerDip) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDWritePixelSnapping*)Unsafe.AsPointer(ref this), clientDrawingContext, pixelsPerDip); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT IsPixelSnappingDisabled(void* clientDrawingContext, BOOL* isDisabled); - - [VtblIndex(4)] - HRESULT GetCurrentTransform(void* clientDrawingContext, DWRITE_MATRIX* transform); - - [VtblIndex(5)] - HRESULT GetPixelsPerDip(void* clientDrawingContext, float* pixelsPerDip); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (void *, BOOL *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsPixelSnappingDisabled; - - [NativeTypeName("HRESULT (void *, DWRITE_MATRIX *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetCurrentTransform; - - [NativeTypeName("HRESULT (void *, FLOAT *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelsPerDip; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteRenderingParams.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteRenderingParams.cs deleted file mode 100644 index 69fd7433..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteRenderingParams.cs +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("2F0DA53A-2ADD-47CD-82EE-D9EC34688E75")] - [NativeTypeName("struct IDWriteRenderingParams : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IDWriteRenderingParams : IDWriteRenderingParams.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDWriteRenderingParams*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDWriteRenderingParams*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDWriteRenderingParams*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public float GetGamma() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDWriteRenderingParams*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public float GetEnhancedContrast() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDWriteRenderingParams*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public float GetClearTypeLevel() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDWriteRenderingParams*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public DWRITE_PIXEL_GEOMETRY GetPixelGeometry() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDWriteRenderingParams*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public DWRITE_RENDERING_MODE GetRenderingMode() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDWriteRenderingParams*)Unsafe.AsPointer(ref this)); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - float GetGamma(); - - [VtblIndex(4)] - float GetEnhancedContrast(); - - [VtblIndex(5)] - float GetClearTypeLevel(); - - [VtblIndex(6)] - DWRITE_PIXEL_GEOMETRY GetPixelGeometry(); - - [VtblIndex(7)] - DWRITE_RENDERING_MODE GetRenderingMode(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("FLOAT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetGamma; - - [NativeTypeName("FLOAT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetEnhancedContrast; - - [NativeTypeName("FLOAT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetClearTypeLevel; - - [NativeTypeName("DWRITE_PIXEL_GEOMETRY () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelGeometry; - - [NativeTypeName("DWRITE_RENDERING_MODE () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetRenderingMode; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteTextFormat.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteTextFormat.cs deleted file mode 100644 index 2e00d59e..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteTextFormat.cs +++ /dev/null @@ -1,387 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("9C906818-31D7-4FD3-A151-7C5E225DB55A")] - [NativeTypeName("struct IDWriteTextFormat : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IDWriteTextFormat : IDWriteTextFormat.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT SetTextAlignment(DWRITE_TEXT_ALIGNMENT textAlignment) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this), textAlignment); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT SetParagraphAlignment(DWRITE_PARAGRAPH_ALIGNMENT paragraphAlignment) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this), paragraphAlignment); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT SetWordWrapping(DWRITE_WORD_WRAPPING wordWrapping) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this), wordWrapping); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT SetReadingDirection(DWRITE_READING_DIRECTION readingDirection) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this), readingDirection); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT SetFlowDirection(DWRITE_FLOW_DIRECTION flowDirection) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this), flowDirection); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT SetIncrementalTabStop(float incrementalTabStop) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this), incrementalTabStop); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT SetTrimming([NativeTypeName("const DWRITE_TRIMMING *")] DWRITE_TRIMMING* trimmingOptions, IDWriteInlineObject* trimmingSign) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this), trimmingOptions, trimmingSign); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT SetLineSpacing(DWRITE_LINE_SPACING_METHOD lineSpacingMethod, float lineSpacing, float baseline) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this), lineSpacingMethod, lineSpacing, baseline); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public DWRITE_TEXT_ALIGNMENT GetTextAlignment() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public DWRITE_PARAGRAPH_ALIGNMENT GetParagraphAlignment() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public DWRITE_WORD_WRAPPING GetWordWrapping() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public DWRITE_READING_DIRECTION GetReadingDirection() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public DWRITE_FLOW_DIRECTION GetFlowDirection() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public float GetIncrementalTabStop() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public HRESULT GetTrimming(DWRITE_TRIMMING* trimmingOptions, IDWriteInlineObject** trimmingSign) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this), trimmingOptions, trimmingSign); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public HRESULT GetLineSpacing(DWRITE_LINE_SPACING_METHOD* lineSpacingMethod, float* lineSpacing, float* baseline) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this), lineSpacingMethod, lineSpacing, baseline); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(19)] - public HRESULT GetFontCollection(IDWriteFontCollection** fontCollection) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this), fontCollection); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(20)] - [return: NativeTypeName("UINT32")] - public uint GetFontFamilyNameLength() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(21)] - public HRESULT GetFontFamilyName([NativeTypeName("WCHAR *")] ushort* fontFamilyName, [NativeTypeName("UINT32")] uint nameSize) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this), fontFamilyName, nameSize); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(22)] - public DWRITE_FONT_WEIGHT GetFontWeight() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(23)] - public DWRITE_FONT_STYLE GetFontStyle() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[23]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(24)] - public DWRITE_FONT_STRETCH GetFontStretch() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[24]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(25)] - public float GetFontSize() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[25]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(26)] - [return: NativeTypeName("UINT32")] - public uint GetLocaleNameLength() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[26]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(27)] - public HRESULT GetLocaleName([NativeTypeName("WCHAR *")] ushort* localeName, [NativeTypeName("UINT32")] uint nameSize) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[27]))((IDWriteTextFormat*)Unsafe.AsPointer(ref this), localeName, nameSize); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT SetTextAlignment(DWRITE_TEXT_ALIGNMENT textAlignment); - - [VtblIndex(4)] - HRESULT SetParagraphAlignment(DWRITE_PARAGRAPH_ALIGNMENT paragraphAlignment); - - [VtblIndex(5)] - HRESULT SetWordWrapping(DWRITE_WORD_WRAPPING wordWrapping); - - [VtblIndex(6)] - HRESULT SetReadingDirection(DWRITE_READING_DIRECTION readingDirection); - - [VtblIndex(7)] - HRESULT SetFlowDirection(DWRITE_FLOW_DIRECTION flowDirection); - - [VtblIndex(8)] - HRESULT SetIncrementalTabStop(float incrementalTabStop); - - [VtblIndex(9)] - HRESULT SetTrimming([NativeTypeName("const DWRITE_TRIMMING *")] DWRITE_TRIMMING* trimmingOptions, IDWriteInlineObject* trimmingSign); - - [VtblIndex(10)] - HRESULT SetLineSpacing(DWRITE_LINE_SPACING_METHOD lineSpacingMethod, float lineSpacing, float baseline); - - [VtblIndex(11)] - DWRITE_TEXT_ALIGNMENT GetTextAlignment(); - - [VtblIndex(12)] - DWRITE_PARAGRAPH_ALIGNMENT GetParagraphAlignment(); - - [VtblIndex(13)] - DWRITE_WORD_WRAPPING GetWordWrapping(); - - [VtblIndex(14)] - DWRITE_READING_DIRECTION GetReadingDirection(); - - [VtblIndex(15)] - DWRITE_FLOW_DIRECTION GetFlowDirection(); - - [VtblIndex(16)] - float GetIncrementalTabStop(); - - [VtblIndex(17)] - HRESULT GetTrimming(DWRITE_TRIMMING* trimmingOptions, IDWriteInlineObject** trimmingSign); - - [VtblIndex(18)] - HRESULT GetLineSpacing(DWRITE_LINE_SPACING_METHOD* lineSpacingMethod, float* lineSpacing, float* baseline); - - [VtblIndex(19)] - HRESULT GetFontCollection(IDWriteFontCollection** fontCollection); - - [VtblIndex(20)] - [return: NativeTypeName("UINT32")] - uint GetFontFamilyNameLength(); - - [VtblIndex(21)] - HRESULT GetFontFamilyName([NativeTypeName("WCHAR *")] ushort* fontFamilyName, [NativeTypeName("UINT32")] uint nameSize); - - [VtblIndex(22)] - DWRITE_FONT_WEIGHT GetFontWeight(); - - [VtblIndex(23)] - DWRITE_FONT_STYLE GetFontStyle(); - - [VtblIndex(24)] - DWRITE_FONT_STRETCH GetFontStretch(); - - [VtblIndex(25)] - float GetFontSize(); - - [VtblIndex(26)] - [return: NativeTypeName("UINT32")] - uint GetLocaleNameLength(); - - [VtblIndex(27)] - HRESULT GetLocaleName([NativeTypeName("WCHAR *")] ushort* localeName, [NativeTypeName("UINT32")] uint nameSize); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (DWRITE_TEXT_ALIGNMENT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTextAlignment; - - [NativeTypeName("HRESULT (DWRITE_PARAGRAPH_ALIGNMENT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetParagraphAlignment; - - [NativeTypeName("HRESULT (DWRITE_WORD_WRAPPING) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetWordWrapping; - - [NativeTypeName("HRESULT (DWRITE_READING_DIRECTION) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetReadingDirection; - - [NativeTypeName("HRESULT (DWRITE_FLOW_DIRECTION) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetFlowDirection; - - [NativeTypeName("HRESULT (FLOAT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetIncrementalTabStop; - - [NativeTypeName("HRESULT (const DWRITE_TRIMMING *, IDWriteInlineObject *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTrimming; - - [NativeTypeName("HRESULT (DWRITE_LINE_SPACING_METHOD, FLOAT, FLOAT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetLineSpacing; - - [NativeTypeName("DWRITE_TEXT_ALIGNMENT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTextAlignment; - - [NativeTypeName("DWRITE_PARAGRAPH_ALIGNMENT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetParagraphAlignment; - - [NativeTypeName("DWRITE_WORD_WRAPPING () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetWordWrapping; - - [NativeTypeName("DWRITE_READING_DIRECTION () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetReadingDirection; - - [NativeTypeName("DWRITE_FLOW_DIRECTION () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFlowDirection; - - [NativeTypeName("FLOAT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetIncrementalTabStop; - - [NativeTypeName("HRESULT (DWRITE_TRIMMING *, IDWriteInlineObject **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTrimming; - - [NativeTypeName("HRESULT (DWRITE_LINE_SPACING_METHOD *, FLOAT *, FLOAT *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetLineSpacing; - - [NativeTypeName("HRESULT (IDWriteFontCollection **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontCollection; - - [NativeTypeName("UINT32 () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontFamilyNameLength; - - [NativeTypeName("HRESULT (WCHAR *, UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontFamilyName; - - [NativeTypeName("DWRITE_FONT_WEIGHT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontWeight; - - [NativeTypeName("DWRITE_FONT_STYLE () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontStyle; - - [NativeTypeName("DWRITE_FONT_STRETCH () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontStretch; - - [NativeTypeName("FLOAT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontSize; - - [NativeTypeName("UINT32 () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetLocaleNameLength; - - [NativeTypeName("HRESULT (WCHAR *, UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetLocaleName; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteTextLayout.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteTextLayout.cs deleted file mode 100644 index a372a9d5..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteTextLayout.cs +++ /dev/null @@ -1,817 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("53737037-6D14-410B-9BFE-0B182BB70961")] - [NativeTypeName("struct IDWriteTextLayout : IDWriteTextFormat")] - [NativeInheritance("IDWriteTextFormat")] - internal unsafe partial struct IDWriteTextLayout : IDWriteTextLayout.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT SetTextAlignment(DWRITE_TEXT_ALIGNMENT textAlignment) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), textAlignment); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT SetParagraphAlignment(DWRITE_PARAGRAPH_ALIGNMENT paragraphAlignment) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), paragraphAlignment); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT SetWordWrapping(DWRITE_WORD_WRAPPING wordWrapping) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), wordWrapping); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT SetReadingDirection(DWRITE_READING_DIRECTION readingDirection) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), readingDirection); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT SetFlowDirection(DWRITE_FLOW_DIRECTION flowDirection) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), flowDirection); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT SetIncrementalTabStop(float incrementalTabStop) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), incrementalTabStop); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT SetTrimming([NativeTypeName("const DWRITE_TRIMMING *")] DWRITE_TRIMMING* trimmingOptions, IDWriteInlineObject* trimmingSign) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), trimmingOptions, trimmingSign); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT SetLineSpacing(DWRITE_LINE_SPACING_METHOD lineSpacingMethod, float lineSpacing, float baseline) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), lineSpacingMethod, lineSpacing, baseline); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public DWRITE_TEXT_ALIGNMENT GetTextAlignment() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public DWRITE_PARAGRAPH_ALIGNMENT GetParagraphAlignment() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public DWRITE_WORD_WRAPPING GetWordWrapping() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public DWRITE_READING_DIRECTION GetReadingDirection() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public DWRITE_FLOW_DIRECTION GetFlowDirection() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public float GetIncrementalTabStop() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public HRESULT GetTrimming(DWRITE_TRIMMING* trimmingOptions, IDWriteInlineObject** trimmingSign) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), trimmingOptions, trimmingSign); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public HRESULT GetLineSpacing(DWRITE_LINE_SPACING_METHOD* lineSpacingMethod, float* lineSpacing, float* baseline) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), lineSpacingMethod, lineSpacing, baseline); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(19)] - public HRESULT GetFontCollection(IDWriteFontCollection** fontCollection) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), fontCollection); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(20)] - [return: NativeTypeName("UINT32")] - public uint GetFontFamilyNameLength() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(21)] - public HRESULT GetFontFamilyName([NativeTypeName("WCHAR *")] ushort* fontFamilyName, [NativeTypeName("UINT32")] uint nameSize) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), fontFamilyName, nameSize); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(22)] - public DWRITE_FONT_WEIGHT GetFontWeight() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(23)] - public DWRITE_FONT_STYLE GetFontStyle() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[23]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(24)] - public DWRITE_FONT_STRETCH GetFontStretch() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[24]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(25)] - public float GetFontSize() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[25]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(26)] - [return: NativeTypeName("UINT32")] - public uint GetLocaleNameLength() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[26]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(27)] - public HRESULT GetLocaleName([NativeTypeName("WCHAR *")] ushort* localeName, [NativeTypeName("UINT32")] uint nameSize) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[27]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), localeName, nameSize); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(28)] - public HRESULT SetMaxWidth(float maxWidth) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), maxWidth); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(29)] - public HRESULT SetMaxHeight(float maxHeight) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), maxHeight); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(30)] - public HRESULT SetFontCollection(IDWriteFontCollection* fontCollection, DWRITE_TEXT_RANGE textRange) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[30]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), fontCollection, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(31)] - public HRESULT SetFontFamilyName([NativeTypeName("const WCHAR *")] ushort* fontFamilyName, DWRITE_TEXT_RANGE textRange) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[31]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), fontFamilyName, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(32)] - public HRESULT SetFontWeight(DWRITE_FONT_WEIGHT fontWeight, DWRITE_TEXT_RANGE textRange) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[32]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), fontWeight, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(33)] - public HRESULT SetFontStyle(DWRITE_FONT_STYLE fontStyle, DWRITE_TEXT_RANGE textRange) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[33]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), fontStyle, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(34)] - public HRESULT SetFontStretch(DWRITE_FONT_STRETCH fontStretch, DWRITE_TEXT_RANGE textRange) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[34]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), fontStretch, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(35)] - public HRESULT SetFontSize(float fontSize, DWRITE_TEXT_RANGE textRange) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[35]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), fontSize, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(36)] - public HRESULT SetUnderline(BOOL hasUnderline, DWRITE_TEXT_RANGE textRange) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[36]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), hasUnderline, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(37)] - public HRESULT SetStrikethrough(BOOL hasStrikethrough, DWRITE_TEXT_RANGE textRange) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[37]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), hasStrikethrough, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(38)] - public HRESULT SetDrawingEffect(IUnknown* drawingEffect, DWRITE_TEXT_RANGE textRange) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[38]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), drawingEffect, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(39)] - public HRESULT SetInlineObject(IDWriteInlineObject* inlineObject, DWRITE_TEXT_RANGE textRange) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[39]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), inlineObject, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(40)] - public HRESULT SetTypography(IDWriteTypography* typography, DWRITE_TEXT_RANGE textRange) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[40]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), typography, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(41)] - public HRESULT SetLocaleName([NativeTypeName("const WCHAR *")] ushort* localeName, DWRITE_TEXT_RANGE textRange) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[41]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), localeName, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(42)] - public float GetMaxWidth() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[42]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(43)] - public float GetMaxHeight() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[43]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(44)] - public HRESULT GetFontCollection([NativeTypeName("UINT32")] uint currentPosition, IDWriteFontCollection** fontCollection, DWRITE_TEXT_RANGE* textRange = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[44]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), currentPosition, fontCollection, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(45)] - public HRESULT GetFontFamilyNameLength([NativeTypeName("UINT32")] uint currentPosition, [NativeTypeName("UINT32 *")] uint* nameLength, DWRITE_TEXT_RANGE* textRange = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[45]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), currentPosition, nameLength, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(46)] - public HRESULT GetFontFamilyName([NativeTypeName("UINT32")] uint currentPosition, [NativeTypeName("WCHAR *")] ushort* fontFamilyName, [NativeTypeName("UINT32")] uint nameSize, DWRITE_TEXT_RANGE* textRange = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[46]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), currentPosition, fontFamilyName, nameSize, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(47)] - public HRESULT GetFontWeight([NativeTypeName("UINT32")] uint currentPosition, DWRITE_FONT_WEIGHT* fontWeight, DWRITE_TEXT_RANGE* textRange = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[47]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), currentPosition, fontWeight, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(48)] - public HRESULT GetFontStyle([NativeTypeName("UINT32")] uint currentPosition, DWRITE_FONT_STYLE* fontStyle, DWRITE_TEXT_RANGE* textRange = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[48]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), currentPosition, fontStyle, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(49)] - public HRESULT GetFontStretch([NativeTypeName("UINT32")] uint currentPosition, DWRITE_FONT_STRETCH* fontStretch, DWRITE_TEXT_RANGE* textRange = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[49]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), currentPosition, fontStretch, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(50)] - public HRESULT GetFontSize([NativeTypeName("UINT32")] uint currentPosition, float* fontSize, DWRITE_TEXT_RANGE* textRange = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[50]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), currentPosition, fontSize, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(51)] - public HRESULT GetUnderline([NativeTypeName("UINT32")] uint currentPosition, BOOL* hasUnderline, DWRITE_TEXT_RANGE* textRange = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[51]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), currentPosition, hasUnderline, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(52)] - public HRESULT GetStrikethrough([NativeTypeName("UINT32")] uint currentPosition, BOOL* hasStrikethrough, DWRITE_TEXT_RANGE* textRange = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[52]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), currentPosition, hasStrikethrough, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(53)] - public HRESULT GetDrawingEffect([NativeTypeName("UINT32")] uint currentPosition, IUnknown** drawingEffect, DWRITE_TEXT_RANGE* textRange = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[53]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), currentPosition, drawingEffect, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(54)] - public HRESULT GetInlineObject([NativeTypeName("UINT32")] uint currentPosition, IDWriteInlineObject** inlineObject, DWRITE_TEXT_RANGE* textRange = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[54]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), currentPosition, inlineObject, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(55)] - public HRESULT GetTypography([NativeTypeName("UINT32")] uint currentPosition, IDWriteTypography** typography, DWRITE_TEXT_RANGE* textRange = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[55]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), currentPosition, typography, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(56)] - public HRESULT GetLocaleNameLength([NativeTypeName("UINT32")] uint currentPosition, [NativeTypeName("UINT32 *")] uint* nameLength, DWRITE_TEXT_RANGE* textRange = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[56]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), currentPosition, nameLength, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(57)] - public HRESULT GetLocaleName([NativeTypeName("UINT32")] uint currentPosition, [NativeTypeName("WCHAR *")] ushort* localeName, [NativeTypeName("UINT32")] uint nameSize, DWRITE_TEXT_RANGE* textRange = null) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[57]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), currentPosition, localeName, nameSize, textRange); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(58)] - public HRESULT Draw(void* clientDrawingContext, IDWriteTextRenderer* renderer, float originX, float originY) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[58]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), clientDrawingContext, renderer, originX, originY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(59)] - public HRESULT GetLineMetrics(DWRITE_LINE_METRICS* lineMetrics, [NativeTypeName("UINT32")] uint maxLineCount, [NativeTypeName("UINT32 *")] uint* actualLineCount) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[59]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), lineMetrics, maxLineCount, actualLineCount); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(60)] - public HRESULT GetMetrics(DWRITE_TEXT_METRICS* textMetrics) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[60]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), textMetrics); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(61)] - public HRESULT GetOverhangMetrics(DWRITE_OVERHANG_METRICS* overhangs) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[61]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), overhangs); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(62)] - public HRESULT GetClusterMetrics(DWRITE_CLUSTER_METRICS* clusterMetrics, [NativeTypeName("UINT32")] uint maxClusterCount, [NativeTypeName("UINT32 *")] uint* actualClusterCount) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[62]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), clusterMetrics, maxClusterCount, actualClusterCount); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(63)] - public HRESULT DetermineMinWidth(float* minWidth) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[63]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), minWidth); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(64)] - public HRESULT HitTestPoint(float pointX, float pointY, BOOL* isTrailingHit, BOOL* isInside, DWRITE_HIT_TEST_METRICS* hitTestMetrics) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[64]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), pointX, pointY, isTrailingHit, isInside, hitTestMetrics); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(65)] - public HRESULT HitTestTextPosition([NativeTypeName("UINT32")] uint textPosition, BOOL isTrailingHit, float* pointX, float* pointY, DWRITE_HIT_TEST_METRICS* hitTestMetrics) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[65]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), textPosition, isTrailingHit, pointX, pointY, hitTestMetrics); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(66)] - public HRESULT HitTestTextRange([NativeTypeName("UINT32")] uint textPosition, [NativeTypeName("UINT32")] uint textLength, float originX, float originY, DWRITE_HIT_TEST_METRICS* hitTestMetrics, [NativeTypeName("UINT32")] uint maxHitTestMetricsCount, [NativeTypeName("UINT32 *")] uint* actualHitTestMetricsCount) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[66]))((IDWriteTextLayout*)Unsafe.AsPointer(ref this), textPosition, textLength, originX, originY, hitTestMetrics, maxHitTestMetricsCount, actualHitTestMetricsCount); - } - - public interface Interface : IDWriteTextFormat.Interface - { - [VtblIndex(28)] - HRESULT SetMaxWidth(float maxWidth); - - [VtblIndex(29)] - HRESULT SetMaxHeight(float maxHeight); - - [VtblIndex(30)] - HRESULT SetFontCollection(IDWriteFontCollection* fontCollection, DWRITE_TEXT_RANGE textRange); - - [VtblIndex(31)] - HRESULT SetFontFamilyName([NativeTypeName("const WCHAR *")] ushort* fontFamilyName, DWRITE_TEXT_RANGE textRange); - - [VtblIndex(32)] - HRESULT SetFontWeight(DWRITE_FONT_WEIGHT fontWeight, DWRITE_TEXT_RANGE textRange); - - [VtblIndex(33)] - HRESULT SetFontStyle(DWRITE_FONT_STYLE fontStyle, DWRITE_TEXT_RANGE textRange); - - [VtblIndex(34)] - HRESULT SetFontStretch(DWRITE_FONT_STRETCH fontStretch, DWRITE_TEXT_RANGE textRange); - - [VtblIndex(35)] - HRESULT SetFontSize(float fontSize, DWRITE_TEXT_RANGE textRange); - - [VtblIndex(36)] - HRESULT SetUnderline(BOOL hasUnderline, DWRITE_TEXT_RANGE textRange); - - [VtblIndex(37)] - HRESULT SetStrikethrough(BOOL hasStrikethrough, DWRITE_TEXT_RANGE textRange); - - [VtblIndex(38)] - HRESULT SetDrawingEffect(IUnknown* drawingEffect, DWRITE_TEXT_RANGE textRange); - - [VtblIndex(39)] - HRESULT SetInlineObject(IDWriteInlineObject* inlineObject, DWRITE_TEXT_RANGE textRange); - - [VtblIndex(40)] - HRESULT SetTypography(IDWriteTypography* typography, DWRITE_TEXT_RANGE textRange); - - [VtblIndex(41)] - HRESULT SetLocaleName([NativeTypeName("const WCHAR *")] ushort* localeName, DWRITE_TEXT_RANGE textRange); - - [VtblIndex(42)] - float GetMaxWidth(); - - [VtblIndex(43)] - float GetMaxHeight(); - - [VtblIndex(44)] - HRESULT GetFontCollection([NativeTypeName("UINT32")] uint currentPosition, IDWriteFontCollection** fontCollection, DWRITE_TEXT_RANGE* textRange = null); - - [VtblIndex(45)] - HRESULT GetFontFamilyNameLength([NativeTypeName("UINT32")] uint currentPosition, [NativeTypeName("UINT32 *")] uint* nameLength, DWRITE_TEXT_RANGE* textRange = null); - - [VtblIndex(46)] - HRESULT GetFontFamilyName([NativeTypeName("UINT32")] uint currentPosition, [NativeTypeName("WCHAR *")] ushort* fontFamilyName, [NativeTypeName("UINT32")] uint nameSize, DWRITE_TEXT_RANGE* textRange = null); - - [VtblIndex(47)] - HRESULT GetFontWeight([NativeTypeName("UINT32")] uint currentPosition, DWRITE_FONT_WEIGHT* fontWeight, DWRITE_TEXT_RANGE* textRange = null); - - [VtblIndex(48)] - HRESULT GetFontStyle([NativeTypeName("UINT32")] uint currentPosition, DWRITE_FONT_STYLE* fontStyle, DWRITE_TEXT_RANGE* textRange = null); - - [VtblIndex(49)] - HRESULT GetFontStretch([NativeTypeName("UINT32")] uint currentPosition, DWRITE_FONT_STRETCH* fontStretch, DWRITE_TEXT_RANGE* textRange = null); - - [VtblIndex(50)] - HRESULT GetFontSize([NativeTypeName("UINT32")] uint currentPosition, float* fontSize, DWRITE_TEXT_RANGE* textRange = null); - - [VtblIndex(51)] - HRESULT GetUnderline([NativeTypeName("UINT32")] uint currentPosition, BOOL* hasUnderline, DWRITE_TEXT_RANGE* textRange = null); - - [VtblIndex(52)] - HRESULT GetStrikethrough([NativeTypeName("UINT32")] uint currentPosition, BOOL* hasStrikethrough, DWRITE_TEXT_RANGE* textRange = null); - - [VtblIndex(53)] - HRESULT GetDrawingEffect([NativeTypeName("UINT32")] uint currentPosition, IUnknown** drawingEffect, DWRITE_TEXT_RANGE* textRange = null); - - [VtblIndex(54)] - HRESULT GetInlineObject([NativeTypeName("UINT32")] uint currentPosition, IDWriteInlineObject** inlineObject, DWRITE_TEXT_RANGE* textRange = null); - - [VtblIndex(55)] - HRESULT GetTypography([NativeTypeName("UINT32")] uint currentPosition, IDWriteTypography** typography, DWRITE_TEXT_RANGE* textRange = null); - - [VtblIndex(56)] - HRESULT GetLocaleNameLength([NativeTypeName("UINT32")] uint currentPosition, [NativeTypeName("UINT32 *")] uint* nameLength, DWRITE_TEXT_RANGE* textRange = null); - - [VtblIndex(57)] - HRESULT GetLocaleName([NativeTypeName("UINT32")] uint currentPosition, [NativeTypeName("WCHAR *")] ushort* localeName, [NativeTypeName("UINT32")] uint nameSize, DWRITE_TEXT_RANGE* textRange = null); - - [VtblIndex(58)] - HRESULT Draw(void* clientDrawingContext, IDWriteTextRenderer* renderer, float originX, float originY); - - [VtblIndex(59)] - HRESULT GetLineMetrics(DWRITE_LINE_METRICS* lineMetrics, [NativeTypeName("UINT32")] uint maxLineCount, [NativeTypeName("UINT32 *")] uint* actualLineCount); - - [VtblIndex(60)] - HRESULT GetMetrics(DWRITE_TEXT_METRICS* textMetrics); - - [VtblIndex(61)] - HRESULT GetOverhangMetrics(DWRITE_OVERHANG_METRICS* overhangs); - - [VtblIndex(62)] - HRESULT GetClusterMetrics(DWRITE_CLUSTER_METRICS* clusterMetrics, [NativeTypeName("UINT32")] uint maxClusterCount, [NativeTypeName("UINT32 *")] uint* actualClusterCount); - - [VtblIndex(63)] - HRESULT DetermineMinWidth(float* minWidth); - - [VtblIndex(64)] - HRESULT HitTestPoint(float pointX, float pointY, BOOL* isTrailingHit, BOOL* isInside, DWRITE_HIT_TEST_METRICS* hitTestMetrics); - - [VtblIndex(65)] - HRESULT HitTestTextPosition([NativeTypeName("UINT32")] uint textPosition, BOOL isTrailingHit, float* pointX, float* pointY, DWRITE_HIT_TEST_METRICS* hitTestMetrics); - - [VtblIndex(66)] - HRESULT HitTestTextRange([NativeTypeName("UINT32")] uint textPosition, [NativeTypeName("UINT32")] uint textLength, float originX, float originY, DWRITE_HIT_TEST_METRICS* hitTestMetrics, [NativeTypeName("UINT32")] uint maxHitTestMetricsCount, [NativeTypeName("UINT32 *")] uint* actualHitTestMetricsCount); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (DWRITE_TEXT_ALIGNMENT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTextAlignment; - - [NativeTypeName("HRESULT (DWRITE_PARAGRAPH_ALIGNMENT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetParagraphAlignment; - - [NativeTypeName("HRESULT (DWRITE_WORD_WRAPPING) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetWordWrapping; - - [NativeTypeName("HRESULT (DWRITE_READING_DIRECTION) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetReadingDirection; - - [NativeTypeName("HRESULT (DWRITE_FLOW_DIRECTION) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetFlowDirection; - - [NativeTypeName("HRESULT (FLOAT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetIncrementalTabStop; - - [NativeTypeName("HRESULT (const DWRITE_TRIMMING *, IDWriteInlineObject *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTrimming; - - [NativeTypeName("HRESULT (DWRITE_LINE_SPACING_METHOD, FLOAT, FLOAT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetLineSpacing; - - [NativeTypeName("DWRITE_TEXT_ALIGNMENT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTextAlignment; - - [NativeTypeName("DWRITE_PARAGRAPH_ALIGNMENT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetParagraphAlignment; - - [NativeTypeName("DWRITE_WORD_WRAPPING () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetWordWrapping; - - [NativeTypeName("DWRITE_READING_DIRECTION () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetReadingDirection; - - [NativeTypeName("DWRITE_FLOW_DIRECTION () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFlowDirection; - - [NativeTypeName("FLOAT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetIncrementalTabStop; - - [NativeTypeName("HRESULT (DWRITE_TRIMMING *, IDWriteInlineObject **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTrimming; - - [NativeTypeName("HRESULT (DWRITE_LINE_SPACING_METHOD *, FLOAT *, FLOAT *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetLineSpacing; - - [NativeTypeName("HRESULT (IDWriteFontCollection **) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontCollection; - - [NativeTypeName("UINT32 () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontFamilyNameLength; - - [NativeTypeName("HRESULT (WCHAR *, UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontFamilyName; - - [NativeTypeName("DWRITE_FONT_WEIGHT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontWeight; - - [NativeTypeName("DWRITE_FONT_STYLE () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontStyle; - - [NativeTypeName("DWRITE_FONT_STRETCH () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontStretch; - - [NativeTypeName("FLOAT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontSize; - - [NativeTypeName("UINT32 () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetLocaleNameLength; - - [NativeTypeName("HRESULT (WCHAR *, UINT32) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetLocaleName; - - [NativeTypeName("HRESULT (FLOAT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetMaxWidth; - - [NativeTypeName("HRESULT (FLOAT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetMaxHeight; - - [NativeTypeName("HRESULT (IDWriteFontCollection *, DWRITE_TEXT_RANGE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetFontCollection; - - [NativeTypeName("HRESULT (const WCHAR *, DWRITE_TEXT_RANGE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetFontFamilyName; - - [NativeTypeName("HRESULT (DWRITE_FONT_WEIGHT, DWRITE_TEXT_RANGE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetFontWeight; - - [NativeTypeName("HRESULT (DWRITE_FONT_STYLE, DWRITE_TEXT_RANGE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetFontStyle; - - [NativeTypeName("HRESULT (DWRITE_FONT_STRETCH, DWRITE_TEXT_RANGE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetFontStretch; - - [NativeTypeName("HRESULT (FLOAT, DWRITE_TEXT_RANGE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetFontSize; - - [NativeTypeName("HRESULT (BOOL, DWRITE_TEXT_RANGE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetUnderline; - - [NativeTypeName("HRESULT (BOOL, DWRITE_TEXT_RANGE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetStrikethrough; - - [NativeTypeName("HRESULT (IUnknown *, DWRITE_TEXT_RANGE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetDrawingEffect; - - [NativeTypeName("HRESULT (IDWriteInlineObject *, DWRITE_TEXT_RANGE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetInlineObject; - - [NativeTypeName("HRESULT (IDWriteTypography *, DWRITE_TEXT_RANGE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetTypography; - - [NativeTypeName("HRESULT (const WCHAR *, DWRITE_TEXT_RANGE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetLocaleName; - - [NativeTypeName("FLOAT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMaxWidth; - - [NativeTypeName("FLOAT () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMaxHeight; - - [NativeTypeName("HRESULT (UINT32, IDWriteFontCollection **, DWRITE_TEXT_RANGE *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontCollection1; - - [NativeTypeName("HRESULT (UINT32, UINT32 *, DWRITE_TEXT_RANGE *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontFamilyNameLength1; - - [NativeTypeName("HRESULT (UINT32, WCHAR *, UINT32, DWRITE_TEXT_RANGE *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontFamilyName1; - - [NativeTypeName("HRESULT (UINT32, DWRITE_FONT_WEIGHT *, DWRITE_TEXT_RANGE *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontWeight1; - - [NativeTypeName("HRESULT (UINT32, DWRITE_FONT_STYLE *, DWRITE_TEXT_RANGE *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontStyle1; - - [NativeTypeName("HRESULT (UINT32, DWRITE_FONT_STRETCH *, DWRITE_TEXT_RANGE *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontStretch1; - - [NativeTypeName("HRESULT (UINT32, FLOAT *, DWRITE_TEXT_RANGE *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontSize1; - - [NativeTypeName("HRESULT (UINT32, BOOL *, DWRITE_TEXT_RANGE *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetUnderline; - - [NativeTypeName("HRESULT (UINT32, BOOL *, DWRITE_TEXT_RANGE *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetStrikethrough; - - [NativeTypeName("HRESULT (UINT32, IUnknown **, DWRITE_TEXT_RANGE *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDrawingEffect; - - [NativeTypeName("HRESULT (UINT32, IDWriteInlineObject **, DWRITE_TEXT_RANGE *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetInlineObject; - - [NativeTypeName("HRESULT (UINT32, IDWriteTypography **, DWRITE_TEXT_RANGE *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTypography; - - [NativeTypeName("HRESULT (UINT32, UINT32 *, DWRITE_TEXT_RANGE *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetLocaleNameLength1; - - [NativeTypeName("HRESULT (UINT32, WCHAR *, UINT32, DWRITE_TEXT_RANGE *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetLocaleName1; - - [NativeTypeName("HRESULT (void *, IDWriteTextRenderer *, FLOAT, FLOAT) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Draw; - - [NativeTypeName("HRESULT (DWRITE_LINE_METRICS *, UINT32, UINT32 *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetLineMetrics; - - [NativeTypeName("HRESULT (DWRITE_TEXT_METRICS *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMetrics; - - [NativeTypeName("HRESULT (DWRITE_OVERHANG_METRICS *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetOverhangMetrics; - - [NativeTypeName("HRESULT (DWRITE_CLUSTER_METRICS *, UINT32, UINT32 *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetClusterMetrics; - - [NativeTypeName("HRESULT (FLOAT *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DetermineMinWidth; - - [NativeTypeName("HRESULT (FLOAT, FLOAT, BOOL *, BOOL *, DWRITE_HIT_TEST_METRICS *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] HitTestPoint; - - [NativeTypeName("HRESULT (UINT32, BOOL, FLOAT *, FLOAT *, DWRITE_HIT_TEST_METRICS *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] HitTestTextPosition; - - [NativeTypeName("HRESULT (UINT32, UINT32, FLOAT, FLOAT, DWRITE_HIT_TEST_METRICS *, UINT32, UINT32 *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] HitTestTextRange; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteTextRenderer.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteTextRenderer.cs deleted file mode 100644 index 6d812d2c..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteTextRenderer.cs +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("EF8A8135-5CC6-45FE-8825-C5A0724EB819")] - [NativeTypeName("struct IDWriteTextRenderer : IDWritePixelSnapping")] - [NativeInheritance("IDWritePixelSnapping")] - internal unsafe partial struct IDWriteTextRenderer : IDWriteTextRenderer.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDWriteTextRenderer*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDWriteTextRenderer*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDWriteTextRenderer*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT IsPixelSnappingDisabled(void* clientDrawingContext, BOOL* isDisabled) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDWriteTextRenderer*)Unsafe.AsPointer(ref this), clientDrawingContext, isDisabled); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetCurrentTransform(void* clientDrawingContext, DWRITE_MATRIX* transform) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDWriteTextRenderer*)Unsafe.AsPointer(ref this), clientDrawingContext, transform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetPixelsPerDip(void* clientDrawingContext, float* pixelsPerDip) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDWriteTextRenderer*)Unsafe.AsPointer(ref this), clientDrawingContext, pixelsPerDip); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT DrawGlyphRun(void* clientDrawingContext, float baselineOriginX, float baselineOriginY, DWRITE_MEASURING_MODE measuringMode, [NativeTypeName("const DWRITE_GLYPH_RUN *")] DWRITE_GLYPH_RUN* glyphRun, [NativeTypeName("const DWRITE_GLYPH_RUN_DESCRIPTION *")] DWRITE_GLYPH_RUN_DESCRIPTION* glyphRunDescription, IUnknown* clientDrawingEffect) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDWriteTextRenderer*)Unsafe.AsPointer(ref this), clientDrawingContext, baselineOriginX, baselineOriginY, measuringMode, glyphRun, glyphRunDescription, clientDrawingEffect); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT DrawUnderline(void* clientDrawingContext, float baselineOriginX, float baselineOriginY, [NativeTypeName("const DWRITE_UNDERLINE *")] DWRITE_UNDERLINE* underline, IUnknown* clientDrawingEffect) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDWriteTextRenderer*)Unsafe.AsPointer(ref this), clientDrawingContext, baselineOriginX, baselineOriginY, underline, clientDrawingEffect); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT DrawStrikethrough(void* clientDrawingContext, float baselineOriginX, float baselineOriginY, [NativeTypeName("const DWRITE_STRIKETHROUGH *")] DWRITE_STRIKETHROUGH* strikethrough, IUnknown* clientDrawingEffect) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDWriteTextRenderer*)Unsafe.AsPointer(ref this), clientDrawingContext, baselineOriginX, baselineOriginY, strikethrough, clientDrawingEffect); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT DrawInlineObject(void* clientDrawingContext, float originX, float originY, IDWriteInlineObject* inlineObject, BOOL isSideways, BOOL isRightToLeft, IUnknown* clientDrawingEffect) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDWriteTextRenderer*)Unsafe.AsPointer(ref this), clientDrawingContext, originX, originY, inlineObject, isSideways, isRightToLeft, clientDrawingEffect); - } - - public interface Interface : IDWritePixelSnapping.Interface - { - [VtblIndex(6)] - HRESULT DrawGlyphRun(void* clientDrawingContext, float baselineOriginX, float baselineOriginY, DWRITE_MEASURING_MODE measuringMode, [NativeTypeName("const DWRITE_GLYPH_RUN *")] DWRITE_GLYPH_RUN* glyphRun, [NativeTypeName("const DWRITE_GLYPH_RUN_DESCRIPTION *")] DWRITE_GLYPH_RUN_DESCRIPTION* glyphRunDescription, IUnknown* clientDrawingEffect); - - [VtblIndex(7)] - HRESULT DrawUnderline(void* clientDrawingContext, float baselineOriginX, float baselineOriginY, [NativeTypeName("const DWRITE_UNDERLINE *")] DWRITE_UNDERLINE* underline, IUnknown* clientDrawingEffect); - - [VtblIndex(8)] - HRESULT DrawStrikethrough(void* clientDrawingContext, float baselineOriginX, float baselineOriginY, [NativeTypeName("const DWRITE_STRIKETHROUGH *")] DWRITE_STRIKETHROUGH* strikethrough, IUnknown* clientDrawingEffect); - - [VtblIndex(9)] - HRESULT DrawInlineObject(void* clientDrawingContext, float originX, float originY, IDWriteInlineObject* inlineObject, BOOL isSideways, BOOL isRightToLeft, IUnknown* clientDrawingEffect); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (void *, BOOL *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsPixelSnappingDisabled; - - [NativeTypeName("HRESULT (void *, DWRITE_MATRIX *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetCurrentTransform; - - [NativeTypeName("HRESULT (void *, FLOAT *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelsPerDip; - - [NativeTypeName("HRESULT (void *, FLOAT, FLOAT, DWRITE_MEASURING_MODE, const DWRITE_GLYPH_RUN *, const DWRITE_GLYPH_RUN_DESCRIPTION *, IUnknown *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawGlyphRun; - - [NativeTypeName("HRESULT (void *, FLOAT, FLOAT, const DWRITE_UNDERLINE *, IUnknown *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawUnderline; - - [NativeTypeName("HRESULT (void *, FLOAT, FLOAT, const DWRITE_STRIKETHROUGH *, IUnknown *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawStrikethrough; - - [NativeTypeName("HRESULT (void *, FLOAT, FLOAT, IDWriteInlineObject *, BOOL, BOOL, IUnknown *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DrawInlineObject; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteTypography.cs b/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteTypography.cs deleted file mode 100644 index a4b90788..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dwrite/IDWriteTypography.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("55F1112B-1DC2-4B3C-9541-F46894ED85B6")] - [NativeTypeName("struct IDWriteTypography : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IDWriteTypography : IDWriteTypography.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDWriteTypography*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDWriteTypography*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDWriteTypography*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT AddFontFeature(DWRITE_FONT_FEATURE fontFeature) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDWriteTypography*)Unsafe.AsPointer(ref this), fontFeature); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - [return: NativeTypeName("UINT32")] - public uint GetFontFeatureCount() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDWriteTypography*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetFontFeature([NativeTypeName("UINT32")] uint fontFeatureIndex, DWRITE_FONT_FEATURE* fontFeature) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDWriteTypography*)Unsafe.AsPointer(ref this), fontFeatureIndex, fontFeature); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT AddFontFeature(DWRITE_FONT_FEATURE fontFeature); - - [VtblIndex(4)] - [return: NativeTypeName("UINT32")] - uint GetFontFeatureCount(); - - [VtblIndex(5)] - HRESULT GetFontFeature([NativeTypeName("UINT32")] uint fontFeatureIndex, DWRITE_FONT_FEATURE* fontFeature); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (DWRITE_FONT_FEATURE) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddFontFeature; - - [NativeTypeName("UINT32 () __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontFeatureCount; - - [NativeTypeName("HRESULT (UINT32, DWRITE_FONT_FEATURE *) __attribute__((nothrow)) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFontFeature; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/CLSID.cs b/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/CLSID.cs index fca239ba..7407b4fa 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/CLSID.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/CLSID.cs @@ -37,81 +37,6 @@ namespace TerraFX.Interop.Windows } } - [NativeTypeName("const GUID")] - public static ref readonly Guid CLSID_DxcLinker - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x87, 0x80, 0x6A, 0xEF, - 0xEA, 0xB0, - 0x56, 0x4D, - 0x9E, - 0x45, - 0xD0, - 0x7E, - 0x1A, - 0x8B, - 0x78, - 0x06 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const CLSID")] - public static ref readonly Guid CLSID_DxcDiaDataSource - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x73, 0x6B, 0x1F, 0xCD, - 0xB0, 0x2A, - 0x4D, 0x48, - 0x8E, - 0xDC, - 0xEB, - 0xE7, - 0xA4, - 0x3C, - 0xA0, - 0x9F - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const CLSID")] - public static ref readonly Guid CLSID_DxcCompilerArgs - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x82, 0xAE, 0x56, 0x3E, - 0x4D, 0x22, - 0x0F, 0x47, - 0xA1, - 0xA1, - 0xFE, - 0x30, - 0x16, - 0xEE, - 0x9F, - 0x9D - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - [NativeTypeName("const GUID")] public static ref readonly Guid CLSID_DxcLibrary { @@ -136,133 +61,5 @@ namespace TerraFX.Interop.Windows return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); } } - - [NativeTypeName("const GUID")] - public static ref readonly Guid CLSID_DxcUtils => ref CLSID_DxcLibrary; - - [NativeTypeName("const GUID")] - public static ref readonly Guid CLSID_DxcValidator - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x15, 0xE2, 0xA3, 0x8C, - 0x28, 0xF7, - 0xF3, 0x4C, - 0x8C, - 0xDD, - 0x88, - 0xAF, - 0x91, - 0x75, - 0x87, - 0xA1 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid CLSID_DxcAssembler - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x68, 0xDB, 0x28, 0xD7, - 0x03, 0xF9, - 0x80, 0x4F, - 0x94, - 0xCD, - 0xDC, - 0xCF, - 0x76, - 0xEC, - 0x71, - 0x51 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid CLSID_DxcContainerReflection - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x89, 0x44, 0xF5, 0xB9, - 0xB8, 0x55, - 0x0C, 0x40, - 0xBA, - 0x3A, - 0x16, - 0x75, - 0xE4, - 0x72, - 0x8B, - 0x91 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid CLSID_DxcOptimizer - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x9F, 0xD7, 0x2C, 0xAE, - 0x22, 0xCC, - 0x3F, 0x45, - 0x9B, - 0x6B, - 0xB1, - 0x24, - 0xE7, - 0xA5, - 0x20, - 0x4C - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid CLSID_DxcContainerBuilder - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x94, 0x42, 0x13, 0x94, - 0x1F, 0x41, - 0x74, 0x45, - 0xB4, - 0xD0, - 0x87, - 0x41, - 0xE2, - 0x52, - 0x40, - 0xD2 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/DirectX.cs b/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/DirectX.cs index 92bf7e47..0963b55b 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/DirectX.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/DirectX.cs @@ -13,8 +13,5 @@ namespace TerraFX.Interop.DirectX { [DllImport("dxcompiler", ExactSpelling = true)] public static extern HRESULT DxcCreateInstance([NativeTypeName("const IID &")] Guid* rclsid, [NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("LPVOID *")] void** ppv); - - [DllImport("dxcompiler", ExactSpelling = true)] - public static extern HRESULT DxcCreateInstance2(IMalloc* pMalloc, [NativeTypeName("const IID &")] Guid* rclsid, [NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("LPVOID *")] void** ppv); } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcBlob.cs b/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcBlob.cs index f6d87aea..69749bd2 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcBlob.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcBlob.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("8BA5FB08-5195-40E2-AC58-0D989C3A0102")] [NativeTypeName("struct IDxcBlob : IUnknown")] [NativeInheritance("IUnknown")] - internal unsafe partial struct IDxcBlob : IDxcBlob.Interface + internal unsafe partial struct IDxcBlob { public void** lpVtbl; @@ -55,34 +55,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDxcBlob*)Unsafe.AsPointer(ref this)); } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - [return: NativeTypeName("LPVOID")] - void* GetBufferPointer(); - - [VtblIndex(4)] - [return: NativeTypeName("SIZE_T")] - nuint GetBufferSize(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("LPVOID () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBufferPointer; - - [NativeTypeName("SIZE_T () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBufferSize; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcBlobEncoding.cs b/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcBlobEncoding.cs index b98face6..23938046 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcBlobEncoding.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcBlobEncoding.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("7241D424-2646-4191-97C0-98E96E42FC68")] [NativeTypeName("struct IDxcBlobEncoding : IDxcBlob")] [NativeInheritance("IDxcBlob")] - internal unsafe partial struct IDxcBlobEncoding : IDxcBlobEncoding.Interface + internal unsafe partial struct IDxcBlobEncoding { public void** lpVtbl; @@ -62,32 +62,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDxcBlobEncoding*)Unsafe.AsPointer(ref this), pKnown, pCodePage); } - - public interface Interface : IDxcBlob.Interface - { - [VtblIndex(5)] - HRESULT GetEncoding(BOOL* pKnown, [NativeTypeName("UINT32 *")] uint* pCodePage); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("LPVOID () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBufferPointer; - - [NativeTypeName("SIZE_T () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBufferSize; - - [NativeTypeName("HRESULT (BOOL *, UINT32 *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetEncoding; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcBlobUtf16.cs b/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcBlobUtf16.cs deleted file mode 100644 index e749eca6..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcBlobUtf16.cs +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. Licensed under the University of Illinois Open Source License. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("A3F84EAB-0FAA-497E-A39C-EE6ED60B2D84")] - [NativeTypeName("struct IDxcBlobUtf16 : IDxcBlobEncoding")] - [NativeInheritance("IDxcBlobEncoding")] - internal unsafe partial struct IDxcBlobUtf16 : IDxcBlobUtf16.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDxcBlobUtf16*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDxcBlobUtf16*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDxcBlobUtf16*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - [return: NativeTypeName("LPVOID")] - public void* GetBufferPointer() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDxcBlobUtf16*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - [return: NativeTypeName("SIZE_T")] - public nuint GetBufferSize() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDxcBlobUtf16*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetEncoding(BOOL* pKnown, [NativeTypeName("UINT32 *")] uint* pCodePage) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDxcBlobUtf16*)Unsafe.AsPointer(ref this), pKnown, pCodePage); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - [return: NativeTypeName("LPCWSTR")] - public ushort* GetStringPointer() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDxcBlobUtf16*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - [return: NativeTypeName("SIZE_T")] - public nuint GetStringLength() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDxcBlobUtf16*)Unsafe.AsPointer(ref this)); - } - - public interface Interface : IDxcBlobEncoding.Interface - { - [VtblIndex(6)] - [return: NativeTypeName("LPCWSTR")] - ushort* GetStringPointer(); - - [VtblIndex(7)] - [return: NativeTypeName("SIZE_T")] - nuint GetStringLength(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("LPVOID () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBufferPointer; - - [NativeTypeName("SIZE_T () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBufferSize; - - [NativeTypeName("HRESULT (BOOL *, UINT32 *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetEncoding; - - [NativeTypeName("LPCWSTR () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetStringPointer; - - [NativeTypeName("SIZE_T () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetStringLength; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcBlobUtf8.cs b/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcBlobUtf8.cs deleted file mode 100644 index cc0389ed..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcBlobUtf8.cs +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. Licensed under the University of Illinois Open Source License. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("3DA636C9-BA71-4024-A301-30CBF125305B")] - [NativeTypeName("struct IDxcBlobUtf8 : IDxcBlobEncoding")] - [NativeInheritance("IDxcBlobEncoding")] - internal unsafe partial struct IDxcBlobUtf8 : IDxcBlobUtf8.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDxcBlobUtf8*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDxcBlobUtf8*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDxcBlobUtf8*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - [return: NativeTypeName("LPVOID")] - public void* GetBufferPointer() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDxcBlobUtf8*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - [return: NativeTypeName("SIZE_T")] - public nuint GetBufferSize() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDxcBlobUtf8*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetEncoding(BOOL* pKnown, [NativeTypeName("UINT32 *")] uint* pCodePage) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDxcBlobUtf8*)Unsafe.AsPointer(ref this), pKnown, pCodePage); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - [return: NativeTypeName("LPCSTR")] - public sbyte* GetStringPointer() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDxcBlobUtf8*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - [return: NativeTypeName("SIZE_T")] - public nuint GetStringLength() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDxcBlobUtf8*)Unsafe.AsPointer(ref this)); - } - - public interface Interface : IDxcBlobEncoding.Interface - { - [VtblIndex(6)] - [return: NativeTypeName("LPCSTR")] - sbyte* GetStringPointer(); - - [VtblIndex(7)] - [return: NativeTypeName("SIZE_T")] - nuint GetStringLength(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("LPVOID () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBufferPointer; - - [NativeTypeName("SIZE_T () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBufferSize; - - [NativeTypeName("HRESULT (BOOL *, UINT32 *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetEncoding; - - [NativeTypeName("LPCSTR () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetStringPointer; - - [NativeTypeName("SIZE_T () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetStringLength; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcCompiler.cs b/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcCompiler.cs index 96d4ecfd..40595635 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcCompiler.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcCompiler.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("8C210BF3-011F-4422-8D70-6F9ACB8DB617")] [NativeTypeName("struct IDxcCompiler : IUnknown")] [NativeInheritance("IUnknown")] - internal unsafe partial struct IDxcCompiler : IDxcCompiler.Interface + internal unsafe partial struct IDxcCompiler { public void** lpVtbl; @@ -60,38 +60,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDxcCompiler*)Unsafe.AsPointer(ref this), pSource, ppDisassembly); } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT Compile(IDxcBlob* pSource, [NativeTypeName("LPCWSTR")] ushort* pSourceName, [NativeTypeName("LPCWSTR")] ushort* pEntryPoint, [NativeTypeName("LPCWSTR")] ushort* pTargetProfile, [NativeTypeName("LPCWSTR *")] ushort** pArguments, [NativeTypeName("UINT32")] uint argCount, [NativeTypeName("const DxcDefine *")] DxcDefine* pDefines, [NativeTypeName("UINT32")] uint defineCount, IDxcIncludeHandler* pIncludeHandler, IDxcOperationResult** ppResult); - - [VtblIndex(4)] - HRESULT Preprocess(IDxcBlob* pSource, [NativeTypeName("LPCWSTR")] ushort* pSourceName, [NativeTypeName("LPCWSTR *")] ushort** pArguments, [NativeTypeName("UINT32")] uint argCount, [NativeTypeName("const DxcDefine *")] DxcDefine* pDefines, [NativeTypeName("UINT32")] uint defineCount, IDxcIncludeHandler* pIncludeHandler, IDxcOperationResult** ppResult); - - [VtblIndex(5)] - HRESULT Disassemble(IDxcBlob* pSource, IDxcBlobEncoding** ppDisassembly); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (IDxcBlob *, LPCWSTR, LPCWSTR, LPCWSTR, LPCWSTR *, UINT32, const DxcDefine *, UINT32, IDxcIncludeHandler *, IDxcOperationResult **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Compile; - - [NativeTypeName("HRESULT (IDxcBlob *, LPCWSTR, LPCWSTR *, UINT32, const DxcDefine *, UINT32, IDxcIncludeHandler *, IDxcOperationResult **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Preprocess; - - [NativeTypeName("HRESULT (IDxcBlob *, IDxcBlobEncoding **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Disassemble; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcCompilerArgs.cs b/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcCompilerArgs.cs deleted file mode 100644 index 3673422c..00000000 --- a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcCompilerArgs.cs +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. Licensed under the University of Illinois Open Source License. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX -{ - [Guid("73EFFE2A-70DC-45F8-9690-EFF64C02429D")] - [NativeTypeName("struct IDxcCompilerArgs : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IDxcCompilerArgs : IDxcCompilerArgs.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDxcCompilerArgs*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDxcCompilerArgs*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDxcCompilerArgs*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - [return: NativeTypeName("LPCWSTR *")] - public ushort** GetArguments() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDxcCompilerArgs*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - [return: NativeTypeName("UINT32")] - public uint GetCount() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDxcCompilerArgs*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT AddArguments([NativeTypeName("LPCWSTR *")] ushort** pArguments, [NativeTypeName("UINT32")] uint argCount) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDxcCompilerArgs*)Unsafe.AsPointer(ref this), pArguments, argCount); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT AddArgumentsUTF8([NativeTypeName("LPCSTR *")] sbyte** pArguments, [NativeTypeName("UINT32")] uint argCount) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDxcCompilerArgs*)Unsafe.AsPointer(ref this), pArguments, argCount); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT AddDefines([NativeTypeName("const DxcDefine *")] DxcDefine* pDefines, [NativeTypeName("UINT32")] uint defineCount) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDxcCompilerArgs*)Unsafe.AsPointer(ref this), pDefines, defineCount); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - [return: NativeTypeName("LPCWSTR *")] - ushort** GetArguments(); - - [VtblIndex(4)] - [return: NativeTypeName("UINT32")] - uint GetCount(); - - [VtblIndex(5)] - HRESULT AddArguments([NativeTypeName("LPCWSTR *")] ushort** pArguments, [NativeTypeName("UINT32")] uint argCount); - - [VtblIndex(6)] - HRESULT AddArgumentsUTF8([NativeTypeName("LPCSTR *")] sbyte** pArguments, [NativeTypeName("UINT32")] uint argCount); - - [VtblIndex(7)] - HRESULT AddDefines([NativeTypeName("const DxcDefine *")] DxcDefine* pDefines, [NativeTypeName("UINT32")] uint defineCount); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("LPCWSTR *() __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetArguments; - - [NativeTypeName("UINT32 () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetCount; - - [NativeTypeName("HRESULT (LPCWSTR *, UINT32) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddArguments; - - [NativeTypeName("HRESULT (LPCSTR *, UINT32) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddArgumentsUTF8; - - [NativeTypeName("HRESULT (const DxcDefine *, UINT32) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddDefines; - } - } -} diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcIncludeHandler.cs b/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcIncludeHandler.cs index 74a5168f..85acc27d 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcIncludeHandler.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcIncludeHandler.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("7F61FC7D-950D-467F-B3E3-3C02FB49187C")] [NativeTypeName("struct IDxcIncludeHandler : IUnknown")] [NativeInheritance("IUnknown")] - internal unsafe partial struct IDxcIncludeHandler : IDxcIncludeHandler.Interface + internal unsafe partial struct IDxcIncludeHandler { public void** lpVtbl; @@ -46,26 +46,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDxcIncludeHandler*)Unsafe.AsPointer(ref this), pFilename, ppIncludeSource); } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT LoadSource([NativeTypeName("LPCWSTR")] ushort* pFilename, IDxcBlob** ppIncludeSource); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (LPCWSTR, IDxcBlob **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] LoadSource; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcLibrary.cs b/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcLibrary.cs index e28377b0..0a2b65b2 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcLibrary.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcLibrary.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("E5204DC7-D18C-4C3C-BDFB-851673980FE7")] [NativeTypeName("struct IDxcLibrary : IUnknown")] [NativeInheritance("IUnknown")] - internal unsafe partial struct IDxcLibrary : IDxcLibrary.Interface + internal unsafe partial struct IDxcLibrary { public void** lpVtbl; @@ -40,13 +40,6 @@ namespace TerraFX.Interop.DirectX return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDxcLibrary*)Unsafe.AsPointer(ref this)); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT SetMalloc(IMalloc* pMalloc) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDxcLibrary*)Unsafe.AsPointer(ref this), pMalloc); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(4)] public HRESULT CreateBlobFromBlob(IDxcBlob* pBlob, [NativeTypeName("UINT32")] uint offset, [NativeTypeName("UINT32")] uint length, IDxcBlob** ppResult) @@ -75,13 +68,6 @@ namespace TerraFX.Interop.DirectX return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDxcLibrary*)Unsafe.AsPointer(ref this), pText, size, codePage, pBlobEncoding); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT CreateBlobWithEncodingOnMalloc([NativeTypeName("LPCVOID")] void* pText, IMalloc* pIMalloc, [NativeTypeName("UINT32")] uint size, [NativeTypeName("UINT32")] uint codePage, IDxcBlobEncoding** pBlobEncoding) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDxcLibrary*)Unsafe.AsPointer(ref this), pText, pIMalloc, size, codePage, pBlobEncoding); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(9)] public HRESULT CreateIncludeHandler(IDxcIncludeHandler** ppResult) @@ -109,80 +95,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IDxcLibrary*)Unsafe.AsPointer(ref this), pBlob, pBlobEncoding); } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT SetMalloc(IMalloc* pMalloc); - - [VtblIndex(4)] - HRESULT CreateBlobFromBlob(IDxcBlob* pBlob, [NativeTypeName("UINT32")] uint offset, [NativeTypeName("UINT32")] uint length, IDxcBlob** ppResult); - - [VtblIndex(5)] - HRESULT CreateBlobFromFile([NativeTypeName("LPCWSTR")] ushort* pFileName, [NativeTypeName("UINT32 *")] uint* codePage, IDxcBlobEncoding** pBlobEncoding); - - [VtblIndex(6)] - HRESULT CreateBlobWithEncodingFromPinned([NativeTypeName("LPCVOID")] void* pText, [NativeTypeName("UINT32")] uint size, [NativeTypeName("UINT32")] uint codePage, IDxcBlobEncoding** pBlobEncoding); - - [VtblIndex(7)] - HRESULT CreateBlobWithEncodingOnHeapCopy([NativeTypeName("LPCVOID")] void* pText, [NativeTypeName("UINT32")] uint size, [NativeTypeName("UINT32")] uint codePage, IDxcBlobEncoding** pBlobEncoding); - - [VtblIndex(8)] - HRESULT CreateBlobWithEncodingOnMalloc([NativeTypeName("LPCVOID")] void* pText, IMalloc* pIMalloc, [NativeTypeName("UINT32")] uint size, [NativeTypeName("UINT32")] uint codePage, IDxcBlobEncoding** pBlobEncoding); - - [VtblIndex(9)] - HRESULT CreateIncludeHandler(IDxcIncludeHandler** ppResult); - - [VtblIndex(10)] - HRESULT CreateStreamFromBlobReadOnly(IDxcBlob* pBlob, IStream** ppStream); - - [VtblIndex(11)] - HRESULT GetBlobAsUtf8(IDxcBlob* pBlob, IDxcBlobEncoding** pBlobEncoding); - - [VtblIndex(12)] - HRESULT GetBlobAsUtf16(IDxcBlob* pBlob, IDxcBlobEncoding** pBlobEncoding); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (IMalloc *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetMalloc; - - [NativeTypeName("HRESULT (IDxcBlob *, UINT32, UINT32, IDxcBlob **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBlobFromBlob; - - [NativeTypeName("HRESULT (LPCWSTR, UINT32 *, IDxcBlobEncoding **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBlobFromFile; - - [NativeTypeName("HRESULT (LPCVOID, UINT32, UINT32, IDxcBlobEncoding **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBlobWithEncodingFromPinned; - - [NativeTypeName("HRESULT (LPCVOID, UINT32, UINT32, IDxcBlobEncoding **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBlobWithEncodingOnHeapCopy; - - [NativeTypeName("HRESULT (LPCVOID, IMalloc *, UINT32, UINT32, IDxcBlobEncoding **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBlobWithEncodingOnMalloc; - - [NativeTypeName("HRESULT (IDxcIncludeHandler **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateIncludeHandler; - - [NativeTypeName("HRESULT (IDxcBlob *, IStream **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateStreamFromBlobReadOnly; - - [NativeTypeName("HRESULT (IDxcBlob *, IDxcBlobEncoding **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBlobAsUtf8; - - [NativeTypeName("HRESULT (IDxcBlob *, IDxcBlobEncoding **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBlobAsUtf16; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcOperationResult.cs b/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcOperationResult.cs index 362a7173..c6327c9d 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcOperationResult.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcOperationResult.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("CEDB484A-D4E9-445A-B991-CA21CA157DC2")] [NativeTypeName("struct IDxcOperationResult : IUnknown")] [NativeInheritance("IUnknown")] - internal unsafe partial struct IDxcOperationResult : IDxcOperationResult.Interface + internal unsafe partial struct IDxcOperationResult { public void** lpVtbl; @@ -60,38 +60,5 @@ namespace TerraFX.Interop.DirectX { return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDxcOperationResult*)Unsafe.AsPointer(ref this), ppErrors); } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT GetStatus(HRESULT* pStatus); - - [VtblIndex(4)] - HRESULT GetResult(IDxcBlob** ppResult); - - [VtblIndex(5)] - HRESULT GetErrorBuffer(IDxcBlobEncoding** ppErrors); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (HRESULT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetStatus; - - [NativeTypeName("HRESULT (IDxcBlob **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetResult; - - [NativeTypeName("HRESULT (IDxcBlobEncoding **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetErrorBuffer; - } } } diff --git a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcUtils.cs b/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcUtils.cs index ae54f84d..e813c145 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcUtils.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/dxcapi/IDxcUtils.cs @@ -13,7 +13,7 @@ namespace TerraFX.Interop.DirectX [Guid("4605C4CB-2019-492A-ADA4-65F20BB7D67F")] [NativeTypeName("struct IDxcUtils : IUnknown")] [NativeInheritance("IUnknown")] - internal unsafe partial struct IDxcUtils : IDxcUtils.Interface + internal unsafe partial struct IDxcUtils { public void** lpVtbl; @@ -54,13 +54,6 @@ namespace TerraFX.Interop.DirectX return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDxcUtils*)Unsafe.AsPointer(ref this), pData, size, codePage, pBlobEncoding); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT MoveToBlob([NativeTypeName("LPCVOID")] void* pData, IMalloc* pIMalloc, [NativeTypeName("UINT32")] uint size, [NativeTypeName("UINT32")] uint codePage, IDxcBlobEncoding** pBlobEncoding) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDxcUtils*)Unsafe.AsPointer(ref this), pData, pIMalloc, size, codePage, pBlobEncoding); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(6)] public HRESULT CreateBlob([NativeTypeName("LPCVOID")] void* pData, [NativeTypeName("UINT32")] uint size, [NativeTypeName("UINT32")] uint codePage, IDxcBlobEncoding** pBlobEncoding) @@ -89,20 +82,6 @@ namespace TerraFX.Interop.DirectX return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDxcUtils*)Unsafe.AsPointer(ref this), ppResult); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT GetBlobAsUtf8(IDxcBlob* pBlob, IDxcBlobUtf8** pBlobEncoding) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IDxcUtils*)Unsafe.AsPointer(ref this), pBlob, pBlobEncoding); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT GetBlobAsUtf16(IDxcBlob* pBlob, IDxcBlobUtf16** pBlobEncoding) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IDxcUtils*)Unsafe.AsPointer(ref this), pBlob, pBlobEncoding); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(12)] public HRESULT GetDxilContainerPart([NativeTypeName("const DxcBuffer *")] DxcBuffer* pShader, [NativeTypeName("UINT32")] uint DxcPart, void** ppPartData, [NativeTypeName("UINT32 *")] uint* pPartSizeInBytes) @@ -117,111 +96,11 @@ namespace TerraFX.Interop.DirectX return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDxcUtils*)Unsafe.AsPointer(ref this), pData, iid, ppvReflection); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT BuildArguments([NativeTypeName("LPCWSTR")] ushort* pSourceName, [NativeTypeName("LPCWSTR")] ushort* pEntryPoint, [NativeTypeName("LPCWSTR")] ushort* pTargetProfile, [NativeTypeName("LPCWSTR *")] ushort** pArguments, [NativeTypeName("UINT32")] uint argCount, [NativeTypeName("const DxcDefine *")] DxcDefine* pDefines, [NativeTypeName("UINT32")] uint defineCount, IDxcCompilerArgs** ppArgs) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IDxcUtils*)Unsafe.AsPointer(ref this), pSourceName, pEntryPoint, pTargetProfile, pArguments, argCount, pDefines, defineCount, ppArgs); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] public HRESULT GetPDBContents(IDxcBlob* pPDBBlob, IDxcBlob** ppHash, IDxcBlob** ppContainer) { return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IDxcUtils*)Unsafe.AsPointer(ref this), pPDBBlob, ppHash, ppContainer); } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT CreateBlobFromBlob(IDxcBlob* pBlob, [NativeTypeName("UINT32")] uint offset, [NativeTypeName("UINT32")] uint length, IDxcBlob** ppResult); - - [VtblIndex(4)] - HRESULT CreateBlobFromPinned([NativeTypeName("LPCVOID")] void* pData, [NativeTypeName("UINT32")] uint size, [NativeTypeName("UINT32")] uint codePage, IDxcBlobEncoding** pBlobEncoding); - - [VtblIndex(5)] - HRESULT MoveToBlob([NativeTypeName("LPCVOID")] void* pData, IMalloc* pIMalloc, [NativeTypeName("UINT32")] uint size, [NativeTypeName("UINT32")] uint codePage, IDxcBlobEncoding** pBlobEncoding); - - [VtblIndex(6)] - HRESULT CreateBlob([NativeTypeName("LPCVOID")] void* pData, [NativeTypeName("UINT32")] uint size, [NativeTypeName("UINT32")] uint codePage, IDxcBlobEncoding** pBlobEncoding); - - [VtblIndex(7)] - HRESULT LoadFile([NativeTypeName("LPCWSTR")] ushort* pFileName, [NativeTypeName("UINT32 *")] uint* pCodePage, IDxcBlobEncoding** pBlobEncoding); - - [VtblIndex(8)] - HRESULT CreateReadOnlyStreamFromBlob(IDxcBlob* pBlob, IStream** ppStream); - - [VtblIndex(9)] - HRESULT CreateDefaultIncludeHandler(IDxcIncludeHandler** ppResult); - - [VtblIndex(10)] - HRESULT GetBlobAsUtf8(IDxcBlob* pBlob, IDxcBlobUtf8** pBlobEncoding); - - [VtblIndex(11)] - HRESULT GetBlobAsUtf16(IDxcBlob* pBlob, IDxcBlobUtf16** pBlobEncoding); - - [VtblIndex(12)] - HRESULT GetDxilContainerPart([NativeTypeName("const DxcBuffer *")] DxcBuffer* pShader, [NativeTypeName("UINT32")] uint DxcPart, void** ppPartData, [NativeTypeName("UINT32 *")] uint* pPartSizeInBytes); - - [VtblIndex(13)] - HRESULT CreateReflection([NativeTypeName("const DxcBuffer *")] DxcBuffer* pData, [NativeTypeName("const IID &")] Guid* iid, void** ppvReflection); - - [VtblIndex(14)] - HRESULT BuildArguments([NativeTypeName("LPCWSTR")] ushort* pSourceName, [NativeTypeName("LPCWSTR")] ushort* pEntryPoint, [NativeTypeName("LPCWSTR")] ushort* pTargetProfile, [NativeTypeName("LPCWSTR *")] ushort** pArguments, [NativeTypeName("UINT32")] uint argCount, [NativeTypeName("const DxcDefine *")] DxcDefine* pDefines, [NativeTypeName("UINT32")] uint defineCount, IDxcCompilerArgs** ppArgs); - - [VtblIndex(15)] - HRESULT GetPDBContents(IDxcBlob* pPDBBlob, IDxcBlob** ppHash, IDxcBlob** ppContainer); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (IDxcBlob *, UINT32, UINT32, IDxcBlob **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBlobFromBlob; - - [NativeTypeName("HRESULT (LPCVOID, UINT32, UINT32, IDxcBlobEncoding **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBlobFromPinned; - - [NativeTypeName("HRESULT (LPCVOID, IMalloc *, UINT32, UINT32, IDxcBlobEncoding **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] MoveToBlob; - - [NativeTypeName("HRESULT (LPCVOID, UINT32, UINT32, IDxcBlobEncoding **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBlob; - - [NativeTypeName("HRESULT (LPCWSTR, UINT32 *, IDxcBlobEncoding **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] LoadFile; - - [NativeTypeName("HRESULT (IDxcBlob *, IStream **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateReadOnlyStreamFromBlob; - - [NativeTypeName("HRESULT (IDxcIncludeHandler **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateDefaultIncludeHandler; - - [NativeTypeName("HRESULT (IDxcBlob *, IDxcBlobUtf8 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBlobAsUtf8; - - [NativeTypeName("HRESULT (IDxcBlob *, IDxcBlobUtf16 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetBlobAsUtf16; - - [NativeTypeName("HRESULT (const DxcBuffer *, UINT32, void **, UINT32 *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDxilContainerPart; - - [NativeTypeName("HRESULT (const DxcBuffer *, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateReflection; - - [NativeTypeName("HRESULT (LPCWSTR, LPCWSTR, LPCWSTR, LPCWSTR *, UINT32, const DxcDefine *, UINT32, IDxcCompilerArgs **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] BuildArguments; - - [NativeTypeName("HRESULT (IDxcBlob *, IDxcBlob **, IDxcBlob **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPDBContents; - } } } diff --git a/src/TerraFX.Interop.Windows/TerraFX.Interop.Windows.projitems b/src/TerraFX.Interop.Windows/TerraFX.Interop.Windows.projitems index 2ff698fd..dafa39be 100644 --- a/src/TerraFX.Interop.Windows/TerraFX.Interop.Windows.projitems +++ b/src/TerraFX.Interop.Windows/TerraFX.Interop.Windows.projitems @@ -25,161 +25,34 @@ - - - - + + - - - - - - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -190,48 +63,28 @@ - - - - - - - - - - - - - - - - - - - - @@ -239,54 +92,30 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -314,46 +143,25 @@ - - - - - - - - - - - - - - - - - - - - - @@ -363,293 +171,86 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/src/TerraFX.Interop.Windows/WinRT/um/windows.ui.xaml.media.dxinterop/ISwapChainPanelNative.cs b/src/TerraFX.Interop.Windows/WinRT/um/windows.ui.xaml.media.dxinterop/ISwapChainPanelNative.cs new file mode 100644 index 00000000..70c0ba9b --- /dev/null +++ b/src/TerraFX.Interop.Windows/WinRT/um/windows.ui.xaml.media.dxinterop/ISwapChainPanelNative.cs @@ -0,0 +1,53 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/windows.ui.xaml.media.dxinterop.h in the Windows SDK for Windows 10.0.20348.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; +using TerraFX.Interop.DirectX; +using TerraFX.Interop.Windows; + +namespace TerraFX.Interop.WinRT +{ + [SupportedOSPlatform("windows8.1")] + [Guid("F92F19D2-3ADE-45A6-A20C-F6F1EA90554B")] + [NativeTypeName("struct ISwapChainPanelNative : IUnknown")] + [NativeInheritance("IUnknown")] + internal unsafe partial struct ISwapChainPanelNative + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ISwapChainPanelNative*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ISwapChainPanelNative*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ISwapChainPanelNative*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT SetSwapChain(IDXGISwapChain* swapChain) + { + return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ISwapChainPanelNative*)Unsafe.AsPointer(ref this), swapChain); + } + } +} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HBITMAP.Manual.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HBITMAP.Manual.cs deleted file mode 100644 index 432ff429..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HBITMAP.Manual.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HBITMAP : IEquatable - { - public static explicit operator HBITMAP(HGDIOBJ value) => new HBITMAP(value.Value); - - public static implicit operator HGDIOBJ(HBITMAP value) => new HGDIOBJ(value.Value); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HBITMAP.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HBITMAP.cs deleted file mode 100644 index 4932a56a..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HBITMAP.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HBITMAP : IComparable, IComparable, IEquatable, IFormattable - { - public readonly void* Value; - - public HBITMAP(void* value) - { - Value = value; - } - - public static HBITMAP INVALID_VALUE => new HBITMAP((void*)(-1)); - - public static HBITMAP NULL => new HBITMAP(null); - - public static bool operator ==(HBITMAP left, HBITMAP right) => left.Value == right.Value; - - public static bool operator !=(HBITMAP left, HBITMAP right) => left.Value != right.Value; - - public static bool operator <(HBITMAP left, HBITMAP right) => left.Value < right.Value; - - public static bool operator <=(HBITMAP left, HBITMAP right) => left.Value <= right.Value; - - public static bool operator >(HBITMAP left, HBITMAP right) => left.Value > right.Value; - - public static bool operator >=(HBITMAP left, HBITMAP right) => left.Value >= right.Value; - - public static explicit operator HBITMAP(void* value) => new HBITMAP(value); - - public static implicit operator void*(HBITMAP value) => value.Value; - - public static explicit operator HBITMAP(HANDLE value) => new HBITMAP(value); - - public static implicit operator HANDLE(HBITMAP value) => new HANDLE(value.Value); - - public static explicit operator HBITMAP(byte value) => new HBITMAP((void*)(value)); - - public static explicit operator byte(HBITMAP value) => (byte)(value.Value); - - public static explicit operator HBITMAP(short value) => new HBITMAP((void*)(value)); - - public static explicit operator short(HBITMAP value) => (short)(value.Value); - - public static explicit operator HBITMAP(int value) => new HBITMAP((void*)(value)); - - public static explicit operator int(HBITMAP value) => (int)(value.Value); - - public static explicit operator HBITMAP(long value) => new HBITMAP((void*)(value)); - - public static explicit operator long(HBITMAP value) => (long)(value.Value); - - public static explicit operator HBITMAP(nint value) => new HBITMAP((void*)(value)); - - public static implicit operator nint(HBITMAP value) => (nint)(value.Value); - - public static explicit operator HBITMAP(sbyte value) => new HBITMAP((void*)(value)); - - public static explicit operator sbyte(HBITMAP value) => (sbyte)(value.Value); - - public static explicit operator HBITMAP(ushort value) => new HBITMAP((void*)(value)); - - public static explicit operator ushort(HBITMAP value) => (ushort)(value.Value); - - public static explicit operator HBITMAP(uint value) => new HBITMAP((void*)(value)); - - public static explicit operator uint(HBITMAP value) => (uint)(value.Value); - - public static explicit operator HBITMAP(ulong value) => new HBITMAP((void*)(value)); - - public static explicit operator ulong(HBITMAP value) => (ulong)(value.Value); - - public static explicit operator HBITMAP(nuint value) => new HBITMAP((void*)(value)); - - public static implicit operator nuint(HBITMAP value) => (nuint)(value.Value); - - public int CompareTo(object? obj) - { - if (obj is HBITMAP other) - { - return CompareTo(other); - } - - return (obj is null) ? 1 : throw new ArgumentException("obj is not an instance of HBITMAP."); - } - - public int CompareTo(HBITMAP other) => ((nuint)(Value)).CompareTo((nuint)(other.Value)); - - public override bool Equals(object? obj) => (obj is HBITMAP other) && Equals(other); - - public bool Equals(HBITMAP other) => ((nuint)(Value)).Equals((nuint)(other.Value)); - - public override int GetHashCode() => ((nuint)(Value)).GetHashCode(); - - public override string ToString() => ((nuint)(Value)).ToString((sizeof(nint) == 4) ? "X8" : "X16"); - - public string ToString(string? format, IFormatProvider? formatProvider) => ((nuint)(Value)).ToString(format, formatProvider); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HBRUSH.Manual.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HBRUSH.Manual.cs deleted file mode 100644 index 344c79b6..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HBRUSH.Manual.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HBRUSH : IEquatable - { - public static explicit operator HBRUSH(HGDIOBJ value) => new HBRUSH(value.Value); - - public static implicit operator HGDIOBJ(HBRUSH value) => new HGDIOBJ(value.Value); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HBRUSH.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HBRUSH.cs deleted file mode 100644 index 91a3acaf..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HBRUSH.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HBRUSH : IComparable, IComparable, IEquatable, IFormattable - { - public readonly void* Value; - - public HBRUSH(void* value) - { - Value = value; - } - - public static HBRUSH INVALID_VALUE => new HBRUSH((void*)(-1)); - - public static HBRUSH NULL => new HBRUSH(null); - - public static bool operator ==(HBRUSH left, HBRUSH right) => left.Value == right.Value; - - public static bool operator !=(HBRUSH left, HBRUSH right) => left.Value != right.Value; - - public static bool operator <(HBRUSH left, HBRUSH right) => left.Value < right.Value; - - public static bool operator <=(HBRUSH left, HBRUSH right) => left.Value <= right.Value; - - public static bool operator >(HBRUSH left, HBRUSH right) => left.Value > right.Value; - - public static bool operator >=(HBRUSH left, HBRUSH right) => left.Value >= right.Value; - - public static explicit operator HBRUSH(void* value) => new HBRUSH(value); - - public static implicit operator void*(HBRUSH value) => value.Value; - - public static explicit operator HBRUSH(HANDLE value) => new HBRUSH(value); - - public static implicit operator HANDLE(HBRUSH value) => new HANDLE(value.Value); - - public static explicit operator HBRUSH(byte value) => new HBRUSH((void*)(value)); - - public static explicit operator byte(HBRUSH value) => (byte)(value.Value); - - public static explicit operator HBRUSH(short value) => new HBRUSH((void*)(value)); - - public static explicit operator short(HBRUSH value) => (short)(value.Value); - - public static explicit operator HBRUSH(int value) => new HBRUSH((void*)(value)); - - public static explicit operator int(HBRUSH value) => (int)(value.Value); - - public static explicit operator HBRUSH(long value) => new HBRUSH((void*)(value)); - - public static explicit operator long(HBRUSH value) => (long)(value.Value); - - public static explicit operator HBRUSH(nint value) => new HBRUSH((void*)(value)); - - public static implicit operator nint(HBRUSH value) => (nint)(value.Value); - - public static explicit operator HBRUSH(sbyte value) => new HBRUSH((void*)(value)); - - public static explicit operator sbyte(HBRUSH value) => (sbyte)(value.Value); - - public static explicit operator HBRUSH(ushort value) => new HBRUSH((void*)(value)); - - public static explicit operator ushort(HBRUSH value) => (ushort)(value.Value); - - public static explicit operator HBRUSH(uint value) => new HBRUSH((void*)(value)); - - public static explicit operator uint(HBRUSH value) => (uint)(value.Value); - - public static explicit operator HBRUSH(ulong value) => new HBRUSH((void*)(value)); - - public static explicit operator ulong(HBRUSH value) => (ulong)(value.Value); - - public static explicit operator HBRUSH(nuint value) => new HBRUSH((void*)(value)); - - public static implicit operator nuint(HBRUSH value) => (nuint)(value.Value); - - public int CompareTo(object? obj) - { - if (obj is HBRUSH other) - { - return CompareTo(other); - } - - return (obj is null) ? 1 : throw new ArgumentException("obj is not an instance of HBRUSH."); - } - - public int CompareTo(HBRUSH other) => ((nuint)(Value)).CompareTo((nuint)(other.Value)); - - public override bool Equals(object? obj) => (obj is HBRUSH other) && Equals(other); - - public bool Equals(HBRUSH other) => ((nuint)(Value)).Equals((nuint)(other.Value)); - - public override int GetHashCode() => ((nuint)(Value)).GetHashCode(); - - public override string ToString() => ((nuint)(Value)).ToString((sizeof(nint) == 4) ? "X8" : "X16"); - - public string ToString(string? format, IFormatProvider? formatProvider) => ((nuint)(Value)).ToString(format, formatProvider); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HCURSOR.Manual.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HCURSOR.Manual.cs deleted file mode 100644 index 1cada4e2..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HCURSOR.Manual.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HCURSOR - { - public static explicit operator HCURSOR(HICON value) => new HCURSOR(value.Value); - - public static implicit operator HICON(HCURSOR value) => new HICON(value.Value); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HCURSOR.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HCURSOR.cs deleted file mode 100644 index 4046d91c..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HCURSOR.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HCURSOR : IComparable, IComparable, IEquatable, IFormattable - { - public readonly void* Value; - - public HCURSOR(void* value) - { - Value = value; - } - - public static HCURSOR INVALID_VALUE => new HCURSOR((void*)(-1)); - - public static HCURSOR NULL => new HCURSOR(null); - - public static bool operator ==(HCURSOR left, HCURSOR right) => left.Value == right.Value; - - public static bool operator !=(HCURSOR left, HCURSOR right) => left.Value != right.Value; - - public static bool operator <(HCURSOR left, HCURSOR right) => left.Value < right.Value; - - public static bool operator <=(HCURSOR left, HCURSOR right) => left.Value <= right.Value; - - public static bool operator >(HCURSOR left, HCURSOR right) => left.Value > right.Value; - - public static bool operator >=(HCURSOR left, HCURSOR right) => left.Value >= right.Value; - - public static explicit operator HCURSOR(void* value) => new HCURSOR(value); - - public static implicit operator void*(HCURSOR value) => value.Value; - - public static explicit operator HCURSOR(HANDLE value) => new HCURSOR(value); - - public static implicit operator HANDLE(HCURSOR value) => new HANDLE(value.Value); - - public static explicit operator HCURSOR(byte value) => new HCURSOR((void*)(value)); - - public static explicit operator byte(HCURSOR value) => (byte)(value.Value); - - public static explicit operator HCURSOR(short value) => new HCURSOR((void*)(value)); - - public static explicit operator short(HCURSOR value) => (short)(value.Value); - - public static explicit operator HCURSOR(int value) => new HCURSOR((void*)(value)); - - public static explicit operator int(HCURSOR value) => (int)(value.Value); - - public static explicit operator HCURSOR(long value) => new HCURSOR((void*)(value)); - - public static explicit operator long(HCURSOR value) => (long)(value.Value); - - public static explicit operator HCURSOR(nint value) => new HCURSOR((void*)(value)); - - public static implicit operator nint(HCURSOR value) => (nint)(value.Value); - - public static explicit operator HCURSOR(sbyte value) => new HCURSOR((void*)(value)); - - public static explicit operator sbyte(HCURSOR value) => (sbyte)(value.Value); - - public static explicit operator HCURSOR(ushort value) => new HCURSOR((void*)(value)); - - public static explicit operator ushort(HCURSOR value) => (ushort)(value.Value); - - public static explicit operator HCURSOR(uint value) => new HCURSOR((void*)(value)); - - public static explicit operator uint(HCURSOR value) => (uint)(value.Value); - - public static explicit operator HCURSOR(ulong value) => new HCURSOR((void*)(value)); - - public static explicit operator ulong(HCURSOR value) => (ulong)(value.Value); - - public static explicit operator HCURSOR(nuint value) => new HCURSOR((void*)(value)); - - public static implicit operator nuint(HCURSOR value) => (nuint)(value.Value); - - public int CompareTo(object? obj) - { - if (obj is HCURSOR other) - { - return CompareTo(other); - } - - return (obj is null) ? 1 : throw new ArgumentException("obj is not an instance of HCURSOR."); - } - - public int CompareTo(HCURSOR other) => ((nuint)(Value)).CompareTo((nuint)(other.Value)); - - public override bool Equals(object? obj) => (obj is HCURSOR other) && Equals(other); - - public bool Equals(HCURSOR other) => ((nuint)(Value)).Equals((nuint)(other.Value)); - - public override int GetHashCode() => ((nuint)(Value)).GetHashCode(); - - public override string ToString() => ((nuint)(Value)).ToString((sizeof(nint) == 4) ? "X8" : "X16"); - - public string ToString(string? format, IFormatProvider? formatProvider) => ((nuint)(Value)).ToString(format, formatProvider); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HDC.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HDC.cs deleted file mode 100644 index 23bd81f8..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HDC.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HDC : IComparable, IComparable, IEquatable, IFormattable - { - public readonly void* Value; - - public HDC(void* value) - { - Value = value; - } - - public static HDC INVALID_VALUE => new HDC((void*)(-1)); - - public static HDC NULL => new HDC(null); - - public static bool operator ==(HDC left, HDC right) => left.Value == right.Value; - - public static bool operator !=(HDC left, HDC right) => left.Value != right.Value; - - public static bool operator <(HDC left, HDC right) => left.Value < right.Value; - - public static bool operator <=(HDC left, HDC right) => left.Value <= right.Value; - - public static bool operator >(HDC left, HDC right) => left.Value > right.Value; - - public static bool operator >=(HDC left, HDC right) => left.Value >= right.Value; - - public static explicit operator HDC(void* value) => new HDC(value); - - public static implicit operator void*(HDC value) => value.Value; - - public static explicit operator HDC(HANDLE value) => new HDC(value); - - public static implicit operator HANDLE(HDC value) => new HANDLE(value.Value); - - public static explicit operator HDC(byte value) => new HDC((void*)(value)); - - public static explicit operator byte(HDC value) => (byte)(value.Value); - - public static explicit operator HDC(short value) => new HDC((void*)(value)); - - public static explicit operator short(HDC value) => (short)(value.Value); - - public static explicit operator HDC(int value) => new HDC((void*)(value)); - - public static explicit operator int(HDC value) => (int)(value.Value); - - public static explicit operator HDC(long value) => new HDC((void*)(value)); - - public static explicit operator long(HDC value) => (long)(value.Value); - - public static explicit operator HDC(nint value) => new HDC((void*)(value)); - - public static implicit operator nint(HDC value) => (nint)(value.Value); - - public static explicit operator HDC(sbyte value) => new HDC((void*)(value)); - - public static explicit operator sbyte(HDC value) => (sbyte)(value.Value); - - public static explicit operator HDC(ushort value) => new HDC((void*)(value)); - - public static explicit operator ushort(HDC value) => (ushort)(value.Value); - - public static explicit operator HDC(uint value) => new HDC((void*)(value)); - - public static explicit operator uint(HDC value) => (uint)(value.Value); - - public static explicit operator HDC(ulong value) => new HDC((void*)(value)); - - public static explicit operator ulong(HDC value) => (ulong)(value.Value); - - public static explicit operator HDC(nuint value) => new HDC((void*)(value)); - - public static implicit operator nuint(HDC value) => (nuint)(value.Value); - - public int CompareTo(object? obj) - { - if (obj is HDC other) - { - return CompareTo(other); - } - - return (obj is null) ? 1 : throw new ArgumentException("obj is not an instance of HDC."); - } - - public int CompareTo(HDC other) => ((nuint)(Value)).CompareTo((nuint)(other.Value)); - - public override bool Equals(object? obj) => (obj is HDC other) && Equals(other); - - public bool Equals(HDC other) => ((nuint)(Value)).Equals((nuint)(other.Value)); - - public override int GetHashCode() => ((nuint)(Value)).GetHashCode(); - - public override string ToString() => ((nuint)(Value)).ToString((sizeof(nint) == 4) ? "X8" : "X16"); - - public string ToString(string? format, IFormatProvider? formatProvider) => ((nuint)(Value)).ToString(format, formatProvider); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HDROP.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HDROP.cs deleted file mode 100644 index 24d3c5c6..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HDROP.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HDROP : IComparable, IComparable, IEquatable, IFormattable - { - public readonly void* Value; - - public HDROP(void* value) - { - Value = value; - } - - public static HDROP INVALID_VALUE => new HDROP((void*)(-1)); - - public static HDROP NULL => new HDROP(null); - - public static bool operator ==(HDROP left, HDROP right) => left.Value == right.Value; - - public static bool operator !=(HDROP left, HDROP right) => left.Value != right.Value; - - public static bool operator <(HDROP left, HDROP right) => left.Value < right.Value; - - public static bool operator <=(HDROP left, HDROP right) => left.Value <= right.Value; - - public static bool operator >(HDROP left, HDROP right) => left.Value > right.Value; - - public static bool operator >=(HDROP left, HDROP right) => left.Value >= right.Value; - - public static explicit operator HDROP(void* value) => new HDROP(value); - - public static implicit operator void*(HDROP value) => value.Value; - - public static explicit operator HDROP(HANDLE value) => new HDROP(value); - - public static implicit operator HANDLE(HDROP value) => new HANDLE(value.Value); - - public static explicit operator HDROP(byte value) => new HDROP((void*)(value)); - - public static explicit operator byte(HDROP value) => (byte)(value.Value); - - public static explicit operator HDROP(short value) => new HDROP((void*)(value)); - - public static explicit operator short(HDROP value) => (short)(value.Value); - - public static explicit operator HDROP(int value) => new HDROP((void*)(value)); - - public static explicit operator int(HDROP value) => (int)(value.Value); - - public static explicit operator HDROP(long value) => new HDROP((void*)(value)); - - public static explicit operator long(HDROP value) => (long)(value.Value); - - public static explicit operator HDROP(nint value) => new HDROP((void*)(value)); - - public static implicit operator nint(HDROP value) => (nint)(value.Value); - - public static explicit operator HDROP(sbyte value) => new HDROP((void*)(value)); - - public static explicit operator sbyte(HDROP value) => (sbyte)(value.Value); - - public static explicit operator HDROP(ushort value) => new HDROP((void*)(value)); - - public static explicit operator ushort(HDROP value) => (ushort)(value.Value); - - public static explicit operator HDROP(uint value) => new HDROP((void*)(value)); - - public static explicit operator uint(HDROP value) => (uint)(value.Value); - - public static explicit operator HDROP(ulong value) => new HDROP((void*)(value)); - - public static explicit operator ulong(HDROP value) => (ulong)(value.Value); - - public static explicit operator HDROP(nuint value) => new HDROP((void*)(value)); - - public static implicit operator nuint(HDROP value) => (nuint)(value.Value); - - public int CompareTo(object? obj) - { - if (obj is HDROP other) - { - return CompareTo(other); - } - - return (obj is null) ? 1 : throw new ArgumentException("obj is not an instance of HDROP."); - } - - public int CompareTo(HDROP other) => ((nuint)(Value)).CompareTo((nuint)(other.Value)); - - public override bool Equals(object? obj) => (obj is HDROP other) && Equals(other); - - public bool Equals(HDROP other) => ((nuint)(Value)).Equals((nuint)(other.Value)); - - public override int GetHashCode() => ((nuint)(Value)).GetHashCode(); - - public override string ToString() => ((nuint)(Value)).ToString((sizeof(nint) == 4) ? "X8" : "X16"); - - public string ToString(string? format, IFormatProvider? formatProvider) => ((nuint)(Value)).ToString(format, formatProvider); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HFONT.Manual.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HFONT.Manual.cs deleted file mode 100644 index b4f7226b..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HFONT.Manual.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HFONT : IEquatable - { - public static explicit operator HFONT(HGDIOBJ value) => new HFONT(value.Value); - - public static implicit operator HGDIOBJ(HFONT value) => new HGDIOBJ(value.Value); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HFONT.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HFONT.cs deleted file mode 100644 index 76b0037a..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HFONT.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HFONT : IComparable, IComparable, IEquatable, IFormattable - { - public readonly void* Value; - - public HFONT(void* value) - { - Value = value; - } - - public static HFONT INVALID_VALUE => new HFONT((void*)(-1)); - - public static HFONT NULL => new HFONT(null); - - public static bool operator ==(HFONT left, HFONT right) => left.Value == right.Value; - - public static bool operator !=(HFONT left, HFONT right) => left.Value != right.Value; - - public static bool operator <(HFONT left, HFONT right) => left.Value < right.Value; - - public static bool operator <=(HFONT left, HFONT right) => left.Value <= right.Value; - - public static bool operator >(HFONT left, HFONT right) => left.Value > right.Value; - - public static bool operator >=(HFONT left, HFONT right) => left.Value >= right.Value; - - public static explicit operator HFONT(void* value) => new HFONT(value); - - public static implicit operator void*(HFONT value) => value.Value; - - public static explicit operator HFONT(HANDLE value) => new HFONT(value); - - public static implicit operator HANDLE(HFONT value) => new HANDLE(value.Value); - - public static explicit operator HFONT(byte value) => new HFONT((void*)(value)); - - public static explicit operator byte(HFONT value) => (byte)(value.Value); - - public static explicit operator HFONT(short value) => new HFONT((void*)(value)); - - public static explicit operator short(HFONT value) => (short)(value.Value); - - public static explicit operator HFONT(int value) => new HFONT((void*)(value)); - - public static explicit operator int(HFONT value) => (int)(value.Value); - - public static explicit operator HFONT(long value) => new HFONT((void*)(value)); - - public static explicit operator long(HFONT value) => (long)(value.Value); - - public static explicit operator HFONT(nint value) => new HFONT((void*)(value)); - - public static implicit operator nint(HFONT value) => (nint)(value.Value); - - public static explicit operator HFONT(sbyte value) => new HFONT((void*)(value)); - - public static explicit operator sbyte(HFONT value) => (sbyte)(value.Value); - - public static explicit operator HFONT(ushort value) => new HFONT((void*)(value)); - - public static explicit operator ushort(HFONT value) => (ushort)(value.Value); - - public static explicit operator HFONT(uint value) => new HFONT((void*)(value)); - - public static explicit operator uint(HFONT value) => (uint)(value.Value); - - public static explicit operator HFONT(ulong value) => new HFONT((void*)(value)); - - public static explicit operator ulong(HFONT value) => (ulong)(value.Value); - - public static explicit operator HFONT(nuint value) => new HFONT((void*)(value)); - - public static implicit operator nuint(HFONT value) => (nuint)(value.Value); - - public int CompareTo(object? obj) - { - if (obj is HFONT other) - { - return CompareTo(other); - } - - return (obj is null) ? 1 : throw new ArgumentException("obj is not an instance of HFONT."); - } - - public int CompareTo(HFONT other) => ((nuint)(Value)).CompareTo((nuint)(other.Value)); - - public override bool Equals(object? obj) => (obj is HFONT other) && Equals(other); - - public bool Equals(HFONT other) => ((nuint)(Value)).Equals((nuint)(other.Value)); - - public override int GetHashCode() => ((nuint)(Value)).GetHashCode(); - - public override string ToString() => ((nuint)(Value)).ToString((sizeof(nint) == 4) ? "X8" : "X16"); - - public string ToString(string? format, IFormatProvider? formatProvider) => ((nuint)(Value)).ToString(format, formatProvider); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HGDIOBJ.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HGDIOBJ.cs deleted file mode 100644 index 2dc3e700..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HGDIOBJ.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HGDIOBJ : IComparable, IComparable, IEquatable, IFormattable - { - public readonly void* Value; - - public HGDIOBJ(void* value) - { - Value = value; - } - - public static HGDIOBJ INVALID_VALUE => new HGDIOBJ((void*)(-1)); - - public static HGDIOBJ NULL => new HGDIOBJ(null); - - public static bool operator ==(HGDIOBJ left, HGDIOBJ right) => left.Value == right.Value; - - public static bool operator !=(HGDIOBJ left, HGDIOBJ right) => left.Value != right.Value; - - public static bool operator <(HGDIOBJ left, HGDIOBJ right) => left.Value < right.Value; - - public static bool operator <=(HGDIOBJ left, HGDIOBJ right) => left.Value <= right.Value; - - public static bool operator >(HGDIOBJ left, HGDIOBJ right) => left.Value > right.Value; - - public static bool operator >=(HGDIOBJ left, HGDIOBJ right) => left.Value >= right.Value; - - public static explicit operator HGDIOBJ(void* value) => new HGDIOBJ(value); - - public static implicit operator void*(HGDIOBJ value) => value.Value; - - public static explicit operator HGDIOBJ(HANDLE value) => new HGDIOBJ(value); - - public static implicit operator HANDLE(HGDIOBJ value) => new HANDLE(value.Value); - - public static explicit operator HGDIOBJ(byte value) => new HGDIOBJ((void*)(value)); - - public static explicit operator byte(HGDIOBJ value) => (byte)(value.Value); - - public static explicit operator HGDIOBJ(short value) => new HGDIOBJ((void*)(value)); - - public static explicit operator short(HGDIOBJ value) => (short)(value.Value); - - public static explicit operator HGDIOBJ(int value) => new HGDIOBJ((void*)(value)); - - public static explicit operator int(HGDIOBJ value) => (int)(value.Value); - - public static explicit operator HGDIOBJ(long value) => new HGDIOBJ((void*)(value)); - - public static explicit operator long(HGDIOBJ value) => (long)(value.Value); - - public static explicit operator HGDIOBJ(nint value) => new HGDIOBJ((void*)(value)); - - public static implicit operator nint(HGDIOBJ value) => (nint)(value.Value); - - public static explicit operator HGDIOBJ(sbyte value) => new HGDIOBJ((void*)(value)); - - public static explicit operator sbyte(HGDIOBJ value) => (sbyte)(value.Value); - - public static explicit operator HGDIOBJ(ushort value) => new HGDIOBJ((void*)(value)); - - public static explicit operator ushort(HGDIOBJ value) => (ushort)(value.Value); - - public static explicit operator HGDIOBJ(uint value) => new HGDIOBJ((void*)(value)); - - public static explicit operator uint(HGDIOBJ value) => (uint)(value.Value); - - public static explicit operator HGDIOBJ(ulong value) => new HGDIOBJ((void*)(value)); - - public static explicit operator ulong(HGDIOBJ value) => (ulong)(value.Value); - - public static explicit operator HGDIOBJ(nuint value) => new HGDIOBJ((void*)(value)); - - public static implicit operator nuint(HGDIOBJ value) => (nuint)(value.Value); - - public int CompareTo(object? obj) - { - if (obj is HGDIOBJ other) - { - return CompareTo(other); - } - - return (obj is null) ? 1 : throw new ArgumentException("obj is not an instance of HGDIOBJ."); - } - - public int CompareTo(HGDIOBJ other) => ((nuint)(Value)).CompareTo((nuint)(other.Value)); - - public override bool Equals(object? obj) => (obj is HGDIOBJ other) && Equals(other); - - public bool Equals(HGDIOBJ other) => ((nuint)(Value)).Equals((nuint)(other.Value)); - - public override int GetHashCode() => ((nuint)(Value)).GetHashCode(); - - public override string ToString() => ((nuint)(Value)).ToString((sizeof(nint) == 4) ? "X8" : "X16"); - - public string ToString(string? format, IFormatProvider? formatProvider) => ((nuint)(Value)).ToString(format, formatProvider); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HGLOBAL.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HGLOBAL.cs deleted file mode 100644 index 20111cfe..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HGLOBAL.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HGLOBAL : IComparable, IComparable, IEquatable, IFormattable - { - public readonly void* Value; - - public HGLOBAL(void* value) - { - Value = value; - } - - public static HGLOBAL INVALID_VALUE => new HGLOBAL((void*)(-1)); - - public static HGLOBAL NULL => new HGLOBAL(null); - - public static bool operator ==(HGLOBAL left, HGLOBAL right) => left.Value == right.Value; - - public static bool operator !=(HGLOBAL left, HGLOBAL right) => left.Value != right.Value; - - public static bool operator <(HGLOBAL left, HGLOBAL right) => left.Value < right.Value; - - public static bool operator <=(HGLOBAL left, HGLOBAL right) => left.Value <= right.Value; - - public static bool operator >(HGLOBAL left, HGLOBAL right) => left.Value > right.Value; - - public static bool operator >=(HGLOBAL left, HGLOBAL right) => left.Value >= right.Value; - - public static explicit operator HGLOBAL(void* value) => new HGLOBAL(value); - - public static implicit operator void*(HGLOBAL value) => value.Value; - - public static explicit operator HGLOBAL(HANDLE value) => new HGLOBAL(value); - - public static implicit operator HANDLE(HGLOBAL value) => new HANDLE(value.Value); - - public static explicit operator HGLOBAL(byte value) => new HGLOBAL((void*)(value)); - - public static explicit operator byte(HGLOBAL value) => (byte)(value.Value); - - public static explicit operator HGLOBAL(short value) => new HGLOBAL((void*)(value)); - - public static explicit operator short(HGLOBAL value) => (short)(value.Value); - - public static explicit operator HGLOBAL(int value) => new HGLOBAL((void*)(value)); - - public static explicit operator int(HGLOBAL value) => (int)(value.Value); - - public static explicit operator HGLOBAL(long value) => new HGLOBAL((void*)(value)); - - public static explicit operator long(HGLOBAL value) => (long)(value.Value); - - public static explicit operator HGLOBAL(nint value) => new HGLOBAL((void*)(value)); - - public static implicit operator nint(HGLOBAL value) => (nint)(value.Value); - - public static explicit operator HGLOBAL(sbyte value) => new HGLOBAL((void*)(value)); - - public static explicit operator sbyte(HGLOBAL value) => (sbyte)(value.Value); - - public static explicit operator HGLOBAL(ushort value) => new HGLOBAL((void*)(value)); - - public static explicit operator ushort(HGLOBAL value) => (ushort)(value.Value); - - public static explicit operator HGLOBAL(uint value) => new HGLOBAL((void*)(value)); - - public static explicit operator uint(HGLOBAL value) => (uint)(value.Value); - - public static explicit operator HGLOBAL(ulong value) => new HGLOBAL((void*)(value)); - - public static explicit operator ulong(HGLOBAL value) => (ulong)(value.Value); - - public static explicit operator HGLOBAL(nuint value) => new HGLOBAL((void*)(value)); - - public static implicit operator nuint(HGLOBAL value) => (nuint)(value.Value); - - public int CompareTo(object? obj) - { - if (obj is HGLOBAL other) - { - return CompareTo(other); - } - - return (obj is null) ? 1 : throw new ArgumentException("obj is not an instance of HGLOBAL."); - } - - public int CompareTo(HGLOBAL other) => ((nuint)(Value)).CompareTo((nuint)(other.Value)); - - public override bool Equals(object? obj) => (obj is HGLOBAL other) && Equals(other); - - public bool Equals(HGLOBAL other) => ((nuint)(Value)).Equals((nuint)(other.Value)); - - public override int GetHashCode() => ((nuint)(Value)).GetHashCode(); - - public override string ToString() => ((nuint)(Value)).ToString((sizeof(nint) == 4) ? "X8" : "X16"); - - public string ToString(string? format, IFormatProvider? formatProvider) => ((nuint)(Value)).ToString(format, formatProvider); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HICON.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HICON.cs deleted file mode 100644 index bddcbd25..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HICON.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HICON : IComparable, IComparable, IEquatable, IFormattable - { - public readonly void* Value; - - public HICON(void* value) - { - Value = value; - } - - public static HICON INVALID_VALUE => new HICON((void*)(-1)); - - public static HICON NULL => new HICON(null); - - public static bool operator ==(HICON left, HICON right) => left.Value == right.Value; - - public static bool operator !=(HICON left, HICON right) => left.Value != right.Value; - - public static bool operator <(HICON left, HICON right) => left.Value < right.Value; - - public static bool operator <=(HICON left, HICON right) => left.Value <= right.Value; - - public static bool operator >(HICON left, HICON right) => left.Value > right.Value; - - public static bool operator >=(HICON left, HICON right) => left.Value >= right.Value; - - public static explicit operator HICON(void* value) => new HICON(value); - - public static implicit operator void*(HICON value) => value.Value; - - public static explicit operator HICON(HANDLE value) => new HICON(value); - - public static implicit operator HANDLE(HICON value) => new HANDLE(value.Value); - - public static explicit operator HICON(byte value) => new HICON((void*)(value)); - - public static explicit operator byte(HICON value) => (byte)(value.Value); - - public static explicit operator HICON(short value) => new HICON((void*)(value)); - - public static explicit operator short(HICON value) => (short)(value.Value); - - public static explicit operator HICON(int value) => new HICON((void*)(value)); - - public static explicit operator int(HICON value) => (int)(value.Value); - - public static explicit operator HICON(long value) => new HICON((void*)(value)); - - public static explicit operator long(HICON value) => (long)(value.Value); - - public static explicit operator HICON(nint value) => new HICON((void*)(value)); - - public static implicit operator nint(HICON value) => (nint)(value.Value); - - public static explicit operator HICON(sbyte value) => new HICON((void*)(value)); - - public static explicit operator sbyte(HICON value) => (sbyte)(value.Value); - - public static explicit operator HICON(ushort value) => new HICON((void*)(value)); - - public static explicit operator ushort(HICON value) => (ushort)(value.Value); - - public static explicit operator HICON(uint value) => new HICON((void*)(value)); - - public static explicit operator uint(HICON value) => (uint)(value.Value); - - public static explicit operator HICON(ulong value) => new HICON((void*)(value)); - - public static explicit operator ulong(HICON value) => (ulong)(value.Value); - - public static explicit operator HICON(nuint value) => new HICON((void*)(value)); - - public static implicit operator nuint(HICON value) => (nuint)(value.Value); - - public int CompareTo(object? obj) - { - if (obj is HICON other) - { - return CompareTo(other); - } - - return (obj is null) ? 1 : throw new ArgumentException("obj is not an instance of HICON."); - } - - public int CompareTo(HICON other) => ((nuint)(Value)).CompareTo((nuint)(other.Value)); - - public override bool Equals(object? obj) => (obj is HICON other) && Equals(other); - - public bool Equals(HICON other) => ((nuint)(Value)).Equals((nuint)(other.Value)); - - public override int GetHashCode() => ((nuint)(Value)).GetHashCode(); - - public override string ToString() => ((nuint)(Value)).ToString((sizeof(nint) == 4) ? "X8" : "X16"); - - public string ToString(string? format, IFormatProvider? formatProvider) => ((nuint)(Value)).ToString(format, formatProvider); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HINSTANCE.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HINSTANCE.cs deleted file mode 100644 index e6552817..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HINSTANCE.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HINSTANCE : IComparable, IComparable, IEquatable, IFormattable - { - public readonly void* Value; - - public HINSTANCE(void* value) - { - Value = value; - } - - public static HINSTANCE INVALID_VALUE => new HINSTANCE((void*)(-1)); - - public static HINSTANCE NULL => new HINSTANCE(null); - - public static bool operator ==(HINSTANCE left, HINSTANCE right) => left.Value == right.Value; - - public static bool operator !=(HINSTANCE left, HINSTANCE right) => left.Value != right.Value; - - public static bool operator <(HINSTANCE left, HINSTANCE right) => left.Value < right.Value; - - public static bool operator <=(HINSTANCE left, HINSTANCE right) => left.Value <= right.Value; - - public static bool operator >(HINSTANCE left, HINSTANCE right) => left.Value > right.Value; - - public static bool operator >=(HINSTANCE left, HINSTANCE right) => left.Value >= right.Value; - - public static explicit operator HINSTANCE(void* value) => new HINSTANCE(value); - - public static implicit operator void*(HINSTANCE value) => value.Value; - - public static explicit operator HINSTANCE(HANDLE value) => new HINSTANCE(value); - - public static implicit operator HANDLE(HINSTANCE value) => new HANDLE(value.Value); - - public static explicit operator HINSTANCE(byte value) => new HINSTANCE((void*)(value)); - - public static explicit operator byte(HINSTANCE value) => (byte)(value.Value); - - public static explicit operator HINSTANCE(short value) => new HINSTANCE((void*)(value)); - - public static explicit operator short(HINSTANCE value) => (short)(value.Value); - - public static explicit operator HINSTANCE(int value) => new HINSTANCE((void*)(value)); - - public static explicit operator int(HINSTANCE value) => (int)(value.Value); - - public static explicit operator HINSTANCE(long value) => new HINSTANCE((void*)(value)); - - public static explicit operator long(HINSTANCE value) => (long)(value.Value); - - public static explicit operator HINSTANCE(nint value) => new HINSTANCE((void*)(value)); - - public static implicit operator nint(HINSTANCE value) => (nint)(value.Value); - - public static explicit operator HINSTANCE(sbyte value) => new HINSTANCE((void*)(value)); - - public static explicit operator sbyte(HINSTANCE value) => (sbyte)(value.Value); - - public static explicit operator HINSTANCE(ushort value) => new HINSTANCE((void*)(value)); - - public static explicit operator ushort(HINSTANCE value) => (ushort)(value.Value); - - public static explicit operator HINSTANCE(uint value) => new HINSTANCE((void*)(value)); - - public static explicit operator uint(HINSTANCE value) => (uint)(value.Value); - - public static explicit operator HINSTANCE(ulong value) => new HINSTANCE((void*)(value)); - - public static explicit operator ulong(HINSTANCE value) => (ulong)(value.Value); - - public static explicit operator HINSTANCE(nuint value) => new HINSTANCE((void*)(value)); - - public static implicit operator nuint(HINSTANCE value) => (nuint)(value.Value); - - public int CompareTo(object? obj) - { - if (obj is HINSTANCE other) - { - return CompareTo(other); - } - - return (obj is null) ? 1 : throw new ArgumentException("obj is not an instance of HINSTANCE."); - } - - public int CompareTo(HINSTANCE other) => ((nuint)(Value)).CompareTo((nuint)(other.Value)); - - public override bool Equals(object? obj) => (obj is HINSTANCE other) && Equals(other); - - public bool Equals(HINSTANCE other) => ((nuint)(Value)).Equals((nuint)(other.Value)); - - public override int GetHashCode() => ((nuint)(Value)).GetHashCode(); - - public override string ToString() => ((nuint)(Value)).ToString((sizeof(nint) == 4) ? "X8" : "X16"); - - public string ToString(string? format, IFormatProvider? formatProvider) => ((nuint)(Value)).ToString(format, formatProvider); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HLOCAL.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HLOCAL.cs deleted file mode 100644 index 941b69a6..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HLOCAL.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HLOCAL : IComparable, IComparable, IEquatable, IFormattable - { - public readonly void* Value; - - public HLOCAL(void* value) - { - Value = value; - } - - public static HLOCAL INVALID_VALUE => new HLOCAL((void*)(-1)); - - public static HLOCAL NULL => new HLOCAL(null); - - public static bool operator ==(HLOCAL left, HLOCAL right) => left.Value == right.Value; - - public static bool operator !=(HLOCAL left, HLOCAL right) => left.Value != right.Value; - - public static bool operator <(HLOCAL left, HLOCAL right) => left.Value < right.Value; - - public static bool operator <=(HLOCAL left, HLOCAL right) => left.Value <= right.Value; - - public static bool operator >(HLOCAL left, HLOCAL right) => left.Value > right.Value; - - public static bool operator >=(HLOCAL left, HLOCAL right) => left.Value >= right.Value; - - public static explicit operator HLOCAL(void* value) => new HLOCAL(value); - - public static implicit operator void*(HLOCAL value) => value.Value; - - public static explicit operator HLOCAL(HANDLE value) => new HLOCAL(value); - - public static implicit operator HANDLE(HLOCAL value) => new HANDLE(value.Value); - - public static explicit operator HLOCAL(byte value) => new HLOCAL((void*)(value)); - - public static explicit operator byte(HLOCAL value) => (byte)(value.Value); - - public static explicit operator HLOCAL(short value) => new HLOCAL((void*)(value)); - - public static explicit operator short(HLOCAL value) => (short)(value.Value); - - public static explicit operator HLOCAL(int value) => new HLOCAL((void*)(value)); - - public static explicit operator int(HLOCAL value) => (int)(value.Value); - - public static explicit operator HLOCAL(long value) => new HLOCAL((void*)(value)); - - public static explicit operator long(HLOCAL value) => (long)(value.Value); - - public static explicit operator HLOCAL(nint value) => new HLOCAL((void*)(value)); - - public static implicit operator nint(HLOCAL value) => (nint)(value.Value); - - public static explicit operator HLOCAL(sbyte value) => new HLOCAL((void*)(value)); - - public static explicit operator sbyte(HLOCAL value) => (sbyte)(value.Value); - - public static explicit operator HLOCAL(ushort value) => new HLOCAL((void*)(value)); - - public static explicit operator ushort(HLOCAL value) => (ushort)(value.Value); - - public static explicit operator HLOCAL(uint value) => new HLOCAL((void*)(value)); - - public static explicit operator uint(HLOCAL value) => (uint)(value.Value); - - public static explicit operator HLOCAL(ulong value) => new HLOCAL((void*)(value)); - - public static explicit operator ulong(HLOCAL value) => (ulong)(value.Value); - - public static explicit operator HLOCAL(nuint value) => new HLOCAL((void*)(value)); - - public static implicit operator nuint(HLOCAL value) => (nuint)(value.Value); - - public int CompareTo(object? obj) - { - if (obj is HLOCAL other) - { - return CompareTo(other); - } - - return (obj is null) ? 1 : throw new ArgumentException("obj is not an instance of HLOCAL."); - } - - public int CompareTo(HLOCAL other) => ((nuint)(Value)).CompareTo((nuint)(other.Value)); - - public override bool Equals(object? obj) => (obj is HLOCAL other) && Equals(other); - - public bool Equals(HLOCAL other) => ((nuint)(Value)).Equals((nuint)(other.Value)); - - public override int GetHashCode() => ((nuint)(Value)).GetHashCode(); - - public override string ToString() => ((nuint)(Value)).ToString((sizeof(nint) == 4) ? "X8" : "X16"); - - public string ToString(string? format, IFormatProvider? formatProvider) => ((nuint)(Value)).ToString(format, formatProvider); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HMENU.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HMENU.cs deleted file mode 100644 index 5dc8b706..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HMENU.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HMENU : IComparable, IComparable, IEquatable, IFormattable - { - public readonly void* Value; - - public HMENU(void* value) - { - Value = value; - } - - public static HMENU INVALID_VALUE => new HMENU((void*)(-1)); - - public static HMENU NULL => new HMENU(null); - - public static bool operator ==(HMENU left, HMENU right) => left.Value == right.Value; - - public static bool operator !=(HMENU left, HMENU right) => left.Value != right.Value; - - public static bool operator <(HMENU left, HMENU right) => left.Value < right.Value; - - public static bool operator <=(HMENU left, HMENU right) => left.Value <= right.Value; - - public static bool operator >(HMENU left, HMENU right) => left.Value > right.Value; - - public static bool operator >=(HMENU left, HMENU right) => left.Value >= right.Value; - - public static explicit operator HMENU(void* value) => new HMENU(value); - - public static implicit operator void*(HMENU value) => value.Value; - - public static explicit operator HMENU(HANDLE value) => new HMENU(value); - - public static implicit operator HANDLE(HMENU value) => new HANDLE(value.Value); - - public static explicit operator HMENU(byte value) => new HMENU((void*)(value)); - - public static explicit operator byte(HMENU value) => (byte)(value.Value); - - public static explicit operator HMENU(short value) => new HMENU((void*)(value)); - - public static explicit operator short(HMENU value) => (short)(value.Value); - - public static explicit operator HMENU(int value) => new HMENU((void*)(value)); - - public static explicit operator int(HMENU value) => (int)(value.Value); - - public static explicit operator HMENU(long value) => new HMENU((void*)(value)); - - public static explicit operator long(HMENU value) => (long)(value.Value); - - public static explicit operator HMENU(nint value) => new HMENU((void*)(value)); - - public static implicit operator nint(HMENU value) => (nint)(value.Value); - - public static explicit operator HMENU(sbyte value) => new HMENU((void*)(value)); - - public static explicit operator sbyte(HMENU value) => (sbyte)(value.Value); - - public static explicit operator HMENU(ushort value) => new HMENU((void*)(value)); - - public static explicit operator ushort(HMENU value) => (ushort)(value.Value); - - public static explicit operator HMENU(uint value) => new HMENU((void*)(value)); - - public static explicit operator uint(HMENU value) => (uint)(value.Value); - - public static explicit operator HMENU(ulong value) => new HMENU((void*)(value)); - - public static explicit operator ulong(HMENU value) => (ulong)(value.Value); - - public static explicit operator HMENU(nuint value) => new HMENU((void*)(value)); - - public static implicit operator nuint(HMENU value) => (nuint)(value.Value); - - public int CompareTo(object? obj) - { - if (obj is HMENU other) - { - return CompareTo(other); - } - - return (obj is null) ? 1 : throw new ArgumentException("obj is not an instance of HMENU."); - } - - public int CompareTo(HMENU other) => ((nuint)(Value)).CompareTo((nuint)(other.Value)); - - public override bool Equals(object? obj) => (obj is HMENU other) && Equals(other); - - public bool Equals(HMENU other) => ((nuint)(Value)).Equals((nuint)(other.Value)); - - public override int GetHashCode() => ((nuint)(Value)).GetHashCode(); - - public override string ToString() => ((nuint)(Value)).ToString((sizeof(nint) == 4) ? "X8" : "X16"); - - public string ToString(string? format, IFormatProvider? formatProvider) => ((nuint)(Value)).ToString(format, formatProvider); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HMODULE.Manual.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HMODULE.Manual.cs deleted file mode 100644 index ae16d839..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HMODULE.Manual.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HMODULE - { - public static explicit operator HMODULE(HINSTANCE value) => new HMODULE(value.Value); - - public static implicit operator HINSTANCE(HMODULE value) => new HINSTANCE(value.Value); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HMODULE.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HMODULE.cs deleted file mode 100644 index 124e5d7e..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HMODULE.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HMODULE : IComparable, IComparable, IEquatable, IFormattable - { - public readonly void* Value; - - public HMODULE(void* value) - { - Value = value; - } - - public static HMODULE INVALID_VALUE => new HMODULE((void*)(-1)); - - public static HMODULE NULL => new HMODULE(null); - - public static bool operator ==(HMODULE left, HMODULE right) => left.Value == right.Value; - - public static bool operator !=(HMODULE left, HMODULE right) => left.Value != right.Value; - - public static bool operator <(HMODULE left, HMODULE right) => left.Value < right.Value; - - public static bool operator <=(HMODULE left, HMODULE right) => left.Value <= right.Value; - - public static bool operator >(HMODULE left, HMODULE right) => left.Value > right.Value; - - public static bool operator >=(HMODULE left, HMODULE right) => left.Value >= right.Value; - - public static explicit operator HMODULE(void* value) => new HMODULE(value); - - public static implicit operator void*(HMODULE value) => value.Value; - - public static explicit operator HMODULE(HANDLE value) => new HMODULE(value); - - public static implicit operator HANDLE(HMODULE value) => new HANDLE(value.Value); - - public static explicit operator HMODULE(byte value) => new HMODULE((void*)(value)); - - public static explicit operator byte(HMODULE value) => (byte)(value.Value); - - public static explicit operator HMODULE(short value) => new HMODULE((void*)(value)); - - public static explicit operator short(HMODULE value) => (short)(value.Value); - - public static explicit operator HMODULE(int value) => new HMODULE((void*)(value)); - - public static explicit operator int(HMODULE value) => (int)(value.Value); - - public static explicit operator HMODULE(long value) => new HMODULE((void*)(value)); - - public static explicit operator long(HMODULE value) => (long)(value.Value); - - public static explicit operator HMODULE(nint value) => new HMODULE((void*)(value)); - - public static implicit operator nint(HMODULE value) => (nint)(value.Value); - - public static explicit operator HMODULE(sbyte value) => new HMODULE((void*)(value)); - - public static explicit operator sbyte(HMODULE value) => (sbyte)(value.Value); - - public static explicit operator HMODULE(ushort value) => new HMODULE((void*)(value)); - - public static explicit operator ushort(HMODULE value) => (ushort)(value.Value); - - public static explicit operator HMODULE(uint value) => new HMODULE((void*)(value)); - - public static explicit operator uint(HMODULE value) => (uint)(value.Value); - - public static explicit operator HMODULE(ulong value) => new HMODULE((void*)(value)); - - public static explicit operator ulong(HMODULE value) => (ulong)(value.Value); - - public static explicit operator HMODULE(nuint value) => new HMODULE((void*)(value)); - - public static implicit operator nuint(HMODULE value) => (nuint)(value.Value); - - public int CompareTo(object? obj) - { - if (obj is HMODULE other) - { - return CompareTo(other); - } - - return (obj is null) ? 1 : throw new ArgumentException("obj is not an instance of HMODULE."); - } - - public int CompareTo(HMODULE other) => ((nuint)(Value)).CompareTo((nuint)(other.Value)); - - public override bool Equals(object? obj) => (obj is HMODULE other) && Equals(other); - - public bool Equals(HMODULE other) => ((nuint)(Value)).Equals((nuint)(other.Value)); - - public override int GetHashCode() => ((nuint)(Value)).GetHashCode(); - - public override string ToString() => ((nuint)(Value)).ToString((sizeof(nint) == 4) ? "X8" : "X16"); - - public string ToString(string? format, IFormatProvider? formatProvider) => ((nuint)(Value)).ToString(format, formatProvider); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HMONITOR.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HMONITOR.cs deleted file mode 100644 index a0a0852d..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HMONITOR.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HMONITOR : IComparable, IComparable, IEquatable, IFormattable - { - public readonly void* Value; - - public HMONITOR(void* value) - { - Value = value; - } - - public static HMONITOR INVALID_VALUE => new HMONITOR((void*)(-1)); - - public static HMONITOR NULL => new HMONITOR(null); - - public static bool operator ==(HMONITOR left, HMONITOR right) => left.Value == right.Value; - - public static bool operator !=(HMONITOR left, HMONITOR right) => left.Value != right.Value; - - public static bool operator <(HMONITOR left, HMONITOR right) => left.Value < right.Value; - - public static bool operator <=(HMONITOR left, HMONITOR right) => left.Value <= right.Value; - - public static bool operator >(HMONITOR left, HMONITOR right) => left.Value > right.Value; - - public static bool operator >=(HMONITOR left, HMONITOR right) => left.Value >= right.Value; - - public static explicit operator HMONITOR(void* value) => new HMONITOR(value); - - public static implicit operator void*(HMONITOR value) => value.Value; - - public static explicit operator HMONITOR(HANDLE value) => new HMONITOR(value); - - public static implicit operator HANDLE(HMONITOR value) => new HANDLE(value.Value); - - public static explicit operator HMONITOR(byte value) => new HMONITOR((void*)(value)); - - public static explicit operator byte(HMONITOR value) => (byte)(value.Value); - - public static explicit operator HMONITOR(short value) => new HMONITOR((void*)(value)); - - public static explicit operator short(HMONITOR value) => (short)(value.Value); - - public static explicit operator HMONITOR(int value) => new HMONITOR((void*)(value)); - - public static explicit operator int(HMONITOR value) => (int)(value.Value); - - public static explicit operator HMONITOR(long value) => new HMONITOR((void*)(value)); - - public static explicit operator long(HMONITOR value) => (long)(value.Value); - - public static explicit operator HMONITOR(nint value) => new HMONITOR((void*)(value)); - - public static implicit operator nint(HMONITOR value) => (nint)(value.Value); - - public static explicit operator HMONITOR(sbyte value) => new HMONITOR((void*)(value)); - - public static explicit operator sbyte(HMONITOR value) => (sbyte)(value.Value); - - public static explicit operator HMONITOR(ushort value) => new HMONITOR((void*)(value)); - - public static explicit operator ushort(HMONITOR value) => (ushort)(value.Value); - - public static explicit operator HMONITOR(uint value) => new HMONITOR((void*)(value)); - - public static explicit operator uint(HMONITOR value) => (uint)(value.Value); - - public static explicit operator HMONITOR(ulong value) => new HMONITOR((void*)(value)); - - public static explicit operator ulong(HMONITOR value) => (ulong)(value.Value); - - public static explicit operator HMONITOR(nuint value) => new HMONITOR((void*)(value)); - - public static implicit operator nuint(HMONITOR value) => (nuint)(value.Value); - - public int CompareTo(object? obj) - { - if (obj is HMONITOR other) - { - return CompareTo(other); - } - - return (obj is null) ? 1 : throw new ArgumentException("obj is not an instance of HMONITOR."); - } - - public int CompareTo(HMONITOR other) => ((nuint)(Value)).CompareTo((nuint)(other.Value)); - - public override bool Equals(object? obj) => (obj is HMONITOR other) && Equals(other); - - public bool Equals(HMONITOR other) => ((nuint)(Value)).Equals((nuint)(other.Value)); - - public override int GetHashCode() => ((nuint)(Value)).GetHashCode(); - - public override string ToString() => ((nuint)(Value)).ToString((sizeof(nint) == 4) ? "X8" : "X16"); - - public string ToString(string? format, IFormatProvider? formatProvider) => ((nuint)(Value)).ToString(format, formatProvider); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HPALETTE.Manual.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HPALETTE.Manual.cs deleted file mode 100644 index 56fbd138..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HPALETTE.Manual.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HPALETTE : IEquatable - { - public static explicit operator HPALETTE(HGDIOBJ value) => new HPALETTE(value.Value); - - public static implicit operator HGDIOBJ(HPALETTE value) => new HGDIOBJ(value.Value); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HPALETTE.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HPALETTE.cs deleted file mode 100644 index 1e27153a..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HPALETTE.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HPALETTE : IComparable, IComparable, IEquatable, IFormattable - { - public readonly void* Value; - - public HPALETTE(void* value) - { - Value = value; - } - - public static HPALETTE INVALID_VALUE => new HPALETTE((void*)(-1)); - - public static HPALETTE NULL => new HPALETTE(null); - - public static bool operator ==(HPALETTE left, HPALETTE right) => left.Value == right.Value; - - public static bool operator !=(HPALETTE left, HPALETTE right) => left.Value != right.Value; - - public static bool operator <(HPALETTE left, HPALETTE right) => left.Value < right.Value; - - public static bool operator <=(HPALETTE left, HPALETTE right) => left.Value <= right.Value; - - public static bool operator >(HPALETTE left, HPALETTE right) => left.Value > right.Value; - - public static bool operator >=(HPALETTE left, HPALETTE right) => left.Value >= right.Value; - - public static explicit operator HPALETTE(void* value) => new HPALETTE(value); - - public static implicit operator void*(HPALETTE value) => value.Value; - - public static explicit operator HPALETTE(HANDLE value) => new HPALETTE(value); - - public static implicit operator HANDLE(HPALETTE value) => new HANDLE(value.Value); - - public static explicit operator HPALETTE(byte value) => new HPALETTE((void*)(value)); - - public static explicit operator byte(HPALETTE value) => (byte)(value.Value); - - public static explicit operator HPALETTE(short value) => new HPALETTE((void*)(value)); - - public static explicit operator short(HPALETTE value) => (short)(value.Value); - - public static explicit operator HPALETTE(int value) => new HPALETTE((void*)(value)); - - public static explicit operator int(HPALETTE value) => (int)(value.Value); - - public static explicit operator HPALETTE(long value) => new HPALETTE((void*)(value)); - - public static explicit operator long(HPALETTE value) => (long)(value.Value); - - public static explicit operator HPALETTE(nint value) => new HPALETTE((void*)(value)); - - public static implicit operator nint(HPALETTE value) => (nint)(value.Value); - - public static explicit operator HPALETTE(sbyte value) => new HPALETTE((void*)(value)); - - public static explicit operator sbyte(HPALETTE value) => (sbyte)(value.Value); - - public static explicit operator HPALETTE(ushort value) => new HPALETTE((void*)(value)); - - public static explicit operator ushort(HPALETTE value) => (ushort)(value.Value); - - public static explicit operator HPALETTE(uint value) => new HPALETTE((void*)(value)); - - public static explicit operator uint(HPALETTE value) => (uint)(value.Value); - - public static explicit operator HPALETTE(ulong value) => new HPALETTE((void*)(value)); - - public static explicit operator ulong(HPALETTE value) => (ulong)(value.Value); - - public static explicit operator HPALETTE(nuint value) => new HPALETTE((void*)(value)); - - public static implicit operator nuint(HPALETTE value) => (nuint)(value.Value); - - public int CompareTo(object? obj) - { - if (obj is HPALETTE other) - { - return CompareTo(other); - } - - return (obj is null) ? 1 : throw new ArgumentException("obj is not an instance of HPALETTE."); - } - - public int CompareTo(HPALETTE other) => ((nuint)(Value)).CompareTo((nuint)(other.Value)); - - public override bool Equals(object? obj) => (obj is HPALETTE other) && Equals(other); - - public bool Equals(HPALETTE other) => ((nuint)(Value)).Equals((nuint)(other.Value)); - - public override int GetHashCode() => ((nuint)(Value)).GetHashCode(); - - public override string ToString() => ((nuint)(Value)).ToString((sizeof(nint) == 4) ? "X8" : "X16"); - - public string ToString(string? format, IFormatProvider? formatProvider) => ((nuint)(Value)).ToString(format, formatProvider); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HPEN.Manual.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HPEN.Manual.cs deleted file mode 100644 index 475bce37..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HPEN.Manual.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HPEN : IEquatable - { - public static explicit operator HPEN(HGDIOBJ value) => new HPEN(value.Value); - - public static implicit operator HGDIOBJ(HPEN value) => new HGDIOBJ(value.Value); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HPEN.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HPEN.cs deleted file mode 100644 index e2e7a25c..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HPEN.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HPEN : IComparable, IComparable, IEquatable, IFormattable - { - public readonly void* Value; - - public HPEN(void* value) - { - Value = value; - } - - public static HPEN INVALID_VALUE => new HPEN((void*)(-1)); - - public static HPEN NULL => new HPEN(null); - - public static bool operator ==(HPEN left, HPEN right) => left.Value == right.Value; - - public static bool operator !=(HPEN left, HPEN right) => left.Value != right.Value; - - public static bool operator <(HPEN left, HPEN right) => left.Value < right.Value; - - public static bool operator <=(HPEN left, HPEN right) => left.Value <= right.Value; - - public static bool operator >(HPEN left, HPEN right) => left.Value > right.Value; - - public static bool operator >=(HPEN left, HPEN right) => left.Value >= right.Value; - - public static explicit operator HPEN(void* value) => new HPEN(value); - - public static implicit operator void*(HPEN value) => value.Value; - - public static explicit operator HPEN(HANDLE value) => new HPEN(value); - - public static implicit operator HANDLE(HPEN value) => new HANDLE(value.Value); - - public static explicit operator HPEN(byte value) => new HPEN((void*)(value)); - - public static explicit operator byte(HPEN value) => (byte)(value.Value); - - public static explicit operator HPEN(short value) => new HPEN((void*)(value)); - - public static explicit operator short(HPEN value) => (short)(value.Value); - - public static explicit operator HPEN(int value) => new HPEN((void*)(value)); - - public static explicit operator int(HPEN value) => (int)(value.Value); - - public static explicit operator HPEN(long value) => new HPEN((void*)(value)); - - public static explicit operator long(HPEN value) => (long)(value.Value); - - public static explicit operator HPEN(nint value) => new HPEN((void*)(value)); - - public static implicit operator nint(HPEN value) => (nint)(value.Value); - - public static explicit operator HPEN(sbyte value) => new HPEN((void*)(value)); - - public static explicit operator sbyte(HPEN value) => (sbyte)(value.Value); - - public static explicit operator HPEN(ushort value) => new HPEN((void*)(value)); - - public static explicit operator ushort(HPEN value) => (ushort)(value.Value); - - public static explicit operator HPEN(uint value) => new HPEN((void*)(value)); - - public static explicit operator uint(HPEN value) => (uint)(value.Value); - - public static explicit operator HPEN(ulong value) => new HPEN((void*)(value)); - - public static explicit operator ulong(HPEN value) => (ulong)(value.Value); - - public static explicit operator HPEN(nuint value) => new HPEN((void*)(value)); - - public static implicit operator nuint(HPEN value) => (nuint)(value.Value); - - public int CompareTo(object? obj) - { - if (obj is HPEN other) - { - return CompareTo(other); - } - - return (obj is null) ? 1 : throw new ArgumentException("obj is not an instance of HPEN."); - } - - public int CompareTo(HPEN other) => ((nuint)(Value)).CompareTo((nuint)(other.Value)); - - public override bool Equals(object? obj) => (obj is HPEN other) && Equals(other); - - public bool Equals(HPEN other) => ((nuint)(Value)).Equals((nuint)(other.Value)); - - public override int GetHashCode() => ((nuint)(Value)).GetHashCode(); - - public override string ToString() => ((nuint)(Value)).ToString((sizeof(nint) == 4) ? "X8" : "X16"); - - public string ToString(string? format, IFormatProvider? formatProvider) => ((nuint)(Value)).ToString(format, formatProvider); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HRESULT.Manual.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HRESULT.Manual.cs deleted file mode 100644 index 4df7fc08..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HRESULT.Manual.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -namespace TerraFX.Interop.Windows -{ - internal partial struct HRESULT - { - public bool FAILED => Windows.FAILED(Value); - - public bool SUCCEEDED => Windows.SUCCEEDED(Value); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HRGN.Manual.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HRGN.Manual.cs deleted file mode 100644 index 7b01a801..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HRGN.Manual.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HRGN : IEquatable - { - public static explicit operator HRGN(HGDIOBJ value) => new HRGN(value.Value); - - public static implicit operator HGDIOBJ(HRGN value) => new HGDIOBJ(value.Value); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HRGN.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/HRGN.cs deleted file mode 100644 index a93ef074..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/HRGN.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct HRGN : IComparable, IComparable, IEquatable, IFormattable - { - public readonly void* Value; - - public HRGN(void* value) - { - Value = value; - } - - public static HRGN INVALID_VALUE => new HRGN((void*)(-1)); - - public static HRGN NULL => new HRGN(null); - - public static bool operator ==(HRGN left, HRGN right) => left.Value == right.Value; - - public static bool operator !=(HRGN left, HRGN right) => left.Value != right.Value; - - public static bool operator <(HRGN left, HRGN right) => left.Value < right.Value; - - public static bool operator <=(HRGN left, HRGN right) => left.Value <= right.Value; - - public static bool operator >(HRGN left, HRGN right) => left.Value > right.Value; - - public static bool operator >=(HRGN left, HRGN right) => left.Value >= right.Value; - - public static explicit operator HRGN(void* value) => new HRGN(value); - - public static implicit operator void*(HRGN value) => value.Value; - - public static explicit operator HRGN(HANDLE value) => new HRGN(value); - - public static implicit operator HANDLE(HRGN value) => new HANDLE(value.Value); - - public static explicit operator HRGN(byte value) => new HRGN((void*)(value)); - - public static explicit operator byte(HRGN value) => (byte)(value.Value); - - public static explicit operator HRGN(short value) => new HRGN((void*)(value)); - - public static explicit operator short(HRGN value) => (short)(value.Value); - - public static explicit operator HRGN(int value) => new HRGN((void*)(value)); - - public static explicit operator int(HRGN value) => (int)(value.Value); - - public static explicit operator HRGN(long value) => new HRGN((void*)(value)); - - public static explicit operator long(HRGN value) => (long)(value.Value); - - public static explicit operator HRGN(nint value) => new HRGN((void*)(value)); - - public static implicit operator nint(HRGN value) => (nint)(value.Value); - - public static explicit operator HRGN(sbyte value) => new HRGN((void*)(value)); - - public static explicit operator sbyte(HRGN value) => (sbyte)(value.Value); - - public static explicit operator HRGN(ushort value) => new HRGN((void*)(value)); - - public static explicit operator ushort(HRGN value) => (ushort)(value.Value); - - public static explicit operator HRGN(uint value) => new HRGN((void*)(value)); - - public static explicit operator uint(HRGN value) => (uint)(value.Value); - - public static explicit operator HRGN(ulong value) => new HRGN((void*)(value)); - - public static explicit operator ulong(HRGN value) => (ulong)(value.Value); - - public static explicit operator HRGN(nuint value) => new HRGN((void*)(value)); - - public static implicit operator nuint(HRGN value) => (nuint)(value.Value); - - public int CompareTo(object? obj) - { - if (obj is HRGN other) - { - return CompareTo(other); - } - - return (obj is null) ? 1 : throw new ArgumentException("obj is not an instance of HRGN."); - } - - public int CompareTo(HRGN other) => ((nuint)(Value)).CompareTo((nuint)(other.Value)); - - public override bool Equals(object? obj) => (obj is HRGN other) && Equals(other); - - public bool Equals(HRGN other) => ((nuint)(Value)).Equals((nuint)(other.Value)); - - public override int GetHashCode() => ((nuint)(Value)).GetHashCode(); - - public override string ToString() => ((nuint)(Value)).ToString((sizeof(nint) == 4) ? "X8" : "X16"); - - public string ToString(string? format, IFormatProvider? formatProvider) => ((nuint)(Value)).ToString(format, formatProvider); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/LPARAM.Manual.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/LPARAM.Manual.cs deleted file mode 100644 index d5693c84..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/LPARAM.Manual.cs +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct LPARAM - { - public static explicit operator LPARAM(void* value) => new LPARAM((nint)(value)); - - public static implicit operator void*(LPARAM value) => (void*)(value.Value); - - public static explicit operator LPARAM(BOOL value) => new LPARAM(value.Value); - - public static explicit operator BOOL(LPARAM value) => new BOOL((int)(value.Value)); - - public static explicit operator LPARAM(HANDLE value) => new LPARAM((nint)(value.Value)); - - public static explicit operator HANDLE(LPARAM value) => new HANDLE((void*)(value.Value)); - - public static explicit operator LPARAM(HBRUSH value) => new LPARAM((nint)(value.Value)); - - public static explicit operator HBRUSH(LPARAM value) => new HBRUSH((void*)(value.Value)); - - public static explicit operator LPARAM(HCURSOR value) => new LPARAM((nint)(value.Value)); - - public static explicit operator HCURSOR(LPARAM value) => new HCURSOR((void*)(value.Value)); - - public static explicit operator LPARAM(HDC value) => new LPARAM((nint)(value.Value)); - - public static explicit operator HDC(LPARAM value) => new HDC((void*)(value.Value)); - - public static explicit operator LPARAM(HDROP value) => new LPARAM((nint)(value.Value)); - - public static explicit operator HDROP(LPARAM value) => new HDROP((void*)(value.Value)); - - public static explicit operator LPARAM(HFONT value) => new LPARAM((nint)(value.Value)); - - public static explicit operator HFONT(LPARAM value) => new HFONT((void*)(value.Value)); - - public static explicit operator LPARAM(HGDIOBJ value) => new LPARAM((nint)(value.Value)); - - public static explicit operator HGDIOBJ(LPARAM value) => new HGDIOBJ((void*)(value.Value)); - - public static explicit operator LPARAM(HGLOBAL value) => new LPARAM((nint)(value.Value)); - - public static explicit operator HGLOBAL(LPARAM value) => new HGLOBAL((void*)(value.Value)); - - public static explicit operator LPARAM(HICON value) => new LPARAM((nint)(value.Value)); - - public static explicit operator HICON(LPARAM value) => new HICON((void*)(value.Value)); - - public static explicit operator LPARAM(HINSTANCE value) => new LPARAM((nint)(value.Value)); - - public static explicit operator HINSTANCE(LPARAM value) => new HINSTANCE((void*)(value.Value)); - - public static explicit operator LPARAM(HLOCAL value) => new LPARAM((nint)(value.Value)); - - public static explicit operator HLOCAL(LPARAM value) => new HLOCAL((void*)(value.Value)); - - public static explicit operator LPARAM(HMENU value) => new LPARAM((nint)(value.Value)); - - public static explicit operator HMENU(LPARAM value) => new HMENU((void*)(value.Value)); - - public static explicit operator LPARAM(HMODULE value) => new LPARAM((nint)(value.Value)); - - public static explicit operator HMODULE(LPARAM value) => new HMODULE((void*)(value.Value)); - - public static explicit operator LPARAM(HPALETTE value) => new LPARAM((nint)(value.Value)); - - public static explicit operator HPALETTE(LPARAM value) => new HPALETTE((void*)(value.Value)); - - public static explicit operator LPARAM(HPEN value) => new LPARAM((nint)(value.Value)); - - public static explicit operator HPEN(LPARAM value) => new HPEN((void*)(value.Value)); - - public static explicit operator LPARAM(HRGN value) => new LPARAM((nint)(value.Value)); - - public static explicit operator HRGN(LPARAM value) => new HRGN((void*)(value.Value)); - - public static explicit operator LPARAM(HWND value) => new LPARAM((nint)(value.Value)); - - public static explicit operator HWND(LPARAM value) => new HWND((void*)(value.Value)); - - public static explicit operator LPARAM(LRESULT value) => new LPARAM(value.Value); - - public static explicit operator LPARAM(WPARAM value) => new LPARAM((nint)(value.Value)); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/LRESULT.Manual.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/LRESULT.Manual.cs deleted file mode 100644 index 66c9ef6f..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/LRESULT.Manual.cs +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct LRESULT - { - public static explicit operator LRESULT(void* value) => new LRESULT((nint)(value)); - - public static implicit operator void*(LRESULT value) => (void*)(value.Value); - - public static explicit operator LRESULT(BOOL value) => new LRESULT(value.Value); - - public static explicit operator BOOL(LRESULT value) => new BOOL((int)(value.Value)); - - public static explicit operator LRESULT(HANDLE value) => new LRESULT((nint)(value.Value)); - - public static explicit operator HANDLE(LRESULT value) => new HANDLE((void*)(value.Value)); - - public static explicit operator LRESULT(HBRUSH value) => new LRESULT((nint)(value.Value)); - - public static explicit operator HBRUSH(LRESULT value) => new HBRUSH((void*)(value.Value)); - - public static explicit operator LRESULT(HCURSOR value) => new LRESULT((nint)(value.Value)); - - public static explicit operator HCURSOR(LRESULT value) => new HCURSOR((void*)(value.Value)); - - public static explicit operator LRESULT(HDC value) => new LRESULT((nint)(value.Value)); - - public static explicit operator HDC(LRESULT value) => new HDC((void*)(value.Value)); - - public static explicit operator LRESULT(HDROP value) => new LRESULT((nint)(value.Value)); - - public static explicit operator HDROP(LRESULT value) => new HDROP((void*)(value.Value)); - - public static explicit operator LRESULT(HFONT value) => new LRESULT((nint)(value.Value)); - - public static explicit operator HFONT(LRESULT value) => new HFONT((void*)(value.Value)); - - public static explicit operator LRESULT(HGDIOBJ value) => new LRESULT((nint)(value.Value)); - - public static explicit operator HGDIOBJ(LRESULT value) => new HGDIOBJ((void*)(value.Value)); - - public static explicit operator LRESULT(HGLOBAL value) => new LRESULT((nint)(value.Value)); - - public static explicit operator HGLOBAL(LRESULT value) => new HGLOBAL((void*)(value.Value)); - - public static explicit operator LRESULT(HICON value) => new LRESULT((nint)(value.Value)); - - public static explicit operator HICON(LRESULT value) => new HICON((void*)(value.Value)); - - public static explicit operator LRESULT(HINSTANCE value) => new LRESULT((nint)(value.Value)); - - public static explicit operator HINSTANCE(LRESULT value) => new HINSTANCE((void*)(value.Value)); - - public static explicit operator LRESULT(HLOCAL value) => new LRESULT((nint)(value.Value)); - - public static explicit operator HLOCAL(LRESULT value) => new HLOCAL((void*)(value.Value)); - - public static explicit operator LRESULT(HMENU value) => new LRESULT((nint)(value.Value)); - - public static explicit operator HMENU(LRESULT value) => new HMENU((void*)(value.Value)); - - public static explicit operator LRESULT(HMODULE value) => new LRESULT((nint)(value.Value)); - - public static explicit operator HMODULE(LRESULT value) => new HMODULE((void*)(value.Value)); - - public static explicit operator LRESULT(HPALETTE value) => new LRESULT((nint)(value.Value)); - - public static explicit operator HPALETTE(LRESULT value) => new HPALETTE((void*)(value.Value)); - - public static explicit operator LRESULT(HPEN value) => new LRESULT((nint)(value.Value)); - - public static explicit operator HPEN(LRESULT value) => new HPEN((void*)(value.Value)); - - public static explicit operator LRESULT(HRGN value) => new LRESULT((nint)(value.Value)); - - public static explicit operator HRGN(LRESULT value) => new HRGN((void*)(value.Value)); - - public static explicit operator LRESULT(HWND value) => new LRESULT((nint)(value.Value)); - - public static explicit operator HWND(LRESULT value) => new HWND((void*)(value.Value)); - - public static explicit operator LRESULT(LPARAM value) => new LRESULT(value.Value); - - public static explicit operator LRESULT(WPARAM value) => new LRESULT((nint)(value.Value)); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/other/helper-types/WPARAM.Manual.cs b/src/TerraFX.Interop.Windows/Windows/other/helper-types/WPARAM.Manual.cs deleted file mode 100644 index 0f9b8191..00000000 --- a/src/TerraFX.Interop.Windows/Windows/other/helper-types/WPARAM.Manual.cs +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct WPARAM - { - public static explicit operator WPARAM(void* value) => new WPARAM((nuint)(value)); - - public static implicit operator void*(WPARAM value) => (void*)(value.Value); - - public static explicit operator WPARAM(BOOL value) => new WPARAM((nuint)(value.Value)); - - public static explicit operator BOOL(WPARAM value) => new BOOL((int)(value.Value)); - - public static explicit operator WPARAM(HANDLE value) => new WPARAM((nuint)(value.Value)); - - public static explicit operator HANDLE(WPARAM value) => new HANDLE((void*)(value.Value)); - - public static explicit operator WPARAM(HBRUSH value) => new WPARAM((nuint)(value.Value)); - - public static explicit operator HBRUSH(WPARAM value) => new HBRUSH((void*)(value.Value)); - - public static explicit operator WPARAM(HCURSOR value) => new WPARAM((nuint)(value.Value)); - - public static explicit operator HCURSOR(WPARAM value) => new HCURSOR((void*)(value.Value)); - - public static explicit operator WPARAM(HDC value) => new WPARAM((nuint)(value.Value)); - - public static explicit operator HDC(WPARAM value) => new HDC((void*)(value.Value)); - - public static explicit operator WPARAM(HDROP value) => new WPARAM((nuint)(value.Value)); - - public static explicit operator HDROP(WPARAM value) => new HDROP((void*)(value.Value)); - - public static explicit operator WPARAM(HFONT value) => new WPARAM((nuint)(value.Value)); - - public static explicit operator HFONT(WPARAM value) => new HFONT((void*)(value.Value)); - - public static explicit operator WPARAM(HGDIOBJ value) => new WPARAM((nuint)(value.Value)); - - public static explicit operator HGDIOBJ(WPARAM value) => new HGDIOBJ((void*)(value.Value)); - - public static explicit operator WPARAM(HGLOBAL value) => new WPARAM((nuint)(value.Value)); - - public static explicit operator HGLOBAL(WPARAM value) => new HGLOBAL((void*)(value.Value)); - - public static explicit operator WPARAM(HICON value) => new WPARAM((nuint)(value.Value)); - - public static explicit operator HICON(WPARAM value) => new HICON((void*)(value.Value)); - - public static explicit operator WPARAM(HINSTANCE value) => new WPARAM((nuint)(value.Value)); - - public static explicit operator HINSTANCE(WPARAM value) => new HINSTANCE((void*)(value.Value)); - - public static explicit operator WPARAM(HLOCAL value) => new WPARAM((nuint)(value.Value)); - - public static explicit operator HLOCAL(WPARAM value) => new HLOCAL((void*)(value.Value)); - - public static explicit operator WPARAM(HMENU value) => new WPARAM((nuint)(value.Value)); - - public static explicit operator HMENU(WPARAM value) => new HMENU((void*)(value.Value)); - - public static explicit operator WPARAM(HMODULE value) => new WPARAM((nuint)(value.Value)); - - public static explicit operator HMODULE(WPARAM value) => new HMODULE((void*)(value.Value)); - - public static explicit operator WPARAM(HPALETTE value) => new WPARAM((nuint)(value.Value)); - - public static explicit operator HPALETTE(WPARAM value) => new HPALETTE((void*)(value.Value)); - - public static explicit operator WPARAM(HPEN value) => new WPARAM((nuint)(value.Value)); - - public static explicit operator HPEN(WPARAM value) => new HPEN((void*)(value.Value)); - - public static explicit operator WPARAM(HRGN value) => new WPARAM((nuint)(value.Value)); - - public static explicit operator HRGN(WPARAM value) => new HRGN((void*)(value.Value)); - - public static explicit operator WPARAM(HWND value) => new WPARAM((nuint)(value.Value)); - - public static explicit operator HWND(WPARAM value) => new HWND((void*)(value.Value)); - - public static explicit operator WPARAM(LPARAM value) => new WPARAM((nuint)(value.Value)); - - public static explicit operator WPARAM(LRESULT value) => new WPARAM((nuint)(value.Value)); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/shared/minwindef/FILETIME.cs b/src/TerraFX.Interop.Windows/Windows/shared/minwindef/FILETIME.cs deleted file mode 100644 index 60ae7792..00000000 --- a/src/TerraFX.Interop.Windows/Windows/shared/minwindef/FILETIME.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/minwindef.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal partial struct FILETIME - { - [NativeTypeName("DWORD")] - public uint dwLowDateTime; - - [NativeTypeName("DWORD")] - public uint dwHighDateTime; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/shared/minwindef/Windows.cs b/src/TerraFX.Interop.Windows/Windows/shared/minwindef/Windows.cs index 60981b36..71839e47 100644 --- a/src/TerraFX.Interop.Windows/Windows/shared/minwindef/Windows.cs +++ b/src/TerraFX.Interop.Windows/Windows/shared/minwindef/Windows.cs @@ -7,9 +7,6 @@ namespace TerraFX.Interop.Windows { internal static partial class Windows { - [NativeTypeName("#define STRICT 1")] - public const int STRICT = 1; - [NativeTypeName("#define FALSE 0")] public const int FALSE = 0; diff --git a/src/TerraFX.Interop.Windows/Windows/shared/windef/POINT.cs b/src/TerraFX.Interop.Windows/Windows/shared/windef/POINT.cs deleted file mode 100644 index 1896c407..00000000 --- a/src/TerraFX.Interop.Windows/Windows/shared/windef/POINT.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/windef.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal partial struct POINT - { - [NativeTypeName("LONG")] - public int x; - - [NativeTypeName("LONG")] - public int y; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/shared/windef/RECT.Manual.cs b/src/TerraFX.Interop.Windows/Windows/shared/windef/RECT.Manual.cs deleted file mode 100644 index 64747311..00000000 --- a/src/TerraFX.Interop.Windows/Windows/shared/windef/RECT.Manual.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/windef.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal partial struct RECT : IEquatable - { - public RECT([NativeTypeName("LONG")] int Left, [NativeTypeName("LONG")] int Top, [NativeTypeName("LONG")] int Right, [NativeTypeName("LONG")] int Bottom) - { - left = Left; - top = Top; - right = Right; - bottom = Bottom; - } - - public static bool operator ==([NativeTypeName("const RECT &")] in RECT l, [NativeTypeName("const RECT &")] in RECT r) - { - return (l.left == r.left) - && (l.top == r.top) - && (l.right == r.right) - && (l.bottom == r.bottom); - } - - public static bool operator !=([NativeTypeName("const RECT &")] in RECT l, [NativeTypeName("const RECT &")] in RECT r) - => !(l == r); - - public override bool Equals(object? obj) => (obj is RECT other) && Equals(other); - - public bool Equals(RECT other) => this == other; - - public override int GetHashCode() => HashCode.Combine(left, top, right, bottom); - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/shared/windef/RECT.cs b/src/TerraFX.Interop.Windows/Windows/shared/windef/RECT.cs deleted file mode 100644 index 7209f129..00000000 --- a/src/TerraFX.Interop.Windows/Windows/shared/windef/RECT.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/windef.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal partial struct RECT - { - [NativeTypeName("LONG")] - public int left; - - [NativeTypeName("LONG")] - public int top; - - [NativeTypeName("LONG")] - public int right; - - [NativeTypeName("LONG")] - public int bottom; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/shared/wtypes/BSTRBLOB.cs b/src/TerraFX.Interop.Windows/Windows/shared/wtypes/BSTRBLOB.cs deleted file mode 100644 index 1b6a7828..00000000 --- a/src/TerraFX.Interop.Windows/Windows/shared/wtypes/BSTRBLOB.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/wtypes.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct BSTRBLOB - { - [NativeTypeName("ULONG")] - public uint cbSize; - - public byte* pData; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/shared/wtypes/CLIPDATA.cs b/src/TerraFX.Interop.Windows/Windows/shared/wtypes/CLIPDATA.cs deleted file mode 100644 index 2876298c..00000000 --- a/src/TerraFX.Interop.Windows/Windows/shared/wtypes/CLIPDATA.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/wtypes.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CLIPDATA - { - [NativeTypeName("ULONG")] - public uint cbSize; - - [NativeTypeName("LONG")] - public int ulClipFmt; - - public byte* pClipData; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/shared/wtypes/CY.cs b/src/TerraFX.Interop.Windows/Windows/shared/wtypes/CY.cs deleted file mode 100644 index a6a7b500..00000000 --- a/src/TerraFX.Interop.Windows/Windows/shared/wtypes/CY.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/wtypes.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal; - -namespace TerraFX.Interop.Windows -{ - [StructLayout(LayoutKind.Explicit)] - internal partial struct CY - { - [FieldOffset(0)] - [NativeTypeName("tagCY::(anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/shared/wtypes.h:679:5)")] - public _Anonymous_e__Struct Anonymous; - - [FieldOffset(0)] - [NativeTypeName("LONGLONG")] - public long int64; - - public ref uint Lo - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Lo, 1)); - } - } - - public ref int Hi - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Hi, 1)); - } - } - - internal partial struct _Anonymous_e__Struct - { - [NativeTypeName("ULONG")] - public uint Lo; - - [NativeTypeName("LONG")] - public int Hi; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/shared/wtypes/DECIMAL.cs b/src/TerraFX.Interop.Windows/Windows/shared/wtypes/DECIMAL.cs deleted file mode 100644 index 49d10ac3..00000000 --- a/src/TerraFX.Interop.Windows/Windows/shared/wtypes/DECIMAL.cs +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/wtypes.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal; - -namespace TerraFX.Interop.Windows -{ - internal partial struct DECIMAL - { - public ushort wReserved; - - [NativeTypeName("tagDEC::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/shared/wtypes.h:705:5)")] - public _Anonymous1_e__Union Anonymous1; - - [NativeTypeName("ULONG")] - public uint Hi32; - - [NativeTypeName("tagDEC::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/shared/wtypes.h:713:5)")] - public _Anonymous2_e__Union Anonymous2; - - public ref byte scale - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous1.Anonymous.scale, 1)); - } - } - - public ref byte sign - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous1.Anonymous.sign, 1)); - } - } - - public ref ushort signscale - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous1.signscale, 1)); - } - } - - public ref uint Lo32 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous2.Anonymous.Lo32, 1)); - } - } - - public ref uint Mid32 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous2.Anonymous.Mid32, 1)); - } - } - - public ref ulong Lo64 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous2.Lo64, 1)); - } - } - - [StructLayout(LayoutKind.Explicit)] - internal partial struct _Anonymous1_e__Union - { - [FieldOffset(0)] - [NativeTypeName("tagDEC::(anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/shared/wtypes.h:706:9)")] - public _Anonymous_e__Struct Anonymous; - - [FieldOffset(0)] - public ushort signscale; - - internal partial struct _Anonymous_e__Struct - { - public byte scale; - - public byte sign; - } - } - - [StructLayout(LayoutKind.Explicit)] - internal partial struct _Anonymous2_e__Union - { - [FieldOffset(0)] - [NativeTypeName("tagDEC::(anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/shared/wtypes.h:714:9)")] - public _Anonymous_e__Struct Anonymous; - - [FieldOffset(0)] - [NativeTypeName("ULONGLONG")] - public ulong Lo64; - - internal partial struct _Anonymous_e__Struct - { - [NativeTypeName("ULONG")] - public uint Lo32; - - [NativeTypeName("ULONG")] - public uint Mid32; - } - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/shared/wtypesbase/BLOB.cs b/src/TerraFX.Interop.Windows/Windows/shared/wtypesbase/BLOB.cs deleted file mode 100644 index 0060ee61..00000000 --- a/src/TerraFX.Interop.Windows/Windows/shared/wtypesbase/BLOB.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from shared/wtypesbase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct BLOB - { - [NativeTypeName("ULONG")] - public uint cbSize; - - public byte* pBlobData; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/DocumentTarget/IPrintDocumentPackageTarget.cs b/src/TerraFX.Interop.Windows/Windows/um/DocumentTarget/IPrintDocumentPackageTarget.cs deleted file mode 100644 index 08442937..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/DocumentTarget/IPrintDocumentPackageTarget.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/DocumentTarget.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Versioning; - -namespace TerraFX.Interop.Windows -{ - [SupportedOSPlatform("windows8.0")] - [Guid("1B8EFEC4-3019-4C27-964E-367202156906")] - [NativeTypeName("struct IPrintDocumentPackageTarget : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IPrintDocumentPackageTarget : IPrintDocumentPackageTarget.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IPrintDocumentPackageTarget*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IPrintDocumentPackageTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IPrintDocumentPackageTarget*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetPackageTargetTypes([NativeTypeName("UINT32 *")] uint* targetCount, Guid** targetTypes) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IPrintDocumentPackageTarget*)Unsafe.AsPointer(ref this), targetCount, targetTypes); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetPackageTarget([NativeTypeName("const GUID &")] Guid* guidTargetType, [NativeTypeName("const IID &")] Guid* riid, void** ppvTarget) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IPrintDocumentPackageTarget*)Unsafe.AsPointer(ref this), guidTargetType, riid, ppvTarget); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT Cancel() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IPrintDocumentPackageTarget*)Unsafe.AsPointer(ref this)); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT GetPackageTargetTypes([NativeTypeName("UINT32 *")] uint* targetCount, Guid** targetTypes); - - [VtblIndex(4)] - HRESULT GetPackageTarget([NativeTypeName("const GUID &")] Guid* guidTargetType, [NativeTypeName("const IID &")] Guid* riid, void** ppvTarget); - - [VtblIndex(5)] - HRESULT Cancel(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (UINT32 *, GUID **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPackageTargetTypes; - - [NativeTypeName("HRESULT (const GUID &, const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPackageTarget; - - [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Cancel; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CABOOL.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CABOOL.cs deleted file mode 100644 index 64e261a1..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CABOOL.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CABOOL - { - [NativeTypeName("ULONG")] - public uint cElems; - - [NativeTypeName("VARIANT_BOOL *")] - public short* pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CABSTR.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CABSTR.cs deleted file mode 100644 index 44b86392..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CABSTR.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CABSTR - { - [NativeTypeName("ULONG")] - public uint cElems; - - [NativeTypeName("BSTR *")] - public ushort** pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CABSTRBLOB.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CABSTRBLOB.cs deleted file mode 100644 index 075b8360..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CABSTRBLOB.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CABSTRBLOB - { - [NativeTypeName("ULONG")] - public uint cElems; - - public BSTRBLOB* pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAC.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAC.cs deleted file mode 100644 index 9e19a88b..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAC.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CAC - { - [NativeTypeName("ULONG")] - public uint cElems; - - [NativeTypeName("CHAR *")] - public sbyte* pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CACLIPDATA.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CACLIPDATA.cs deleted file mode 100644 index 0ba68d9c..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CACLIPDATA.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CACLIPDATA - { - [NativeTypeName("ULONG")] - public uint cElems; - - public CLIPDATA* pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CACLSID.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CACLSID.cs deleted file mode 100644 index ff826372..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CACLSID.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CACLSID - { - [NativeTypeName("ULONG")] - public uint cElems; - - [NativeTypeName("CLSID *")] - public Guid* pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CACY.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CACY.cs deleted file mode 100644 index 2bfcd29c..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CACY.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CACY - { - [NativeTypeName("ULONG")] - public uint cElems; - - public CY* pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CADATE.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CADATE.cs deleted file mode 100644 index 67166dca..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CADATE.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CADATE - { - [NativeTypeName("ULONG")] - public uint cElems; - - [NativeTypeName("DATE *")] - public double* pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CADBL.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CADBL.cs deleted file mode 100644 index 0b6a8ec3..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CADBL.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CADBL - { - [NativeTypeName("ULONG")] - public uint cElems; - - public double* pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAFILETIME.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAFILETIME.cs deleted file mode 100644 index e619fa41..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAFILETIME.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CAFILETIME - { - [NativeTypeName("ULONG")] - public uint cElems; - - public FILETIME* pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAFLT.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAFLT.cs deleted file mode 100644 index 93f5f12b..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAFLT.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CAFLT - { - [NativeTypeName("ULONG")] - public uint cElems; - - public float* pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAH.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAH.cs deleted file mode 100644 index 76bbe7f9..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAH.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CAH - { - [NativeTypeName("ULONG")] - public uint cElems; - - public LARGE_INTEGER* pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAI.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAI.cs deleted file mode 100644 index 7cc8304e..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAI.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CAI - { - [NativeTypeName("ULONG")] - public uint cElems; - - public short* pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAL.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAL.cs deleted file mode 100644 index f4d7b589..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAL.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CAL - { - [NativeTypeName("ULONG")] - public uint cElems; - - [NativeTypeName("LONG *")] - public int* pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CALPSTR.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CALPSTR.cs deleted file mode 100644 index 4469b63d..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CALPSTR.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CALPSTR - { - [NativeTypeName("ULONG")] - public uint cElems; - - [NativeTypeName("LPSTR *")] - public sbyte** pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CALPWSTR.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CALPWSTR.cs deleted file mode 100644 index 36c82e2c..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CALPWSTR.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CALPWSTR - { - [NativeTypeName("ULONG")] - public uint cElems; - - [NativeTypeName("LPWSTR *")] - public ushort** pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAPROPVARIANT.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAPROPVARIANT.cs deleted file mode 100644 index 3bf176c0..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAPROPVARIANT.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CAPROPVARIANT - { - [NativeTypeName("ULONG")] - public uint cElems; - - public PROPVARIANT* pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CASCODE.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CASCODE.cs deleted file mode 100644 index 2e508e0b..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CASCODE.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CASCODE - { - [NativeTypeName("ULONG")] - public uint cElems; - - [NativeTypeName("SCODE *")] - public int* pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAUB.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAUB.cs deleted file mode 100644 index 64cc8b2c..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAUB.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CAUB - { - [NativeTypeName("ULONG")] - public uint cElems; - - [NativeTypeName("UCHAR *")] - public byte* pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAUH.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAUH.cs deleted file mode 100644 index 28566d9b..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAUH.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CAUH - { - [NativeTypeName("ULONG")] - public uint cElems; - - public ULARGE_INTEGER* pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAUI.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAUI.cs deleted file mode 100644 index 0deb962a..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAUI.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CAUI - { - [NativeTypeName("ULONG")] - public uint cElems; - - public ushort* pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAUL.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAUL.cs deleted file mode 100644 index fc9d8961..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/CAUL.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct CAUL - { - [NativeTypeName("ULONG")] - public uint cElems; - - [NativeTypeName("ULONG *")] - public uint* pElems; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/PROPVARIANT.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/PROPVARIANT.cs deleted file mode 100644 index ddf81959..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/PROPVARIANT.cs +++ /dev/null @@ -1,995 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct PROPVARIANT - { - [NativeTypeName("tagPROPVARIANT::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/PropIdlBase.h:303:3)")] - public _Anonymous_e__Union Anonymous; - - public ref ushort vt - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.vt, 1)); - } - } - - public ref ushort wReserved1 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.wReserved1, 1)); - } - } - - public ref ushort wReserved2 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.wReserved2, 1)); - } - } - - public ref ushort wReserved3 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.wReserved3, 1)); - } - } - - public ref sbyte cVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.cVal, 1)); - } - } - - public ref byte bVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.bVal, 1)); - } - } - - public ref short iVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.iVal, 1)); - } - } - - public ref ushort uiVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.uiVal, 1)); - } - } - - public ref int lVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.lVal, 1)); - } - } - - public ref uint ulVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.ulVal, 1)); - } - } - - public ref int intVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.intVal, 1)); - } - } - - public ref uint uintVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.uintVal, 1)); - } - } - - public ref LARGE_INTEGER hVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.hVal, 1)); - } - } - - public ref ULARGE_INTEGER uhVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.uhVal, 1)); - } - } - - public ref float fltVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.fltVal, 1)); - } - } - - public ref double dblVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.dblVal, 1)); - } - } - - public ref short boolVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.boolVal, 1)); - } - } - - public ref short __OBSOLETE__VARIANT_BOOL - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.__OBSOLETE__VARIANT_BOOL, 1)); - } - } - - public ref int scode - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.scode, 1)); - } - } - - public ref CY cyVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.cyVal, 1)); - } - } - - public ref double date - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.date, 1)); - } - } - - public ref FILETIME filetime - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.filetime, 1)); - } - } - - public ref Guid* puuid - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.puuid; - } - } - - public ref CLIPDATA* pclipdata - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pclipdata; - } - } - - public ref ushort* bstrVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.bstrVal; - } - } - - public ref BSTRBLOB bstrblobVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.bstrblobVal, 1)); - } - } - - public ref BLOB blob - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.blob, 1)); - } - } - - public ref sbyte* pszVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pszVal; - } - } - - public ref ushort* pwszVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pwszVal; - } - } - - public ref IUnknown* punkVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.punkVal; - } - } - - public ref IDispatch* pdispVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pdispVal; - } - } - - public ref IStream* pStream - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pStream; - } - } - - public ref IStorage* pStorage - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pStorage; - } - } - - public ref VERSIONEDSTREAM* pVersionedStream - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pVersionedStream; - } - } - - public ref SAFEARRAY* parray - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.parray; - } - } - - public ref CAC cac - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.cac, 1)); - } - } - - public ref CAUB caub - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.caub, 1)); - } - } - - public ref CAI cai - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.cai, 1)); - } - } - - public ref CAUI caui - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.caui, 1)); - } - } - - public ref CAL cal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.cal, 1)); - } - } - - public ref CAUL caul - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.caul, 1)); - } - } - - public ref CAH cah - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.cah, 1)); - } - } - - public ref CAUH cauh - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.cauh, 1)); - } - } - - public ref CAFLT caflt - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.caflt, 1)); - } - } - - public ref CADBL cadbl - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.cadbl, 1)); - } - } - - public ref CABOOL cabool - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.cabool, 1)); - } - } - - public ref CASCODE cascode - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.cascode, 1)); - } - } - - public ref CACY cacy - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.cacy, 1)); - } - } - - public ref CADATE cadate - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.cadate, 1)); - } - } - - public ref CAFILETIME cafiletime - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.cafiletime, 1)); - } - } - - public ref CACLSID cauuid - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.cauuid, 1)); - } - } - - public ref CACLIPDATA caclipdata - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.caclipdata, 1)); - } - } - - public ref CABSTR cabstr - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.cabstr, 1)); - } - } - - public ref CABSTRBLOB cabstrblob - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.cabstrblob, 1)); - } - } - - public ref CALPSTR calpstr - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.calpstr, 1)); - } - } - - public ref CALPWSTR calpwstr - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.calpwstr, 1)); - } - } - - public ref CAPROPVARIANT capropvar - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.capropvar, 1)); - } - } - - public ref sbyte* pcVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pcVal; - } - } - - public ref byte* pbVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pbVal; - } - } - - public ref short* piVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.piVal; - } - } - - public ref ushort* puiVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.puiVal; - } - } - - public ref int* plVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.plVal; - } - } - - public ref uint* pulVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pulVal; - } - } - - public ref int* pintVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pintVal; - } - } - - public ref uint* puintVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.puintVal; - } - } - - public ref float* pfltVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pfltVal; - } - } - - public ref double* pdblVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pdblVal; - } - } - - public ref short* pboolVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pboolVal; - } - } - - public ref DECIMAL* pdecVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pdecVal; - } - } - - public ref int* pscode - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pscode; - } - } - - public ref CY* pcyVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pcyVal; - } - } - - public ref double* pdate - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pdate; - } - } - - public ref ushort** pbstrVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pbstrVal; - } - } - - public ref IUnknown** ppunkVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.ppunkVal; - } - } - - public ref IDispatch** ppdispVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.ppdispVal; - } - } - - public ref SAFEARRAY** pparray - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pparray; - } - } - - public ref PROPVARIANT* pvarVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pvarVal; - } - } - - public ref DECIMAL decVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.decVal, 1)); - } - } - - [StructLayout(LayoutKind.Explicit)] - internal unsafe partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - [NativeTypeName("tagPROPVARIANT::(anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/PropIdlBase.h:305:1)")] - public _Anonymous_e__Struct Anonymous; - - [FieldOffset(0)] - public DECIMAL decVal; - - internal unsafe partial struct _Anonymous_e__Struct - { - [NativeTypeName("VARTYPE")] - public ushort vt; - - [NativeTypeName("PROPVAR_PAD1")] - public ushort wReserved1; - - [NativeTypeName("PROPVAR_PAD2")] - public ushort wReserved2; - - [NativeTypeName("PROPVAR_PAD3")] - public ushort wReserved3; - - [NativeTypeName("tagPROPVARIANT::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/PropIdlBase.h:311:43)")] - public _Anonymous_e__Union Anonymous; - - [StructLayout(LayoutKind.Explicit)] - internal unsafe partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - [NativeTypeName("CHAR")] - public sbyte cVal; - - [FieldOffset(0)] - [NativeTypeName("UCHAR")] - public byte bVal; - - [FieldOffset(0)] - public short iVal; - - [FieldOffset(0)] - public ushort uiVal; - - [FieldOffset(0)] - [NativeTypeName("LONG")] - public int lVal; - - [FieldOffset(0)] - [NativeTypeName("ULONG")] - public uint ulVal; - - [FieldOffset(0)] - public int intVal; - - [FieldOffset(0)] - public uint uintVal; - - [FieldOffset(0)] - public LARGE_INTEGER hVal; - - [FieldOffset(0)] - public ULARGE_INTEGER uhVal; - - [FieldOffset(0)] - public float fltVal; - - [FieldOffset(0)] - public double dblVal; - - [FieldOffset(0)] - [NativeTypeName("VARIANT_BOOL")] - public short boolVal; - - [FieldOffset(0)] - [NativeTypeName("VARIANT_BOOL")] - public short __OBSOLETE__VARIANT_BOOL; - - [FieldOffset(0)] - [NativeTypeName("SCODE")] - public int scode; - - [FieldOffset(0)] - public CY cyVal; - - [FieldOffset(0)] - [NativeTypeName("DATE")] - public double date; - - [FieldOffset(0)] - public FILETIME filetime; - - [FieldOffset(0)] - [NativeTypeName("CLSID *")] - public Guid* puuid; - - [FieldOffset(0)] - public CLIPDATA* pclipdata; - - [FieldOffset(0)] - [NativeTypeName("BSTR")] - public ushort* bstrVal; - - [FieldOffset(0)] - public BSTRBLOB bstrblobVal; - - [FieldOffset(0)] - public BLOB blob; - - [FieldOffset(0)] - [NativeTypeName("LPSTR")] - public sbyte* pszVal; - - [FieldOffset(0)] - [NativeTypeName("LPWSTR")] - public ushort* pwszVal; - - [FieldOffset(0)] - public IUnknown* punkVal; - - [FieldOffset(0)] - public IDispatch* pdispVal; - - [FieldOffset(0)] - public IStream* pStream; - - [FieldOffset(0)] - public IStorage* pStorage; - - [FieldOffset(0)] - [NativeTypeName("LPVERSIONEDSTREAM")] - public VERSIONEDSTREAM* pVersionedStream; - - [FieldOffset(0)] - [NativeTypeName("LPSAFEARRAY")] - public SAFEARRAY* parray; - - [FieldOffset(0)] - public CAC cac; - - [FieldOffset(0)] - public CAUB caub; - - [FieldOffset(0)] - public CAI cai; - - [FieldOffset(0)] - public CAUI caui; - - [FieldOffset(0)] - public CAL cal; - - [FieldOffset(0)] - public CAUL caul; - - [FieldOffset(0)] - public CAH cah; - - [FieldOffset(0)] - public CAUH cauh; - - [FieldOffset(0)] - public CAFLT caflt; - - [FieldOffset(0)] - public CADBL cadbl; - - [FieldOffset(0)] - public CABOOL cabool; - - [FieldOffset(0)] - public CASCODE cascode; - - [FieldOffset(0)] - public CACY cacy; - - [FieldOffset(0)] - public CADATE cadate; - - [FieldOffset(0)] - public CAFILETIME cafiletime; - - [FieldOffset(0)] - public CACLSID cauuid; - - [FieldOffset(0)] - public CACLIPDATA caclipdata; - - [FieldOffset(0)] - public CABSTR cabstr; - - [FieldOffset(0)] - public CABSTRBLOB cabstrblob; - - [FieldOffset(0)] - public CALPSTR calpstr; - - [FieldOffset(0)] - public CALPWSTR calpwstr; - - [FieldOffset(0)] - public CAPROPVARIANT capropvar; - - [FieldOffset(0)] - [NativeTypeName("CHAR *")] - public sbyte* pcVal; - - [FieldOffset(0)] - [NativeTypeName("UCHAR *")] - public byte* pbVal; - - [FieldOffset(0)] - public short* piVal; - - [FieldOffset(0)] - public ushort* puiVal; - - [FieldOffset(0)] - [NativeTypeName("LONG *")] - public int* plVal; - - [FieldOffset(0)] - [NativeTypeName("ULONG *")] - public uint* pulVal; - - [FieldOffset(0)] - public int* pintVal; - - [FieldOffset(0)] - public uint* puintVal; - - [FieldOffset(0)] - public float* pfltVal; - - [FieldOffset(0)] - public double* pdblVal; - - [FieldOffset(0)] - [NativeTypeName("VARIANT_BOOL *")] - public short* pboolVal; - - [FieldOffset(0)] - public DECIMAL* pdecVal; - - [FieldOffset(0)] - [NativeTypeName("SCODE *")] - public int* pscode; - - [FieldOffset(0)] - public CY* pcyVal; - - [FieldOffset(0)] - [NativeTypeName("DATE *")] - public double* pdate; - - [FieldOffset(0)] - [NativeTypeName("BSTR *")] - public ushort** pbstrVal; - - [FieldOffset(0)] - public IUnknown** ppunkVal; - - [FieldOffset(0)] - public IDispatch** ppdispVal; - - [FieldOffset(0)] - [NativeTypeName("LPSAFEARRAY *")] - public SAFEARRAY** pparray; - - [FieldOffset(0)] - public PROPVARIANT* pvarVal; - } - } - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/VERSIONEDSTREAM.cs b/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/VERSIONEDSTREAM.cs deleted file mode 100644 index 53443f4b..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/PropIdlBase/VERSIONEDSTREAM.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/PropIdlBase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct VERSIONEDSTREAM - { - public Guid guidVersion; - - public IStream* pStream; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/Unknwnbase/IUnknown.cs b/src/TerraFX.Interop.Windows/Windows/um/Unknwnbase/IUnknown.cs index 4c4ac0fe..f5226076 100644 --- a/src/TerraFX.Interop.Windows/Windows/um/Unknwnbase/IUnknown.cs +++ b/src/TerraFX.Interop.Windows/Windows/um/Unknwnbase/IUnknown.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; namespace TerraFX.Interop.Windows { [Guid("00000000-0000-0000-C000-000000000046")] - internal unsafe partial struct IUnknown : IUnknown.Interface + internal unsafe partial struct IUnknown { public void** lpVtbl; @@ -36,31 +36,5 @@ namespace TerraFX.Interop.Windows { return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IUnknown*)Unsafe.AsPointer(ref this)); } - - public interface Interface - { - [VtblIndex(0)] - HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject); - - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - uint AddRef(); - - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - uint Release(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - } } } diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/ARRAYDESC.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/ARRAYDESC.cs deleted file mode 100644 index 77f09080..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/ARRAYDESC.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal; - -namespace TerraFX.Interop.Windows -{ - internal partial struct ARRAYDESC - { - public TYPEDESC tdescElem; - - public ushort cDims; - - [NativeTypeName("SAFEARRAYBOUND [1]")] - public _rgbounds_e__FixedBuffer rgbounds; - - internal partial struct _rgbounds_e__FixedBuffer - { - public SAFEARRAYBOUND e0; - - public ref SAFEARRAYBOUND this[int index] - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref AsSpan(int.MaxValue)[index]; - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public Span AsSpan(int length) => MemoryMarshal.CreateSpan(ref e0, length); - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/BINDPTR.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/BINDPTR.cs deleted file mode 100644 index c2c4075a..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/BINDPTR.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [StructLayout(LayoutKind.Explicit)] - internal unsafe partial struct BINDPTR - { - [FieldOffset(0)] - public FUNCDESC* lpfuncdesc; - - [FieldOffset(0)] - public VARDESC* lpvardesc; - - [FieldOffset(0)] - public ITypeComp* lptcomp; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/CALLCONV.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/CALLCONV.cs deleted file mode 100644 index 861c6891..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/CALLCONV.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal enum CALLCONV - { - CC_FASTCALL = 0, - CC_CDECL = 1, - CC_MSCPASCAL = (CC_CDECL + 1), - CC_PASCAL = CC_MSCPASCAL, - CC_MACPASCAL = (CC_PASCAL + 1), - CC_STDCALL = (CC_MACPASCAL + 1), - CC_FPFASTCALL = (CC_STDCALL + 1), - CC_SYSCALL = (CC_FPFASTCALL + 1), - CC_MPWCDECL = (CC_SYSCALL + 1), - CC_MPWPASCAL = (CC_MPWCDECL + 1), - CC_MAX = (CC_MPWPASCAL + 1), - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/DESCKIND.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/DESCKIND.cs deleted file mode 100644 index 7147fc73..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/DESCKIND.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal enum DESCKIND - { - DESCKIND_NONE = 0, - DESCKIND_FUNCDESC = (DESCKIND_NONE + 1), - DESCKIND_VARDESC = (DESCKIND_FUNCDESC + 1), - DESCKIND_TYPECOMP = (DESCKIND_VARDESC + 1), - DESCKIND_IMPLICITAPPOBJ = (DESCKIND_TYPECOMP + 1), - DESCKIND_MAX = (DESCKIND_IMPLICITAPPOBJ + 1), - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/DISPPARAMS.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/DISPPARAMS.cs deleted file mode 100644 index f79c17dd..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/DISPPARAMS.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct DISPPARAMS - { - [NativeTypeName("VARIANTARG *")] - public VARIANT* rgvarg; - - [NativeTypeName("DISPID *")] - public int* rgdispidNamedArgs; - - public uint cArgs; - - public uint cNamedArgs; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/ELEMDESC.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/ELEMDESC.cs deleted file mode 100644 index 4f32bfa0..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/ELEMDESC.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal; - -namespace TerraFX.Interop.Windows -{ - internal partial struct ELEMDESC - { - public TYPEDESC tdesc; - - [NativeTypeName("tagELEMDESC::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/oaidl.h:733:5)")] - public _Anonymous_e__Union Anonymous; - - public ref IDLDESC idldesc - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.idldesc, 1)); - } - } - - public ref PARAMDESC paramdesc - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.paramdesc, 1)); - } - } - - [StructLayout(LayoutKind.Explicit)] - internal partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public IDLDESC idldesc; - - [FieldOffset(0)] - public PARAMDESC paramdesc; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/EXCEPINFO.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/EXCEPINFO.cs deleted file mode 100644 index adcef003..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/EXCEPINFO.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct EXCEPINFO - { - [NativeTypeName("WORD")] - public ushort wCode; - - [NativeTypeName("WORD")] - public ushort wReserved; - - [NativeTypeName("BSTR")] - public ushort* bstrSource; - - [NativeTypeName("BSTR")] - public ushort* bstrDescription; - - [NativeTypeName("BSTR")] - public ushort* bstrHelpFile; - - [NativeTypeName("DWORD")] - public uint dwHelpContext; - - [NativeTypeName("PVOID")] - public void* pvReserved; - - [NativeTypeName("HRESULT (*)(struct tagEXCEPINFO *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] pfnDeferredFillIn; - - [NativeTypeName("SCODE")] - public int scode; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/FUNCDESC.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/FUNCDESC.cs deleted file mode 100644 index a6345bfc..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/FUNCDESC.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct FUNCDESC - { - [NativeTypeName("MEMBERID")] - public int memid; - - [NativeTypeName("SCODE *")] - public int* lprgscode; - - public ELEMDESC* lprgelemdescParam; - - public FUNCKIND funckind; - - public INVOKEKIND invkind; - - public CALLCONV callconv; - - public short cParams; - - public short cParamsOpt; - - public short oVft; - - public short cScodes; - - public ELEMDESC elemdescFunc; - - [NativeTypeName("WORD")] - public ushort wFuncFlags; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/FUNCKIND.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/FUNCKIND.cs deleted file mode 100644 index 5a22211c..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/FUNCKIND.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal enum FUNCKIND - { - FUNC_VIRTUAL = 0, - FUNC_PUREVIRTUAL = (FUNC_VIRTUAL + 1), - FUNC_NONVIRTUAL = (FUNC_PUREVIRTUAL + 1), - FUNC_STATIC = (FUNC_NONVIRTUAL + 1), - FUNC_DISPATCH = (FUNC_STATIC + 1), - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/IDLDESC.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/IDLDESC.cs deleted file mode 100644 index ee3607a0..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/IDLDESC.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal partial struct IDLDESC - { - [NativeTypeName("ULONG_PTR")] - public nuint dwReserved; - - public ushort wIDLFlags; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/IDispatch.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/IDispatch.cs deleted file mode 100644 index b8ad51e7..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/IDispatch.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("00020400-0000-0000-C000-000000000046")] - [NativeTypeName("struct IDispatch : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IDispatch : IDispatch.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDispatch*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDispatch*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDispatch*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetTypeInfoCount(uint* pctinfo) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDispatch*)Unsafe.AsPointer(ref this), pctinfo); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetTypeInfo(uint iTInfo, [NativeTypeName("LCID")] uint lcid, ITypeInfo** ppTInfo) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDispatch*)Unsafe.AsPointer(ref this), iTInfo, lcid, ppTInfo); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetIDsOfNames([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("LPOLESTR *")] ushort** rgszNames, uint cNames, [NativeTypeName("LCID")] uint lcid, [NativeTypeName("DISPID *")] int* rgDispId) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDispatch*)Unsafe.AsPointer(ref this), riid, rgszNames, cNames, lcid, rgDispId); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT Invoke([NativeTypeName("DISPID")] int dispIdMember, [NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("LCID")] uint lcid, [NativeTypeName("WORD")] ushort wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO* pExcepInfo, uint* puArgErr) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDispatch*)Unsafe.AsPointer(ref this), dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT GetTypeInfoCount(uint* pctinfo); - - [VtblIndex(4)] - HRESULT GetTypeInfo(uint iTInfo, [NativeTypeName("LCID")] uint lcid, ITypeInfo** ppTInfo); - - [VtblIndex(5)] - HRESULT GetIDsOfNames([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("LPOLESTR *")] ushort** rgszNames, uint cNames, [NativeTypeName("LCID")] uint lcid, [NativeTypeName("DISPID *")] int* rgDispId); - - [VtblIndex(6)] - HRESULT Invoke([NativeTypeName("DISPID")] int dispIdMember, [NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("LCID")] uint lcid, [NativeTypeName("WORD")] ushort wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO* pExcepInfo, uint* puArgErr); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTypeInfoCount; - - [NativeTypeName("HRESULT (UINT, LCID, ITypeInfo **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTypeInfo; - - [NativeTypeName("HRESULT (const IID &, LPOLESTR *, UINT, LCID, DISPID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetIDsOfNames; - - [NativeTypeName("HRESULT (DISPID, const IID &, LCID, WORD, DISPPARAMS *, VARIANT *, EXCEPINFO *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Invoke; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/IErrorLog.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/IErrorLog.cs deleted file mode 100644 index 6d52d7de..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/IErrorLog.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("3127CA40-446E-11CE-8135-00AA004BB851")] - [NativeTypeName("struct IErrorLog : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IErrorLog : IErrorLog.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IErrorLog*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IErrorLog*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IErrorLog*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT AddError([NativeTypeName("LPCOLESTR")] ushort* pszPropName, EXCEPINFO* pExcepInfo) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IErrorLog*)Unsafe.AsPointer(ref this), pszPropName, pExcepInfo); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT AddError([NativeTypeName("LPCOLESTR")] ushort* pszPropName, EXCEPINFO* pExcepInfo); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (LPCOLESTR, EXCEPINFO *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddError; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/INVOKEKIND.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/INVOKEKIND.cs deleted file mode 100644 index 764d5534..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/INVOKEKIND.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal enum INVOKEKIND - { - INVOKE_FUNC = 1, - INVOKE_PROPERTYGET = 2, - INVOKE_PROPERTYPUT = 4, - INVOKE_PROPERTYPUTREF = 8, - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/IRecordInfo.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/IRecordInfo.cs deleted file mode 100644 index 3924a2c4..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/IRecordInfo.cs +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("0000002F-0000-0000-C000-000000000046")] - [NativeTypeName("struct IRecordInfo : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IRecordInfo : IRecordInfo.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IRecordInfo*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IRecordInfo*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IRecordInfo*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT RecordInit([NativeTypeName("PVOID")] void* pvNew) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IRecordInfo*)Unsafe.AsPointer(ref this), pvNew); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT RecordClear([NativeTypeName("PVOID")] void* pvExisting) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IRecordInfo*)Unsafe.AsPointer(ref this), pvExisting); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT RecordCopy([NativeTypeName("PVOID")] void* pvExisting, [NativeTypeName("PVOID")] void* pvNew) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IRecordInfo*)Unsafe.AsPointer(ref this), pvExisting, pvNew); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetGuid(Guid* pguid) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IRecordInfo*)Unsafe.AsPointer(ref this), pguid); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT GetName([NativeTypeName("BSTR *")] ushort** pbstrName) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IRecordInfo*)Unsafe.AsPointer(ref this), pbstrName); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT GetSize([NativeTypeName("ULONG *")] uint* pcbSize) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IRecordInfo*)Unsafe.AsPointer(ref this), pcbSize); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT GetTypeInfo(ITypeInfo** ppTypeInfo) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IRecordInfo*)Unsafe.AsPointer(ref this), ppTypeInfo); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT GetField([NativeTypeName("PVOID")] void* pvData, [NativeTypeName("LPCOLESTR")] ushort* szFieldName, VARIANT* pvarField) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IRecordInfo*)Unsafe.AsPointer(ref this), pvData, szFieldName, pvarField); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT GetFieldNoCopy([NativeTypeName("PVOID")] void* pvData, [NativeTypeName("LPCOLESTR")] ushort* szFieldName, VARIANT* pvarField, [NativeTypeName("PVOID *")] void** ppvDataCArray) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IRecordInfo*)Unsafe.AsPointer(ref this), pvData, szFieldName, pvarField, ppvDataCArray); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT PutField([NativeTypeName("ULONG")] uint wFlags, [NativeTypeName("PVOID")] void* pvData, [NativeTypeName("LPCOLESTR")] ushort* szFieldName, VARIANT* pvarField) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IRecordInfo*)Unsafe.AsPointer(ref this), wFlags, pvData, szFieldName, pvarField); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT PutFieldNoCopy([NativeTypeName("ULONG")] uint wFlags, [NativeTypeName("PVOID")] void* pvData, [NativeTypeName("LPCOLESTR")] ushort* szFieldName, VARIANT* pvarField) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IRecordInfo*)Unsafe.AsPointer(ref this), wFlags, pvData, szFieldName, pvarField); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT GetFieldNames([NativeTypeName("ULONG *")] uint* pcNames, [NativeTypeName("BSTR *")] ushort** rgBstrNames) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IRecordInfo*)Unsafe.AsPointer(ref this), pcNames, rgBstrNames); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public BOOL IsMatchingType(IRecordInfo* pRecordInfo) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IRecordInfo*)Unsafe.AsPointer(ref this), pRecordInfo); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - [return: NativeTypeName("PVOID")] - public void* RecordCreate() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IRecordInfo*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public HRESULT RecordCreateCopy([NativeTypeName("PVOID")] void* pvSource, [NativeTypeName("PVOID *")] void** ppvDest) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IRecordInfo*)Unsafe.AsPointer(ref this), pvSource, ppvDest); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public HRESULT RecordDestroy([NativeTypeName("PVOID")] void* pvRecord) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((IRecordInfo*)Unsafe.AsPointer(ref this), pvRecord); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT RecordInit([NativeTypeName("PVOID")] void* pvNew); - - [VtblIndex(4)] - HRESULT RecordClear([NativeTypeName("PVOID")] void* pvExisting); - - [VtblIndex(5)] - HRESULT RecordCopy([NativeTypeName("PVOID")] void* pvExisting, [NativeTypeName("PVOID")] void* pvNew); - - [VtblIndex(6)] - HRESULT GetGuid(Guid* pguid); - - [VtblIndex(7)] - HRESULT GetName([NativeTypeName("BSTR *")] ushort** pbstrName); - - [VtblIndex(8)] - HRESULT GetSize([NativeTypeName("ULONG *")] uint* pcbSize); - - [VtblIndex(9)] - HRESULT GetTypeInfo(ITypeInfo** ppTypeInfo); - - [VtblIndex(10)] - HRESULT GetField([NativeTypeName("PVOID")] void* pvData, [NativeTypeName("LPCOLESTR")] ushort* szFieldName, VARIANT* pvarField); - - [VtblIndex(11)] - HRESULT GetFieldNoCopy([NativeTypeName("PVOID")] void* pvData, [NativeTypeName("LPCOLESTR")] ushort* szFieldName, VARIANT* pvarField, [NativeTypeName("PVOID *")] void** ppvDataCArray); - - [VtblIndex(12)] - HRESULT PutField([NativeTypeName("ULONG")] uint wFlags, [NativeTypeName("PVOID")] void* pvData, [NativeTypeName("LPCOLESTR")] ushort* szFieldName, VARIANT* pvarField); - - [VtblIndex(13)] - HRESULT PutFieldNoCopy([NativeTypeName("ULONG")] uint wFlags, [NativeTypeName("PVOID")] void* pvData, [NativeTypeName("LPCOLESTR")] ushort* szFieldName, VARIANT* pvarField); - - [VtblIndex(14)] - HRESULT GetFieldNames([NativeTypeName("ULONG *")] uint* pcNames, [NativeTypeName("BSTR *")] ushort** rgBstrNames); - - [VtblIndex(15)] - BOOL IsMatchingType(IRecordInfo* pRecordInfo); - - [VtblIndex(16)] - [return: NativeTypeName("PVOID")] - void* RecordCreate(); - - [VtblIndex(17)] - HRESULT RecordCreateCopy([NativeTypeName("PVOID")] void* pvSource, [NativeTypeName("PVOID *")] void** ppvDest); - - [VtblIndex(18)] - HRESULT RecordDestroy([NativeTypeName("PVOID")] void* pvRecord); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (PVOID) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RecordInit; - - [NativeTypeName("HRESULT (PVOID) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RecordClear; - - [NativeTypeName("HRESULT (PVOID, PVOID) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RecordCopy; - - [NativeTypeName("HRESULT (GUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetGuid; - - [NativeTypeName("HRESULT (BSTR *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetName; - - [NativeTypeName("HRESULT (ULONG *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSize; - - [NativeTypeName("HRESULT (ITypeInfo **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTypeInfo; - - [NativeTypeName("HRESULT (PVOID, LPCOLESTR, VARIANT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetField; - - [NativeTypeName("HRESULT (PVOID, LPCOLESTR, VARIANT *, PVOID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFieldNoCopy; - - [NativeTypeName("HRESULT (ULONG, PVOID, LPCOLESTR, VARIANT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PutField; - - [NativeTypeName("HRESULT (ULONG, PVOID, LPCOLESTR, VARIANT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] PutFieldNoCopy; - - [NativeTypeName("HRESULT (ULONG *, BSTR *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFieldNames; - - [NativeTypeName("BOOL (IRecordInfo *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsMatchingType; - - [NativeTypeName("PVOID () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RecordCreate; - - [NativeTypeName("HRESULT (PVOID, PVOID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RecordCreateCopy; - - [NativeTypeName("HRESULT (PVOID) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RecordDestroy; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/ITypeComp.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/ITypeComp.cs deleted file mode 100644 index 3aa24ec9..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/ITypeComp.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("00020403-0000-0000-C000-000000000046")] - [NativeTypeName("struct ITypeComp : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct ITypeComp : ITypeComp.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ITypeComp*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ITypeComp*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ITypeComp*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT Bind([NativeTypeName("LPOLESTR")] ushort* szName, [NativeTypeName("ULONG")] uint lHashVal, [NativeTypeName("WORD")] ushort wFlags, ITypeInfo** ppTInfo, DESCKIND* pDescKind, BINDPTR* pBindPtr) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ITypeComp*)Unsafe.AsPointer(ref this), szName, lHashVal, wFlags, ppTInfo, pDescKind, pBindPtr); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT BindType([NativeTypeName("LPOLESTR")] ushort* szName, [NativeTypeName("ULONG")] uint lHashVal, ITypeInfo** ppTInfo, ITypeComp** ppTComp) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ITypeComp*)Unsafe.AsPointer(ref this), szName, lHashVal, ppTInfo, ppTComp); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT Bind([NativeTypeName("LPOLESTR")] ushort* szName, [NativeTypeName("ULONG")] uint lHashVal, [NativeTypeName("WORD")] ushort wFlags, ITypeInfo** ppTInfo, DESCKIND* pDescKind, BINDPTR* pBindPtr); - - [VtblIndex(4)] - HRESULT BindType([NativeTypeName("LPOLESTR")] ushort* szName, [NativeTypeName("ULONG")] uint lHashVal, ITypeInfo** ppTInfo, ITypeComp** ppTComp); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (LPOLESTR, ULONG, WORD, ITypeInfo **, DESCKIND *, BINDPTR *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Bind; - - [NativeTypeName("HRESULT (LPOLESTR, ULONG, ITypeInfo **, ITypeComp **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] BindType; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/ITypeInfo.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/ITypeInfo.cs deleted file mode 100644 index 3f7c47f3..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/ITypeInfo.cs +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("00020401-0000-0000-C000-000000000046")] - [NativeTypeName("struct ITypeInfo : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct ITypeInfo : ITypeInfo.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ITypeInfo*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ITypeInfo*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ITypeInfo*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetTypeAttr(TYPEATTR** ppTypeAttr) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ITypeInfo*)Unsafe.AsPointer(ref this), ppTypeAttr); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetTypeComp(ITypeComp** ppTComp) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ITypeInfo*)Unsafe.AsPointer(ref this), ppTComp); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetFuncDesc(uint index, FUNCDESC** ppFuncDesc) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ITypeInfo*)Unsafe.AsPointer(ref this), index, ppFuncDesc); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetVarDesc(uint index, VARDESC** ppVarDesc) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ITypeInfo*)Unsafe.AsPointer(ref this), index, ppVarDesc); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT GetNames([NativeTypeName("MEMBERID")] int memid, [NativeTypeName("BSTR *")] ushort** rgBstrNames, uint cMaxNames, uint* pcNames) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ITypeInfo*)Unsafe.AsPointer(ref this), memid, rgBstrNames, cMaxNames, pcNames); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT GetRefTypeOfImplType(uint index, [NativeTypeName("HREFTYPE *")] uint* pRefType) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ITypeInfo*)Unsafe.AsPointer(ref this), index, pRefType); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT GetImplTypeFlags(uint index, int* pImplTypeFlags) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ITypeInfo*)Unsafe.AsPointer(ref this), index, pImplTypeFlags); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT GetIDsOfNames([NativeTypeName("LPOLESTR *")] ushort** rgszNames, uint cNames, [NativeTypeName("MEMBERID *")] int* pMemId) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ITypeInfo*)Unsafe.AsPointer(ref this), rgszNames, cNames, pMemId); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT Invoke([NativeTypeName("PVOID")] void* pvInstance, [NativeTypeName("MEMBERID")] int memid, [NativeTypeName("WORD")] ushort wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO* pExcepInfo, uint* puArgErr) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ITypeInfo*)Unsafe.AsPointer(ref this), pvInstance, memid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT GetDocumentation([NativeTypeName("MEMBERID")] int memid, [NativeTypeName("BSTR *")] ushort** pBstrName, [NativeTypeName("BSTR *")] ushort** pBstrDocString, [NativeTypeName("DWORD *")] uint* pdwHelpContext, [NativeTypeName("BSTR *")] ushort** pBstrHelpFile) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ITypeInfo*)Unsafe.AsPointer(ref this), memid, pBstrName, pBstrDocString, pdwHelpContext, pBstrHelpFile); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT GetDllEntry([NativeTypeName("MEMBERID")] int memid, INVOKEKIND invKind, [NativeTypeName("BSTR *")] ushort** pBstrDllName, [NativeTypeName("BSTR *")] ushort** pBstrName, [NativeTypeName("WORD *")] ushort* pwOrdinal) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ITypeInfo*)Unsafe.AsPointer(ref this), memid, invKind, pBstrDllName, pBstrName, pwOrdinal); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT GetRefTypeInfo([NativeTypeName("HREFTYPE")] uint hRefType, ITypeInfo** ppTInfo) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ITypeInfo*)Unsafe.AsPointer(ref this), hRefType, ppTInfo); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT AddressOfMember([NativeTypeName("MEMBERID")] int memid, INVOKEKIND invKind, [NativeTypeName("PVOID *")] void** ppv) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ITypeInfo*)Unsafe.AsPointer(ref this), memid, invKind, ppv); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT CreateInstance(IUnknown* pUnkOuter, [NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("PVOID *")] void** ppvObj) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((ITypeInfo*)Unsafe.AsPointer(ref this), pUnkOuter, riid, ppvObj); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public HRESULT GetMops([NativeTypeName("MEMBERID")] int memid, [NativeTypeName("BSTR *")] ushort** pBstrMops) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((ITypeInfo*)Unsafe.AsPointer(ref this), memid, pBstrMops); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public HRESULT GetContainingTypeLib(ITypeLib** ppTLib, uint* pIndex) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ITypeInfo*)Unsafe.AsPointer(ref this), ppTLib, pIndex); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(19)] - public void ReleaseTypeAttr(TYPEATTR* pTypeAttr) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ITypeInfo*)Unsafe.AsPointer(ref this), pTypeAttr); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(20)] - public void ReleaseFuncDesc(FUNCDESC* pFuncDesc) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((ITypeInfo*)Unsafe.AsPointer(ref this), pFuncDesc); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(21)] - public void ReleaseVarDesc(VARDESC* pVarDesc) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((ITypeInfo*)Unsafe.AsPointer(ref this), pVarDesc); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT GetTypeAttr(TYPEATTR** ppTypeAttr); - - [VtblIndex(4)] - HRESULT GetTypeComp(ITypeComp** ppTComp); - - [VtblIndex(5)] - HRESULT GetFuncDesc(uint index, FUNCDESC** ppFuncDesc); - - [VtblIndex(6)] - HRESULT GetVarDesc(uint index, VARDESC** ppVarDesc); - - [VtblIndex(7)] - HRESULT GetNames([NativeTypeName("MEMBERID")] int memid, [NativeTypeName("BSTR *")] ushort** rgBstrNames, uint cMaxNames, uint* pcNames); - - [VtblIndex(8)] - HRESULT GetRefTypeOfImplType(uint index, [NativeTypeName("HREFTYPE *")] uint* pRefType); - - [VtblIndex(9)] - HRESULT GetImplTypeFlags(uint index, int* pImplTypeFlags); - - [VtblIndex(10)] - HRESULT GetIDsOfNames([NativeTypeName("LPOLESTR *")] ushort** rgszNames, uint cNames, [NativeTypeName("MEMBERID *")] int* pMemId); - - [VtblIndex(11)] - HRESULT Invoke([NativeTypeName("PVOID")] void* pvInstance, [NativeTypeName("MEMBERID")] int memid, [NativeTypeName("WORD")] ushort wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO* pExcepInfo, uint* puArgErr); - - [VtblIndex(12)] - HRESULT GetDocumentation([NativeTypeName("MEMBERID")] int memid, [NativeTypeName("BSTR *")] ushort** pBstrName, [NativeTypeName("BSTR *")] ushort** pBstrDocString, [NativeTypeName("DWORD *")] uint* pdwHelpContext, [NativeTypeName("BSTR *")] ushort** pBstrHelpFile); - - [VtblIndex(13)] - HRESULT GetDllEntry([NativeTypeName("MEMBERID")] int memid, INVOKEKIND invKind, [NativeTypeName("BSTR *")] ushort** pBstrDllName, [NativeTypeName("BSTR *")] ushort** pBstrName, [NativeTypeName("WORD *")] ushort* pwOrdinal); - - [VtblIndex(14)] - HRESULT GetRefTypeInfo([NativeTypeName("HREFTYPE")] uint hRefType, ITypeInfo** ppTInfo); - - [VtblIndex(15)] - HRESULT AddressOfMember([NativeTypeName("MEMBERID")] int memid, INVOKEKIND invKind, [NativeTypeName("PVOID *")] void** ppv); - - [VtblIndex(16)] - HRESULT CreateInstance(IUnknown* pUnkOuter, [NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("PVOID *")] void** ppvObj); - - [VtblIndex(17)] - HRESULT GetMops([NativeTypeName("MEMBERID")] int memid, [NativeTypeName("BSTR *")] ushort** pBstrMops); - - [VtblIndex(18)] - HRESULT GetContainingTypeLib(ITypeLib** ppTLib, uint* pIndex); - - [VtblIndex(19)] - void ReleaseTypeAttr(TYPEATTR* pTypeAttr); - - [VtblIndex(20)] - void ReleaseFuncDesc(FUNCDESC* pFuncDesc); - - [VtblIndex(21)] - void ReleaseVarDesc(VARDESC* pVarDesc); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (TYPEATTR **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTypeAttr; - - [NativeTypeName("HRESULT (ITypeComp **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTypeComp; - - [NativeTypeName("HRESULT (UINT, FUNCDESC **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFuncDesc; - - [NativeTypeName("HRESULT (UINT, VARDESC **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetVarDesc; - - [NativeTypeName("HRESULT (MEMBERID, BSTR *, UINT, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetNames; - - [NativeTypeName("HRESULT (UINT, HREFTYPE *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetRefTypeOfImplType; - - [NativeTypeName("HRESULT (UINT, INT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetImplTypeFlags; - - [NativeTypeName("HRESULT (LPOLESTR *, UINT, MEMBERID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetIDsOfNames; - - [NativeTypeName("HRESULT (PVOID, MEMBERID, WORD, DISPPARAMS *, VARIANT *, EXCEPINFO *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Invoke; - - [NativeTypeName("HRESULT (MEMBERID, BSTR *, BSTR *, DWORD *, BSTR *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDocumentation; - - [NativeTypeName("HRESULT (MEMBERID, INVOKEKIND, BSTR *, BSTR *, WORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDllEntry; - - [NativeTypeName("HRESULT (HREFTYPE, ITypeInfo **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetRefTypeInfo; - - [NativeTypeName("HRESULT (MEMBERID, INVOKEKIND, PVOID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddressOfMember; - - [NativeTypeName("HRESULT (IUnknown *, const IID &, PVOID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateInstance; - - [NativeTypeName("HRESULT (MEMBERID, BSTR *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMops; - - [NativeTypeName("HRESULT (ITypeLib **, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetContainingTypeLib; - - [NativeTypeName("void (TYPEATTR *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ReleaseTypeAttr; - - [NativeTypeName("void (FUNCDESC *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ReleaseFuncDesc; - - [NativeTypeName("void (VARDESC *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ReleaseVarDesc; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/ITypeLib.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/ITypeLib.cs deleted file mode 100644 index 237d6063..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/ITypeLib.cs +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("00020402-0000-0000-C000-000000000046")] - [NativeTypeName("struct ITypeLib : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct ITypeLib : ITypeLib.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ITypeLib*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ITypeLib*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ITypeLib*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public uint GetTypeInfoCount() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ITypeLib*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetTypeInfo(uint index, ITypeInfo** ppTInfo) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ITypeLib*)Unsafe.AsPointer(ref this), index, ppTInfo); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetTypeInfoType(uint index, TYPEKIND* pTKind) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ITypeLib*)Unsafe.AsPointer(ref this), index, pTKind); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetTypeInfoOfGuid([NativeTypeName("const GUID &")] Guid* guid, ITypeInfo** ppTinfo) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ITypeLib*)Unsafe.AsPointer(ref this), guid, ppTinfo); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT GetLibAttr(TLIBATTR** ppTLibAttr) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ITypeLib*)Unsafe.AsPointer(ref this), ppTLibAttr); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT GetTypeComp(ITypeComp** ppTComp) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ITypeLib*)Unsafe.AsPointer(ref this), ppTComp); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT GetDocumentation(int index, [NativeTypeName("BSTR *")] ushort** pBstrName, [NativeTypeName("BSTR *")] ushort** pBstrDocString, [NativeTypeName("DWORD *")] uint* pdwHelpContext, [NativeTypeName("BSTR *")] ushort** pBstrHelpFile) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ITypeLib*)Unsafe.AsPointer(ref this), index, pBstrName, pBstrDocString, pdwHelpContext, pBstrHelpFile); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT IsName([NativeTypeName("LPOLESTR")] ushort* szNameBuf, [NativeTypeName("ULONG")] uint lHashVal, BOOL* pfName) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ITypeLib*)Unsafe.AsPointer(ref this), szNameBuf, lHashVal, pfName); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT FindName([NativeTypeName("LPOLESTR")] ushort* szNameBuf, [NativeTypeName("ULONG")] uint lHashVal, ITypeInfo** ppTInfo, [NativeTypeName("MEMBERID *")] int* rgMemId, ushort* pcFound) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ITypeLib*)Unsafe.AsPointer(ref this), szNameBuf, lHashVal, ppTInfo, rgMemId, pcFound); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public void ReleaseTLibAttr(TLIBATTR* pTLibAttr) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ITypeLib*)Unsafe.AsPointer(ref this), pTLibAttr); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - uint GetTypeInfoCount(); - - [VtblIndex(4)] - HRESULT GetTypeInfo(uint index, ITypeInfo** ppTInfo); - - [VtblIndex(5)] - HRESULT GetTypeInfoType(uint index, TYPEKIND* pTKind); - - [VtblIndex(6)] - HRESULT GetTypeInfoOfGuid([NativeTypeName("const GUID &")] Guid* guid, ITypeInfo** ppTinfo); - - [VtblIndex(7)] - HRESULT GetLibAttr(TLIBATTR** ppTLibAttr); - - [VtblIndex(8)] - HRESULT GetTypeComp(ITypeComp** ppTComp); - - [VtblIndex(9)] - HRESULT GetDocumentation(int index, [NativeTypeName("BSTR *")] ushort** pBstrName, [NativeTypeName("BSTR *")] ushort** pBstrDocString, [NativeTypeName("DWORD *")] uint* pdwHelpContext, [NativeTypeName("BSTR *")] ushort** pBstrHelpFile); - - [VtblIndex(10)] - HRESULT IsName([NativeTypeName("LPOLESTR")] ushort* szNameBuf, [NativeTypeName("ULONG")] uint lHashVal, BOOL* pfName); - - [VtblIndex(11)] - HRESULT FindName([NativeTypeName("LPOLESTR")] ushort* szNameBuf, [NativeTypeName("ULONG")] uint lHashVal, ITypeInfo** ppTInfo, [NativeTypeName("MEMBERID *")] int* rgMemId, ushort* pcFound); - - [VtblIndex(12)] - void ReleaseTLibAttr(TLIBATTR* pTLibAttr); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("UINT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTypeInfoCount; - - [NativeTypeName("HRESULT (UINT, ITypeInfo **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTypeInfo; - - [NativeTypeName("HRESULT (UINT, TYPEKIND *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTypeInfoType; - - [NativeTypeName("HRESULT (const GUID &, ITypeInfo **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTypeInfoOfGuid; - - [NativeTypeName("HRESULT (TLIBATTR **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetLibAttr; - - [NativeTypeName("HRESULT (ITypeComp **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetTypeComp; - - [NativeTypeName("HRESULT (INT, BSTR *, BSTR *, DWORD *, BSTR *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDocumentation; - - [NativeTypeName("HRESULT (LPOLESTR, ULONG, BOOL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsName; - - [NativeTypeName("HRESULT (LPOLESTR, ULONG, ITypeInfo **, MEMBERID *, USHORT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] FindName; - - [NativeTypeName("void (TLIBATTR *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] ReleaseTLibAttr; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/PARAMDESC.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/PARAMDESC.cs deleted file mode 100644 index 95e7f6f6..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/PARAMDESC.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct PARAMDESC - { - [NativeTypeName("LPPARAMDESCEX")] - public PARAMDESCEX* pparamdescex; - - public ushort wParamFlags; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/PARAMDESCEX.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/PARAMDESCEX.cs deleted file mode 100644 index bd2638b2..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/PARAMDESCEX.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal partial struct PARAMDESCEX - { - [NativeTypeName("ULONG")] - public uint cBytes; - - [NativeTypeName("VARIANTARG")] - public VARIANT varDefaultValue; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/SAFEARRAY.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/SAFEARRAY.cs deleted file mode 100644 index 1fbed974..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/SAFEARRAY.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct SAFEARRAY - { - public ushort cDims; - - public ushort fFeatures; - - [NativeTypeName("ULONG")] - public uint cbElements; - - [NativeTypeName("ULONG")] - public uint cLocks; - - [NativeTypeName("PVOID")] - public void* pvData; - - [NativeTypeName("SAFEARRAYBOUND [1]")] - public _rgsabound_e__FixedBuffer rgsabound; - - internal partial struct _rgsabound_e__FixedBuffer - { - public SAFEARRAYBOUND e0; - - public ref SAFEARRAYBOUND this[int index] - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref AsSpan(int.MaxValue)[index]; - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public Span AsSpan(int length) => MemoryMarshal.CreateSpan(ref e0, length); - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/SAFEARRAYBOUND.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/SAFEARRAYBOUND.cs deleted file mode 100644 index 7beba2fc..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/SAFEARRAYBOUND.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal partial struct SAFEARRAYBOUND - { - [NativeTypeName("ULONG")] - public uint cElements; - - [NativeTypeName("LONG")] - public int lLbound; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/SYSKIND.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/SYSKIND.cs deleted file mode 100644 index 41b40eca..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/SYSKIND.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal enum SYSKIND - { - SYS_WIN16 = 0, - SYS_WIN32 = (SYS_WIN16 + 1), - SYS_MAC = (SYS_WIN32 + 1), - SYS_WIN64 = (SYS_MAC + 1), - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/TLIBATTR.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/TLIBATTR.cs deleted file mode 100644 index a8b57263..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/TLIBATTR.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal partial struct TLIBATTR - { - public Guid guid; - - [NativeTypeName("LCID")] - public uint lcid; - - public SYSKIND syskind; - - [NativeTypeName("WORD")] - public ushort wMajorVerNum; - - [NativeTypeName("WORD")] - public ushort wMinorVerNum; - - [NativeTypeName("WORD")] - public ushort wLibFlags; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/TYPEATTR.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/TYPEATTR.cs deleted file mode 100644 index 43f66d6f..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/TYPEATTR.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct TYPEATTR - { - public Guid guid; - - [NativeTypeName("LCID")] - public uint lcid; - - [NativeTypeName("DWORD")] - public uint dwReserved; - - [NativeTypeName("MEMBERID")] - public int memidConstructor; - - [NativeTypeName("MEMBERID")] - public int memidDestructor; - - [NativeTypeName("LPOLESTR")] - public ushort* lpstrSchema; - - [NativeTypeName("ULONG")] - public uint cbSizeInstance; - - public TYPEKIND typekind; - - [NativeTypeName("WORD")] - public ushort cFuncs; - - [NativeTypeName("WORD")] - public ushort cVars; - - [NativeTypeName("WORD")] - public ushort cImplTypes; - - [NativeTypeName("WORD")] - public ushort cbSizeVft; - - [NativeTypeName("WORD")] - public ushort cbAlignment; - - [NativeTypeName("WORD")] - public ushort wTypeFlags; - - [NativeTypeName("WORD")] - public ushort wMajorVerNum; - - [NativeTypeName("WORD")] - public ushort wMinorVerNum; - - public TYPEDESC tdescAlias; - - public IDLDESC idldescType; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/TYPEDESC.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/TYPEDESC.cs deleted file mode 100644 index 30985c17..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/TYPEDESC.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct TYPEDESC - { - [NativeTypeName("tagTYPEDESC::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/oaidl.h:653:36)")] - public _Anonymous_e__Union Anonymous; - - [NativeTypeName("VARTYPE")] - public ushort vt; - - public ref TYPEDESC* lptdesc - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.lptdesc; - } - } - - public ref ARRAYDESC* lpadesc - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.lpadesc; - } - } - - public ref uint hreftype - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.hreftype, 1)); - } - } - - [StructLayout(LayoutKind.Explicit)] - internal unsafe partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - [NativeTypeName("struct tagTYPEDESC *")] - public TYPEDESC* lptdesc; - - [FieldOffset(0)] - [NativeTypeName("struct tagARRAYDESC *")] - public ARRAYDESC* lpadesc; - - [FieldOffset(0)] - [NativeTypeName("HREFTYPE")] - public uint hreftype; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/TYPEKIND.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/TYPEKIND.cs deleted file mode 100644 index 92ce62ba..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/TYPEKIND.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal enum TYPEKIND - { - TKIND_ENUM = 0, - TKIND_RECORD = (TKIND_ENUM + 1), - TKIND_MODULE = (TKIND_RECORD + 1), - TKIND_INTERFACE = (TKIND_MODULE + 1), - TKIND_DISPATCH = (TKIND_INTERFACE + 1), - TKIND_COCLASS = (TKIND_DISPATCH + 1), - TKIND_ALIAS = (TKIND_COCLASS + 1), - TKIND_UNION = (TKIND_ALIAS + 1), - TKIND_MAX = (TKIND_UNION + 1), - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/VARDESC.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/VARDESC.cs deleted file mode 100644 index 7e7b0168..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/VARDESC.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct VARDESC - { - [NativeTypeName("MEMBERID")] - public int memid; - - [NativeTypeName("LPOLESTR")] - public ushort* lpstrSchema; - - [NativeTypeName("tagVARDESC::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/oaidl.h:880:36)")] - public _Anonymous_e__Union Anonymous; - - public ELEMDESC elemdescVar; - - [NativeTypeName("WORD")] - public ushort wVarFlags; - - public VARKIND varkind; - - public ref uint oInst - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.oInst, 1)); - } - } - - public ref VARIANT* lpvarValue - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.lpvarValue; - } - } - - [StructLayout(LayoutKind.Explicit)] - internal unsafe partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - [NativeTypeName("ULONG")] - public uint oInst; - - [FieldOffset(0)] - public VARIANT* lpvarValue; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/VARIANT.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/VARIANT.cs deleted file mode 100644 index 27641c8e..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/VARIANT.cs +++ /dev/null @@ -1,686 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct VARIANT - { - [NativeTypeName("tagVARIANT::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/oaidl.h:478:5)")] - public _Anonymous_e__Union Anonymous; - - public ref ushort vt - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.vt, 1)); - } - } - - public ref ushort wReserved1 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.wReserved1, 1)); - } - } - - public ref ushort wReserved2 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.wReserved2, 1)); - } - } - - public ref ushort wReserved3 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.wReserved3, 1)); - } - } - - public ref long llVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.llVal, 1)); - } - } - - public ref int lVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.lVal, 1)); - } - } - - public ref byte bVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.bVal, 1)); - } - } - - public ref short iVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.iVal, 1)); - } - } - - public ref float fltVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.fltVal, 1)); - } - } - - public ref double dblVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.dblVal, 1)); - } - } - - public ref short boolVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.boolVal, 1)); - } - } - - public ref short __OBSOLETE__VARIANT_BOOL - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.__OBSOLETE__VARIANT_BOOL, 1)); - } - } - - public ref int scode - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.scode, 1)); - } - } - - public ref CY cyVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.cyVal, 1)); - } - } - - public ref double date - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.date, 1)); - } - } - - public ref ushort* bstrVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.bstrVal; - } - } - - public ref IUnknown* punkVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.punkVal; - } - } - - public ref IDispatch* pdispVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pdispVal; - } - } - - public ref SAFEARRAY* parray - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.parray; - } - } - - public ref byte* pbVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pbVal; - } - } - - public ref short* piVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.piVal; - } - } - - public ref int* plVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.plVal; - } - } - - public ref long* pllVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pllVal; - } - } - - public ref float* pfltVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pfltVal; - } - } - - public ref double* pdblVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pdblVal; - } - } - - public ref short* pboolVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pboolVal; - } - } - - public ref short* __OBSOLETE__VARIANT_PBOOL - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.__OBSOLETE__VARIANT_PBOOL; - } - } - - public ref int* pscode - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pscode; - } - } - - public ref CY* pcyVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pcyVal; - } - } - - public ref double* pdate - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pdate; - } - } - - public ref ushort** pbstrVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pbstrVal; - } - } - - public ref IUnknown** ppunkVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.ppunkVal; - } - } - - public ref IDispatch** ppdispVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.ppdispVal; - } - } - - public ref SAFEARRAY** pparray - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pparray; - } - } - - public ref VARIANT* pvarVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pvarVal; - } - } - - public ref void* byref - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.byref; - } - } - - public ref sbyte cVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.cVal, 1)); - } - } - - public ref ushort uiVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.uiVal, 1)); - } - } - - public ref uint ulVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.ulVal, 1)); - } - } - - public ref ulong ullVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.ullVal, 1)); - } - } - - public ref int intVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.intVal, 1)); - } - } - - public ref uint uintVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.Anonymous.uintVal, 1)); - } - } - - public ref DECIMAL* pdecVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pdecVal; - } - } - - public ref sbyte* pcVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pcVal; - } - } - - public ref ushort* puiVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.puiVal; - } - } - - public ref uint* pulVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pulVal; - } - } - - public ref ulong* pullVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pullVal; - } - } - - public ref int* pintVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.pintVal; - } - } - - public ref uint* puintVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.puintVal; - } - } - - public ref void* pvRecord - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.Anonymous.pvRecord; - } - } - - public ref IRecordInfo* pRecInfo - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref this, 1)).Anonymous.Anonymous.Anonymous.Anonymous.pRecInfo; - } - } - - public ref DECIMAL decVal - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.decVal, 1)); - } - } - - [StructLayout(LayoutKind.Explicit)] - internal unsafe partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - [NativeTypeName("tagVARIANT::(anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/oaidl.h:480:9)")] - public _Anonymous_e__Struct Anonymous; - - [FieldOffset(0)] - public DECIMAL decVal; - - internal unsafe partial struct _Anonymous_e__Struct - { - [NativeTypeName("VARTYPE")] - public ushort vt; - - [NativeTypeName("WORD")] - public ushort wReserved1; - - [NativeTypeName("WORD")] - public ushort wReserved2; - - [NativeTypeName("WORD")] - public ushort wReserved3; - - [NativeTypeName("tagVARIANT::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/oaidl.h:486:13)")] - public _Anonymous_e__Union Anonymous; - - [StructLayout(LayoutKind.Explicit)] - internal unsafe partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - [NativeTypeName("LONGLONG")] - public long llVal; - - [FieldOffset(0)] - [NativeTypeName("LONG")] - public int lVal; - - [FieldOffset(0)] - public byte bVal; - - [FieldOffset(0)] - public short iVal; - - [FieldOffset(0)] - public float fltVal; - - [FieldOffset(0)] - public double dblVal; - - [FieldOffset(0)] - [NativeTypeName("VARIANT_BOOL")] - public short boolVal; - - [FieldOffset(0)] - [NativeTypeName("VARIANT_BOOL")] - public short __OBSOLETE__VARIANT_BOOL; - - [FieldOffset(0)] - [NativeTypeName("SCODE")] - public int scode; - - [FieldOffset(0)] - public CY cyVal; - - [FieldOffset(0)] - [NativeTypeName("DATE")] - public double date; - - [FieldOffset(0)] - [NativeTypeName("BSTR")] - public ushort* bstrVal; - - [FieldOffset(0)] - public IUnknown* punkVal; - - [FieldOffset(0)] - public IDispatch* pdispVal; - - [FieldOffset(0)] - public SAFEARRAY* parray; - - [FieldOffset(0)] - public byte* pbVal; - - [FieldOffset(0)] - public short* piVal; - - [FieldOffset(0)] - [NativeTypeName("LONG *")] - public int* plVal; - - [FieldOffset(0)] - [NativeTypeName("LONGLONG *")] - public long* pllVal; - - [FieldOffset(0)] - public float* pfltVal; - - [FieldOffset(0)] - public double* pdblVal; - - [FieldOffset(0)] - [NativeTypeName("VARIANT_BOOL *")] - public short* pboolVal; - - [FieldOffset(0)] - [NativeTypeName("VARIANT_BOOL *")] - public short* __OBSOLETE__VARIANT_PBOOL; - - [FieldOffset(0)] - [NativeTypeName("SCODE *")] - public int* pscode; - - [FieldOffset(0)] - public CY* pcyVal; - - [FieldOffset(0)] - [NativeTypeName("DATE *")] - public double* pdate; - - [FieldOffset(0)] - [NativeTypeName("BSTR *")] - public ushort** pbstrVal; - - [FieldOffset(0)] - public IUnknown** ppunkVal; - - [FieldOffset(0)] - public IDispatch** ppdispVal; - - [FieldOffset(0)] - public SAFEARRAY** pparray; - - [FieldOffset(0)] - public VARIANT* pvarVal; - - [FieldOffset(0)] - [NativeTypeName("PVOID")] - public void* byref; - - [FieldOffset(0)] - [NativeTypeName("CHAR")] - public sbyte cVal; - - [FieldOffset(0)] - public ushort uiVal; - - [FieldOffset(0)] - [NativeTypeName("ULONG")] - public uint ulVal; - - [FieldOffset(0)] - [NativeTypeName("ULONGLONG")] - public ulong ullVal; - - [FieldOffset(0)] - public int intVal; - - [FieldOffset(0)] - public uint uintVal; - - [FieldOffset(0)] - public DECIMAL* pdecVal; - - [FieldOffset(0)] - [NativeTypeName("CHAR *")] - public sbyte* pcVal; - - [FieldOffset(0)] - public ushort* puiVal; - - [FieldOffset(0)] - [NativeTypeName("ULONG *")] - public uint* pulVal; - - [FieldOffset(0)] - [NativeTypeName("ULONGLONG *")] - public ulong* pullVal; - - [FieldOffset(0)] - public int* pintVal; - - [FieldOffset(0)] - public uint* puintVal; - - [FieldOffset(0)] - [NativeTypeName("tagVARIANT::(anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/oaidl.h:533:17)")] - public _Anonymous_e__Struct Anonymous; - - internal unsafe partial struct _Anonymous_e__Struct - { - [NativeTypeName("PVOID")] - public void* pvRecord; - - public IRecordInfo* pRecInfo; - } - } - } - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/oaidl/VARKIND.cs b/src/TerraFX.Interop.Windows/Windows/um/oaidl/VARKIND.cs deleted file mode 100644 index e8288cf9..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/oaidl/VARKIND.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/oaidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal enum VARKIND - { - VAR_PERINSTANCE = 0, - VAR_STATIC = (VAR_PERINSTANCE + 1), - VAR_CONST = (VAR_STATIC + 1), - VAR_DISPATCH = (VAR_CONST + 1), - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/objidl/IEnumSTATSTG.cs b/src/TerraFX.Interop.Windows/Windows/um/objidl/IEnumSTATSTG.cs deleted file mode 100644 index 0edb8e03..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/objidl/IEnumSTATSTG.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/objidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("0000000D-0000-0000-C000-000000000046")] - [NativeTypeName("struct IEnumSTATSTG : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IEnumSTATSTG : IEnumSTATSTG.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IEnumSTATSTG*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IEnumSTATSTG*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IEnumSTATSTG*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT Next([NativeTypeName("ULONG")] uint celt, STATSTG* rgelt, [NativeTypeName("ULONG *")] uint* pceltFetched) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IEnumSTATSTG*)Unsafe.AsPointer(ref this), celt, rgelt, pceltFetched); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT Skip([NativeTypeName("ULONG")] uint celt) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IEnumSTATSTG*)Unsafe.AsPointer(ref this), celt); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT Reset() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IEnumSTATSTG*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT Clone(IEnumSTATSTG** ppenum) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IEnumSTATSTG*)Unsafe.AsPointer(ref this), ppenum); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT Next([NativeTypeName("ULONG")] uint celt, STATSTG* rgelt, [NativeTypeName("ULONG *")] uint* pceltFetched); - - [VtblIndex(4)] - HRESULT Skip([NativeTypeName("ULONG")] uint celt); - - [VtblIndex(5)] - HRESULT Reset(); - - [VtblIndex(6)] - HRESULT Clone(IEnumSTATSTG** ppenum); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (ULONG, STATSTG *, ULONG *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Next; - - [NativeTypeName("HRESULT (ULONG) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Skip; - - [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Reset; - - [NativeTypeName("HRESULT (IEnumSTATSTG **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Clone; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/objidl/IStorage.cs b/src/TerraFX.Interop.Windows/Windows/um/objidl/IStorage.cs deleted file mode 100644 index 27a73a89..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/objidl/IStorage.cs +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/objidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("0000000B-0000-0000-C000-000000000046")] - [NativeTypeName("struct IStorage : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IStorage : IStorage.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IStorage*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IStorage*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IStorage*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT CreateStream([NativeTypeName("const OLECHAR *")] ushort* pwcsName, [NativeTypeName("DWORD")] uint grfMode, [NativeTypeName("DWORD")] uint reserved1, [NativeTypeName("DWORD")] uint reserved2, IStream** ppstm) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IStorage*)Unsafe.AsPointer(ref this), pwcsName, grfMode, reserved1, reserved2, ppstm); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT OpenStream([NativeTypeName("const OLECHAR *")] ushort* pwcsName, void* reserved1, [NativeTypeName("DWORD")] uint grfMode, [NativeTypeName("DWORD")] uint reserved2, IStream** ppstm) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IStorage*)Unsafe.AsPointer(ref this), pwcsName, reserved1, grfMode, reserved2, ppstm); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT CreateStorage([NativeTypeName("const OLECHAR *")] ushort* pwcsName, [NativeTypeName("DWORD")] uint grfMode, [NativeTypeName("DWORD")] uint reserved1, [NativeTypeName("DWORD")] uint reserved2, IStorage** ppstg) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IStorage*)Unsafe.AsPointer(ref this), pwcsName, grfMode, reserved1, reserved2, ppstg); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT OpenStorage([NativeTypeName("const OLECHAR *")] ushort* pwcsName, IStorage* pstgPriority, [NativeTypeName("DWORD")] uint grfMode, [NativeTypeName("SNB")] ushort** snbExclude, [NativeTypeName("DWORD")] uint reserved, IStorage** ppstg) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IStorage*)Unsafe.AsPointer(ref this), pwcsName, pstgPriority, grfMode, snbExclude, reserved, ppstg); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT CopyTo([NativeTypeName("DWORD")] uint ciidExclude, [NativeTypeName("const IID *")] Guid* rgiidExclude, [NativeTypeName("SNB")] ushort** snbExclude, IStorage* pstgDest) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IStorage*)Unsafe.AsPointer(ref this), ciidExclude, rgiidExclude, snbExclude, pstgDest); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT MoveElementTo([NativeTypeName("const OLECHAR *")] ushort* pwcsName, IStorage* pstgDest, [NativeTypeName("const OLECHAR *")] ushort* pwcsNewName, [NativeTypeName("DWORD")] uint grfFlags) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IStorage*)Unsafe.AsPointer(ref this), pwcsName, pstgDest, pwcsNewName, grfFlags); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT Commit([NativeTypeName("DWORD")] uint grfCommitFlags) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IStorage*)Unsafe.AsPointer(ref this), grfCommitFlags); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT Revert() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IStorage*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT EnumElements([NativeTypeName("DWORD")] uint reserved1, void* reserved2, [NativeTypeName("DWORD")] uint reserved3, IEnumSTATSTG** ppenum) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IStorage*)Unsafe.AsPointer(ref this), reserved1, reserved2, reserved3, ppenum); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT DestroyElement([NativeTypeName("const OLECHAR *")] ushort* pwcsName) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IStorage*)Unsafe.AsPointer(ref this), pwcsName); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT RenameElement([NativeTypeName("const OLECHAR *")] ushort* pwcsOldName, [NativeTypeName("const OLECHAR *")] ushort* pwcsNewName) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IStorage*)Unsafe.AsPointer(ref this), pwcsOldName, pwcsNewName); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT SetElementTimes([NativeTypeName("const OLECHAR *")] ushort* pwcsName, [NativeTypeName("const FILETIME *")] FILETIME* pctime, [NativeTypeName("const FILETIME *")] FILETIME* patime, [NativeTypeName("const FILETIME *")] FILETIME* pmtime) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IStorage*)Unsafe.AsPointer(ref this), pwcsName, pctime, patime, pmtime); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT SetClass([NativeTypeName("const IID &")] Guid* clsid) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IStorage*)Unsafe.AsPointer(ref this), clsid); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT SetStateBits([NativeTypeName("DWORD")] uint grfStateBits, [NativeTypeName("DWORD")] uint grfMask) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IStorage*)Unsafe.AsPointer(ref this), grfStateBits, grfMask); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public HRESULT Stat(STATSTG* pstatstg, [NativeTypeName("DWORD")] uint grfStatFlag) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IStorage*)Unsafe.AsPointer(ref this), pstatstg, grfStatFlag); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT CreateStream([NativeTypeName("const OLECHAR *")] ushort* pwcsName, [NativeTypeName("DWORD")] uint grfMode, [NativeTypeName("DWORD")] uint reserved1, [NativeTypeName("DWORD")] uint reserved2, IStream** ppstm); - - [VtblIndex(4)] - HRESULT OpenStream([NativeTypeName("const OLECHAR *")] ushort* pwcsName, void* reserved1, [NativeTypeName("DWORD")] uint grfMode, [NativeTypeName("DWORD")] uint reserved2, IStream** ppstm); - - [VtblIndex(5)] - HRESULT CreateStorage([NativeTypeName("const OLECHAR *")] ushort* pwcsName, [NativeTypeName("DWORD")] uint grfMode, [NativeTypeName("DWORD")] uint reserved1, [NativeTypeName("DWORD")] uint reserved2, IStorage** ppstg); - - [VtblIndex(6)] - HRESULT OpenStorage([NativeTypeName("const OLECHAR *")] ushort* pwcsName, IStorage* pstgPriority, [NativeTypeName("DWORD")] uint grfMode, [NativeTypeName("SNB")] ushort** snbExclude, [NativeTypeName("DWORD")] uint reserved, IStorage** ppstg); - - [VtblIndex(7)] - HRESULT CopyTo([NativeTypeName("DWORD")] uint ciidExclude, [NativeTypeName("const IID *")] Guid* rgiidExclude, [NativeTypeName("SNB")] ushort** snbExclude, IStorage* pstgDest); - - [VtblIndex(8)] - HRESULT MoveElementTo([NativeTypeName("const OLECHAR *")] ushort* pwcsName, IStorage* pstgDest, [NativeTypeName("const OLECHAR *")] ushort* pwcsNewName, [NativeTypeName("DWORD")] uint grfFlags); - - [VtblIndex(9)] - HRESULT Commit([NativeTypeName("DWORD")] uint grfCommitFlags); - - [VtblIndex(10)] - HRESULT Revert(); - - [VtblIndex(11)] - HRESULT EnumElements([NativeTypeName("DWORD")] uint reserved1, void* reserved2, [NativeTypeName("DWORD")] uint reserved3, IEnumSTATSTG** ppenum); - - [VtblIndex(12)] - HRESULT DestroyElement([NativeTypeName("const OLECHAR *")] ushort* pwcsName); - - [VtblIndex(13)] - HRESULT RenameElement([NativeTypeName("const OLECHAR *")] ushort* pwcsOldName, [NativeTypeName("const OLECHAR *")] ushort* pwcsNewName); - - [VtblIndex(14)] - HRESULT SetElementTimes([NativeTypeName("const OLECHAR *")] ushort* pwcsName, [NativeTypeName("const FILETIME *")] FILETIME* pctime, [NativeTypeName("const FILETIME *")] FILETIME* patime, [NativeTypeName("const FILETIME *")] FILETIME* pmtime); - - [VtblIndex(15)] - HRESULT SetClass([NativeTypeName("const IID &")] Guid* clsid); - - [VtblIndex(16)] - HRESULT SetStateBits([NativeTypeName("DWORD")] uint grfStateBits, [NativeTypeName("DWORD")] uint grfMask); - - [VtblIndex(17)] - HRESULT Stat(STATSTG* pstatstg, [NativeTypeName("DWORD")] uint grfStatFlag); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (const OLECHAR *, DWORD, DWORD, DWORD, IStream **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateStream; - - [NativeTypeName("HRESULT (const OLECHAR *, void *, DWORD, DWORD, IStream **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] OpenStream; - - [NativeTypeName("HRESULT (const OLECHAR *, DWORD, DWORD, DWORD, IStorage **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateStorage; - - [NativeTypeName("HRESULT (const OLECHAR *, IStorage *, DWORD, SNB, DWORD, IStorage **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] OpenStorage; - - [NativeTypeName("HRESULT (DWORD, const IID *, SNB, IStorage *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyTo; - - [NativeTypeName("HRESULT (const OLECHAR *, IStorage *, const OLECHAR *, DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] MoveElementTo; - - [NativeTypeName("HRESULT (DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Commit; - - [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Revert; - - [NativeTypeName("HRESULT (DWORD, void *, DWORD, IEnumSTATSTG **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] EnumElements; - - [NativeTypeName("HRESULT (const OLECHAR *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DestroyElement; - - [NativeTypeName("HRESULT (const OLECHAR *, const OLECHAR *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RenameElement; - - [NativeTypeName("HRESULT (const OLECHAR *, const FILETIME *, const FILETIME *, const FILETIME *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetElementTimes; - - [NativeTypeName("HRESULT (const IID &) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetClass; - - [NativeTypeName("HRESULT (DWORD, DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetStateBits; - - [NativeTypeName("HRESULT (STATSTG *, DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Stat; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/objidlbase/IEnumString.cs b/src/TerraFX.Interop.Windows/Windows/um/objidlbase/IEnumString.cs deleted file mode 100644 index 6f1fc68d..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/objidlbase/IEnumString.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/objidlbase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("00000101-0000-0000-C000-000000000046")] - [NativeTypeName("struct IEnumString : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IEnumString : IEnumString.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IEnumString*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IEnumString*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IEnumString*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT Next([NativeTypeName("ULONG")] uint celt, [NativeTypeName("LPOLESTR *")] ushort** rgelt, [NativeTypeName("ULONG *")] uint* pceltFetched) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IEnumString*)Unsafe.AsPointer(ref this), celt, rgelt, pceltFetched); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT Skip([NativeTypeName("ULONG")] uint celt) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IEnumString*)Unsafe.AsPointer(ref this), celt); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT Reset() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IEnumString*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT Clone(IEnumString** ppenum) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IEnumString*)Unsafe.AsPointer(ref this), ppenum); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT Next([NativeTypeName("ULONG")] uint celt, [NativeTypeName("LPOLESTR *")] ushort** rgelt, [NativeTypeName("ULONG *")] uint* pceltFetched); - - [VtblIndex(4)] - HRESULT Skip([NativeTypeName("ULONG")] uint celt); - - [VtblIndex(5)] - HRESULT Reset(); - - [VtblIndex(6)] - HRESULT Clone(IEnumString** ppenum); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (ULONG, LPOLESTR *, ULONG *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Next; - - [NativeTypeName("HRESULT (ULONG) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Skip; - - [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Reset; - - [NativeTypeName("HRESULT (IEnumString **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Clone; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/objidlbase/IEnumUnknown.cs b/src/TerraFX.Interop.Windows/Windows/um/objidlbase/IEnumUnknown.cs deleted file mode 100644 index 0bc2e6cf..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/objidlbase/IEnumUnknown.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/objidlbase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("00000100-0000-0000-C000-000000000046")] - [NativeTypeName("struct IEnumUnknown : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IEnumUnknown : IEnumUnknown.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IEnumUnknown*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IEnumUnknown*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IEnumUnknown*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT Next([NativeTypeName("ULONG")] uint celt, IUnknown** rgelt, [NativeTypeName("ULONG *")] uint* pceltFetched) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IEnumUnknown*)Unsafe.AsPointer(ref this), celt, rgelt, pceltFetched); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT Skip([NativeTypeName("ULONG")] uint celt) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IEnumUnknown*)Unsafe.AsPointer(ref this), celt); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT Reset() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IEnumUnknown*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT Clone(IEnumUnknown** ppenum) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IEnumUnknown*)Unsafe.AsPointer(ref this), ppenum); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT Next([NativeTypeName("ULONG")] uint celt, IUnknown** rgelt, [NativeTypeName("ULONG *")] uint* pceltFetched); - - [VtblIndex(4)] - HRESULT Skip([NativeTypeName("ULONG")] uint celt); - - [VtblIndex(5)] - HRESULT Reset(); - - [VtblIndex(6)] - HRESULT Clone(IEnumUnknown** ppenum); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (ULONG, IUnknown **, ULONG *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Next; - - [NativeTypeName("HRESULT (ULONG) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Skip; - - [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Reset; - - [NativeTypeName("HRESULT (IEnumUnknown **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Clone; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/objidlbase/IMalloc.cs b/src/TerraFX.Interop.Windows/Windows/um/objidlbase/IMalloc.cs deleted file mode 100644 index fbefc68f..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/objidlbase/IMalloc.cs +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/objidlbase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("00000002-0000-0000-C000-000000000046")] - [NativeTypeName("struct IMalloc : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IMalloc : IMalloc.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IMalloc*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IMalloc*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IMalloc*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public void* Alloc([NativeTypeName("SIZE_T")] nuint cb) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IMalloc*)Unsafe.AsPointer(ref this), cb); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public void* Realloc(void* pv, [NativeTypeName("SIZE_T")] nuint cb) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IMalloc*)Unsafe.AsPointer(ref this), pv, cb); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public void Free(void* pv) - { - ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IMalloc*)Unsafe.AsPointer(ref this), pv); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - [return: NativeTypeName("SIZE_T")] - public nuint GetSize(void* pv) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IMalloc*)Unsafe.AsPointer(ref this), pv); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public int DidAlloc(void* pv) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IMalloc*)Unsafe.AsPointer(ref this), pv); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public void HeapMinimize() - { - ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IMalloc*)Unsafe.AsPointer(ref this)); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - void* Alloc([NativeTypeName("SIZE_T")] nuint cb); - - [VtblIndex(4)] - void* Realloc(void* pv, [NativeTypeName("SIZE_T")] nuint cb); - - [VtblIndex(5)] - void Free(void* pv); - - [VtblIndex(6)] - [return: NativeTypeName("SIZE_T")] - nuint GetSize(void* pv); - - [VtblIndex(7)] - int DidAlloc(void* pv); - - [VtblIndex(8)] - void HeapMinimize(); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("void *(SIZE_T) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Alloc; - - [NativeTypeName("void *(void *, SIZE_T) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Realloc; - - [NativeTypeName("void (void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Free; - - [NativeTypeName("SIZE_T (void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSize; - - [NativeTypeName("int (void *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DidAlloc; - - [NativeTypeName("void () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] HeapMinimize; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/objidlbase/ISequentialStream.cs b/src/TerraFX.Interop.Windows/Windows/um/objidlbase/ISequentialStream.cs deleted file mode 100644 index 309eebb6..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/objidlbase/ISequentialStream.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/objidlbase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("0C733A30-2A1C-11CE-ADE5-00AA0044773D")] - [NativeTypeName("struct ISequentialStream : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct ISequentialStream : ISequentialStream.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ISequentialStream*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ISequentialStream*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ISequentialStream*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT Read(void* pv, [NativeTypeName("ULONG")] uint cb, [NativeTypeName("ULONG *")] uint* pcbRead) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ISequentialStream*)Unsafe.AsPointer(ref this), pv, cb, pcbRead); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT Write([NativeTypeName("const void *")] void* pv, [NativeTypeName("ULONG")] uint cb, [NativeTypeName("ULONG *")] uint* pcbWritten) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ISequentialStream*)Unsafe.AsPointer(ref this), pv, cb, pcbWritten); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT Read(void* pv, [NativeTypeName("ULONG")] uint cb, [NativeTypeName("ULONG *")] uint* pcbRead); - - [VtblIndex(4)] - HRESULT Write([NativeTypeName("const void *")] void* pv, [NativeTypeName("ULONG")] uint cb, [NativeTypeName("ULONG *")] uint* pcbWritten); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (void *, ULONG, ULONG *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Read; - - [NativeTypeName("HRESULT (const void *, ULONG, ULONG *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Write; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/objidlbase/IStream.cs b/src/TerraFX.Interop.Windows/Windows/um/objidlbase/IStream.cs index 90ac48f6..9481b8aa 100644 --- a/src/TerraFX.Interop.Windows/Windows/um/objidlbase/IStream.cs +++ b/src/TerraFX.Interop.Windows/Windows/um/objidlbase/IStream.cs @@ -12,7 +12,7 @@ namespace TerraFX.Interop.Windows [Guid("0000000C-0000-0000-C000-000000000046")] [NativeTypeName("struct IStream : ISequentialStream")] [NativeInheritance("ISequentialStream")] - internal unsafe partial struct IStream : IStream.Interface + internal unsafe partial struct IStream { public void** lpVtbl; @@ -102,93 +102,11 @@ namespace TerraFX.Interop.Windows return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IStream*)Unsafe.AsPointer(ref this), libOffset, cb, dwLockType); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT Stat(STATSTG* pstatstg, [NativeTypeName("DWORD")] uint grfStatFlag) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IStream*)Unsafe.AsPointer(ref this), pstatstg, grfStatFlag); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(13)] public HRESULT Clone(IStream** ppstm) { return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IStream*)Unsafe.AsPointer(ref this), ppstm); } - - public interface Interface : ISequentialStream.Interface - { - [VtblIndex(5)] - HRESULT Seek(LARGE_INTEGER dlibMove, [NativeTypeName("DWORD")] uint dwOrigin, ULARGE_INTEGER* plibNewPosition); - - [VtblIndex(6)] - HRESULT SetSize(ULARGE_INTEGER libNewSize); - - [VtblIndex(7)] - HRESULT CopyTo(IStream* pstm, ULARGE_INTEGER cb, ULARGE_INTEGER* pcbRead, ULARGE_INTEGER* pcbWritten); - - [VtblIndex(8)] - HRESULT Commit([NativeTypeName("DWORD")] uint grfCommitFlags); - - [VtblIndex(9)] - HRESULT Revert(); - - [VtblIndex(10)] - HRESULT LockRegion(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, [NativeTypeName("DWORD")] uint dwLockType); - - [VtblIndex(11)] - HRESULT UnlockRegion(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, [NativeTypeName("DWORD")] uint dwLockType); - - [VtblIndex(12)] - HRESULT Stat(STATSTG* pstatstg, [NativeTypeName("DWORD")] uint grfStatFlag); - - [VtblIndex(13)] - HRESULT Clone(IStream** ppstm); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (void *, ULONG, ULONG *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Read; - - [NativeTypeName("HRESULT (const void *, ULONG, ULONG *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Write; - - [NativeTypeName("HRESULT (LARGE_INTEGER, DWORD, ULARGE_INTEGER *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Seek; - - [NativeTypeName("HRESULT (ULARGE_INTEGER) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetSize; - - [NativeTypeName("HRESULT (IStream *, ULARGE_INTEGER, ULARGE_INTEGER *, ULARGE_INTEGER *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyTo; - - [NativeTypeName("HRESULT (DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Commit; - - [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Revert; - - [NativeTypeName("HRESULT (ULARGE_INTEGER, ULARGE_INTEGER, DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] LockRegion; - - [NativeTypeName("HRESULT (ULARGE_INTEGER, ULARGE_INTEGER, DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] UnlockRegion; - - [NativeTypeName("HRESULT (STATSTG *, DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Stat; - - [NativeTypeName("HRESULT (IStream **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Clone; - } } } diff --git a/src/TerraFX.Interop.Windows/Windows/um/objidlbase/STATSTG.cs b/src/TerraFX.Interop.Windows/Windows/um/objidlbase/STATSTG.cs deleted file mode 100644 index cd068dfe..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/objidlbase/STATSTG.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/objidlbase.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct STATSTG - { - [NativeTypeName("LPOLESTR")] - public ushort* pwcsName; - - [NativeTypeName("DWORD")] - public uint type; - - public ULARGE_INTEGER cbSize; - - public FILETIME mtime; - - public FILETIME ctime; - - public FILETIME atime; - - [NativeTypeName("DWORD")] - public uint grfMode; - - [NativeTypeName("DWORD")] - public uint grfLocksSupported; - - [NativeTypeName("CLSID")] - public Guid clsid; - - [NativeTypeName("DWORD")] - public uint grfStateBits; - - [NativeTypeName("DWORD")] - public uint reserved; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/ocidl/IPropertyBag2.cs b/src/TerraFX.Interop.Windows/Windows/um/ocidl/IPropertyBag2.cs deleted file mode 100644 index 203f9fcd..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/ocidl/IPropertyBag2.cs +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/ocidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("22F55882-280B-11D0-A8A9-00A0C90C2004")] - [NativeTypeName("struct IPropertyBag2 : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IPropertyBag2 : IPropertyBag2.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IPropertyBag2*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IPropertyBag2*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IPropertyBag2*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT Read([NativeTypeName("ULONG")] uint cProperties, PROPBAG2* pPropBag, IErrorLog* pErrLog, VARIANT* pvarValue, HRESULT* phrError) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IPropertyBag2*)Unsafe.AsPointer(ref this), cProperties, pPropBag, pErrLog, pvarValue, phrError); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT Write([NativeTypeName("ULONG")] uint cProperties, PROPBAG2* pPropBag, VARIANT* pvarValue) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IPropertyBag2*)Unsafe.AsPointer(ref this), cProperties, pPropBag, pvarValue); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT CountProperties([NativeTypeName("ULONG *")] uint* pcProperties) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IPropertyBag2*)Unsafe.AsPointer(ref this), pcProperties); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetPropertyInfo([NativeTypeName("ULONG")] uint iProperty, [NativeTypeName("ULONG")] uint cProperties, PROPBAG2* pPropBag, [NativeTypeName("ULONG *")] uint* pcProperties) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IPropertyBag2*)Unsafe.AsPointer(ref this), iProperty, cProperties, pPropBag, pcProperties); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT LoadObject([NativeTypeName("LPCOLESTR")] ushort* pstrName, [NativeTypeName("DWORD")] uint dwHint, IUnknown* pUnkObject, IErrorLog* pErrLog) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IPropertyBag2*)Unsafe.AsPointer(ref this), pstrName, dwHint, pUnkObject, pErrLog); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT Read([NativeTypeName("ULONG")] uint cProperties, PROPBAG2* pPropBag, IErrorLog* pErrLog, VARIANT* pvarValue, HRESULT* phrError); - - [VtblIndex(4)] - HRESULT Write([NativeTypeName("ULONG")] uint cProperties, PROPBAG2* pPropBag, VARIANT* pvarValue); - - [VtblIndex(5)] - HRESULT CountProperties([NativeTypeName("ULONG *")] uint* pcProperties); - - [VtblIndex(6)] - HRESULT GetPropertyInfo([NativeTypeName("ULONG")] uint iProperty, [NativeTypeName("ULONG")] uint cProperties, PROPBAG2* pPropBag, [NativeTypeName("ULONG *")] uint* pcProperties); - - [VtblIndex(7)] - HRESULT LoadObject([NativeTypeName("LPCOLESTR")] ushort* pstrName, [NativeTypeName("DWORD")] uint dwHint, IUnknown* pUnkObject, IErrorLog* pErrLog); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (ULONG, PROPBAG2 *, IErrorLog *, VARIANT *, HRESULT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Read; - - [NativeTypeName("HRESULT (ULONG, PROPBAG2 *, VARIANT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Write; - - [NativeTypeName("HRESULT (ULONG *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CountProperties; - - [NativeTypeName("HRESULT (ULONG, ULONG, PROPBAG2 *, ULONG *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPropertyInfo; - - [NativeTypeName("HRESULT (LPCOLESTR, DWORD, IUnknown *, IErrorLog *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] LoadObject; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/ocidl/PROPBAG2.cs b/src/TerraFX.Interop.Windows/Windows/um/ocidl/PROPBAG2.cs deleted file mode 100644 index f314a5ca..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/ocidl/PROPBAG2.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/ocidl.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct PROPBAG2 - { - [NativeTypeName("DWORD")] - public uint dwType; - - [NativeTypeName("VARTYPE")] - public ushort vt; - - [NativeTypeName("CLIPFORMAT")] - public ushort cfType; - - [NativeTypeName("DWORD")] - public uint dwHint; - - [NativeTypeName("LPOLESTR")] - public ushort* pstrName; - - [NativeTypeName("CLSID")] - public Guid clsid; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/synchapi/Windows.cs b/src/TerraFX.Interop.Windows/Windows/um/synchapi/Windows.cs new file mode 100644 index 00000000..99a954d9 --- /dev/null +++ b/src/TerraFX.Interop.Windows/Windows/um/synchapi/Windows.cs @@ -0,0 +1,16 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/synchapi.h in the Windows SDK for Windows 10.0.20348.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.Windows +{ + internal static unsafe partial class Windows + { + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint WaitForSingleObjectEx(HANDLE hHandle, [NativeTypeName("DWORD")] uint dwMilliseconds, BOOL bAlertable); + } +} diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/GUID.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/GUID.cs index 52e09c21..e010f513 100644 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/GUID.cs +++ b/src/TerraFX.Interop.Windows/Windows/um/wincodec/GUID.cs @@ -12,56 +12,6 @@ namespace TerraFX.Interop.Windows { internal static partial class GUID { - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_VendorMicrosoft - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0xCA, 0x49, 0xE7, 0xF0, - 0xEF, 0xED, - 0x89, 0x45, - 0xA7, - 0x3A, - 0xEE, - 0x0E, - 0x62, - 0x6A, - 0x2A, - 0x2B - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_VendorMicrosoftBuiltIn - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0xFD, 0x30, 0x7A, 0x25, - 0xB6, 0x06, - 0x2B, 0x46, - 0xAE, - 0xA4, - 0x63, - 0xF7, - 0x0B, - 0x86, - 0xE5, - 0x33 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - [NativeTypeName("const GUID")] public static ref readonly Guid GUID_ContainerFormatBmp { @@ -112,31 +62,6 @@ namespace TerraFX.Interop.Windows } } - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_ContainerFormatIco - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0xC4, 0x60, 0xA8, 0xA3, - 0x8F, 0x33, - 0x17, 0x4C, - 0x91, - 0x9A, - 0xFB, - 0xA4, - 0xB5, - 0x62, - 0x8F, - 0x21 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - [NativeTypeName("const GUID")] public static ref readonly Guid GUID_ContainerFormatJpeg { @@ -187,31 +112,6 @@ namespace TerraFX.Interop.Windows } } - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_ContainerFormatGif - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x01, 0x56, 0x8A, 0x1F, - 0x4D, 0x7D, - 0xBD, 0x4C, - 0x9C, - 0x82, - 0x1B, - 0xC8, - 0xD4, - 0xEE, - 0xB9, - 0xA5 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - [NativeTypeName("const GUID")] public static ref readonly Guid GUID_ContainerFormatWmp { @@ -262,306 +162,6 @@ namespace TerraFX.Interop.Windows } } - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_ContainerFormatAdng - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x0D, 0x6D, 0xFF, 0xF3, - 0xC0, 0x38, - 0xC4, 0x41, - 0xB1, - 0xFE, - 0x1F, - 0x38, - 0x24, - 0xF1, - 0x7B, - 0x84 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_ContainerFormatHeif - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x21, 0x25, 0xE6, 0xE1, - 0x87, 0x67, - 0x5B, 0x40, - 0xA3, - 0x39, - 0x50, - 0x07, - 0x15, - 0xB5, - 0x76, - 0x3F - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_ContainerFormatWebp - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0xE2, 0xB0, 0x94, 0xE0, - 0xF2, 0x67, - 0xB3, 0x45, - 0xB0, - 0xEA, - 0x11, - 0x53, - 0x37, - 0xCA, - 0x7C, - 0xF3 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_ContainerFormatRaw - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x60, 0xCE, 0x99, 0xFE, - 0x9C, 0xF1, - 0x3C, 0x43, - 0xA3, - 0xAE, - 0x00, - 0xAC, - 0xEF, - 0xA9, - 0xCA, - 0x21 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormatDontCare - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x00 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat1bppIndexed - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x01 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat2bppIndexed - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x02 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat4bppIndexed - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x03 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat8bppIndexed - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x04 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormatBlackWhite - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x05 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat2bppGray - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x06 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat4bppGray - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x07 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - [NativeTypeName("const GUID")] public static ref readonly Guid GUID_WICPixelFormat8bppGray { @@ -587,106 +187,6 @@ namespace TerraFX.Interop.Windows } } - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat8bppAlpha - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x16, 0x01, 0xCD, 0xE6, - 0xBA, 0xEE, - 0x61, 0x41, - 0xAA, - 0x85, - 0x27, - 0xDD, - 0x9F, - 0xB3, - 0xA8, - 0x95 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat16bppBGR555 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x09 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat16bppBGR565 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x0A - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat16bppBGRA5551 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x2B, 0x7C, 0xEC, 0x05, - 0xE6, 0xF1, - 0x61, 0x49, - 0xAD, - 0x46, - 0xE1, - 0xCC, - 0x81, - 0x0A, - 0x87, - 0xD2 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - [NativeTypeName("const GUID")] public static ref readonly Guid GUID_WICPixelFormat16bppGray { @@ -737,56 +237,6 @@ namespace TerraFX.Interop.Windows } } - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat24bppRGB - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x0D - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat32bppBGR - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x0E - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - [NativeTypeName("const GUID")] public static ref readonly Guid GUID_WICPixelFormat32bppBGRA { @@ -812,81 +262,6 @@ namespace TerraFX.Interop.Windows } } - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat32bppPBGRA - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x10 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat32bppGrayFloat - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x11 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat32bppRGB - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x95, 0x6B, 0x8C, 0xD9, - 0xFE, 0x3E, - 0xD6, 0x47, - 0xBB, - 0x25, - 0xEB, - 0x17, - 0x48, - 0xAB, - 0x0C, - 0xF1 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - [NativeTypeName("const GUID")] public static ref readonly Guid GUID_WICPixelFormat32bppRGBA { @@ -912,106 +287,6 @@ namespace TerraFX.Interop.Windows } } - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat32bppPRGBA - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x50, 0xA6, 0xC4, 0x3C, - 0x27, 0xA5, - 0x37, 0x4D, - 0xA9, - 0x16, - 0x31, - 0x42, - 0xC7, - 0xEB, - 0xED, - 0xBA - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat48bppRGB - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x15 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat48bppBGR - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x84, 0xA3, 0x05, 0xE6, - 0x68, 0xB4, - 0xCE, 0x46, - 0xBB, - 0x2E, - 0x36, - 0xF1, - 0x80, - 0xE6, - 0x43, - 0x13 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat64bppRGB - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x11, 0x21, 0x18, 0xA1, - 0x6D, 0x18, - 0x42, 0x4D, - 0xBC, - 0x6A, - 0x9C, - 0x83, - 0x03, - 0xA8, - 0xDF, - 0xF9 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - [NativeTypeName("const GUID")] public static ref readonly Guid GUID_WICPixelFormat64bppRGBA { @@ -1036,1583 +311,5 @@ namespace TerraFX.Interop.Windows return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); } } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat64bppBGRA - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x7C, 0xFF, 0x62, 0x15, - 0x52, 0xD3, - 0xF9, 0x46, - 0x97, - 0x9E, - 0x42, - 0x97, - 0x6B, - 0x79, - 0x22, - 0x46 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat64bppPRGBA - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x17 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat64bppPBGRA - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x8E, 0x8E, 0x51, 0x8C, - 0xEC, 0xA4, - 0x8B, 0x46, - 0xAE, - 0x70, - 0xC9, - 0xA3, - 0x5A, - 0x9C, - 0x55, - 0x30 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat16bppGrayFixedPoint - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x13 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat32bppBGR101010 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x14 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat48bppRGBFixedPoint - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x12 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat48bppBGRFixedPoint - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x0E, 0x14, 0xCA, 0x49, - 0xB6, 0xCA, - 0x3B, 0x49, - 0x9D, - 0xDF, - 0x60, - 0x18, - 0x7C, - 0x37, - 0x53, - 0x2A - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat96bppRGBFixedPoint - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x18 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat96bppRGBFloat - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x8F, 0xD7, 0xFE, 0xE3, - 0xDB, 0xE8, - 0xCF, 0x4A, - 0x84, - 0xC1, - 0xE9, - 0x7F, - 0x61, - 0x36, - 0xB3, - 0x27 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat128bppRGBAFloat - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x19 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat128bppPRGBAFloat - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x1A - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat128bppRGBFloat - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x1B - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat32bppCMYK - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x1C - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat64bppRGBAFixedPoint - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x1D - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat64bppBGRAFixedPoint - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x3C, 0xE3, 0x6D, 0x35, - 0xD2, 0x54, - 0x23, 0x4A, - 0xBB, - 0x04, - 0x9B, - 0x7B, - 0xF9, - 0xB1, - 0xD4, - 0x2D - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat64bppRGBFixedPoint - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x40 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat128bppRGBAFixedPoint - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x1E - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat128bppRGBFixedPoint - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x41 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat64bppRGBAHalf - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x3A - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat64bppPRGBAHalf - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0xC2, 0x26, 0xAD, 0x58, - 0x23, 0xC6, - 0x9D, 0x4D, - 0xB3, - 0x20, - 0x38, - 0x7E, - 0x49, - 0xF8, - 0xC4, - 0x42 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat64bppRGBHalf - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x42 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat48bppRGBHalf - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x3B - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat32bppRGBE - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x3D - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat16bppGrayHalf - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x3E - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat32bppGrayFixedPoint - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x3F - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat32bppRGBA1010102 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x72, 0x8D, 0x23, 0x25, - 0xF9, 0xFC, - 0x22, 0x45, - 0xB5, - 0x14, - 0x55, - 0x78, - 0xE5, - 0xAD, - 0x55, - 0xE0 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat32bppRGBA1010102XR - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x9A, 0x6B, 0xDE, 0x00, - 0x01, 0xC1, - 0x4B, 0x43, - 0xB5, - 0x02, - 0xD0, - 0x16, - 0x5E, - 0xE1, - 0x12, - 0x2C - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat32bppR10G10B10A2 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0xB5, 0x1B, 0x4E, 0x60, - 0x3C, 0x8A, - 0x65, 0x4B, - 0xB1, - 0x1C, - 0xBC, - 0x0B, - 0x8D, - 0xD7, - 0x5B, - 0x7F - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat32bppR10G10B10A2HDR10 - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x5D, 0x5C, 0x21, 0x9C, - 0xCC, 0x1A, - 0x0E, 0x4F, - 0xA4, - 0xBC, - 0x70, - 0xFB, - 0x3A, - 0xE8, - 0xFD, - 0x28 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat64bppCMYK - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x1F - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat24bpp3Channels - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x20 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat32bpp4Channels - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x21 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat40bpp5Channels - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x22 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat48bpp6Channels - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x23 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat56bpp7Channels - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x24 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat64bpp8Channels - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x25 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat48bpp3Channels - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x26 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat64bpp4Channels - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x27 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat80bpp5Channels - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x28 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat96bpp6Channels - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x29 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat112bpp7Channels - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x2A - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat128bpp8Channels - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x2B - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat40bppCMYKAlpha - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x2C - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat80bppCMYKAlpha - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x2D - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat32bpp3ChannelsAlpha - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x2E - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat40bpp4ChannelsAlpha - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x2F - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat48bpp5ChannelsAlpha - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x30 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat56bpp6ChannelsAlpha - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x31 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat64bpp7ChannelsAlpha - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x32 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat72bpp8ChannelsAlpha - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x33 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat64bpp3ChannelsAlpha - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x34 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat80bpp4ChannelsAlpha - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x35 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat96bpp5ChannelsAlpha - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x36 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat112bpp6ChannelsAlpha - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x37 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat128bpp7ChannelsAlpha - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x38 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat144bpp8ChannelsAlpha - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xC3, 0xDD, 0x6F, - 0x03, 0x4E, - 0xFE, 0x4B, - 0xB1, - 0x85, - 0x3D, - 0x77, - 0x76, - 0x8D, - 0xC9, - 0x39 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat8bppY - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x54, 0xDB, 0xB4, 0x91, - 0xF9, 0x2D, - 0xF0, 0x42, - 0xB4, - 0x49, - 0x29, - 0x09, - 0xBB, - 0x3D, - 0xF8, - 0x8E - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat8bppCb - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x24, 0xF2, 0x39, 0x13, - 0xFE, 0x6B, - 0x3E, 0x4C, - 0x93, - 0x02, - 0xE4, - 0xF3, - 0xA6, - 0xD0, - 0xCA, - 0x2A - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat8bppCr - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x53, 0x50, 0x14, 0xB8, - 0x16, 0x21, - 0xF0, 0x49, - 0x88, - 0x35, - 0xED, - 0x84, - 0x4B, - 0x20, - 0x5C, - 0x51 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat16bppCbCr - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x6E, 0xBA, 0x95, 0xFF, - 0xE0, 0x11, - 0x63, 0x42, - 0xBB, - 0x45, - 0x01, - 0x72, - 0x1F, - 0x34, - 0x60, - 0xA4 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat16bppYQuantizedDctCoefficients - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x33, 0xF4, 0x55, 0xA3, - 0xE8, 0x48, - 0x42, 0x4A, - 0x84, - 0xD8, - 0xE2, - 0xAA, - 0x26, - 0xCA, - 0x80, - 0xA4 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat16bppCbQuantizedDctCoefficients - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x61, 0xFF, 0xC4, 0xD2, - 0xA5, 0x56, - 0xC2, 0x49, - 0x8B, - 0x5C, - 0x4C, - 0x19, - 0x25, - 0x96, - 0x48, - 0x37 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid GUID_WICPixelFormat16bppCrQuantizedDctCoefficients - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0xF0, 0x54, 0xE3, 0x2F, - 0x80, 0x16, - 0xD8, 0x42, - 0x92, - 0x31, - 0xE7, - 0x3C, - 0x05, - 0x65, - 0xBF, - 0xC1 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("#define GUID_WICPixelFormatUndefined GUID_WICPixelFormatDontCare")] - public static ref readonly Guid GUID_WICPixelFormatUndefined => ref GUID_WICPixelFormatDontCare; } } diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmap.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmap.cs index d841c25e..9a11a6b5 100644 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmap.cs +++ b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmap.cs @@ -12,7 +12,7 @@ namespace TerraFX.Interop.Windows [Guid("00000121-A8F2-4877-BA0A-FD2B6645FB94")] [NativeTypeName("struct IWICBitmap : IWICBitmapSource")] [NativeInheritance("IWICBitmapSource")] - internal unsafe partial struct IWICBitmap : IWICBitmap.Interface + internal unsafe partial struct IWICBitmap { public void** lpVtbl; @@ -74,13 +74,6 @@ namespace TerraFX.Interop.Windows return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IWICBitmap*)Unsafe.AsPointer(ref this), prc, cbStride, cbBufferSize, pbBuffer); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT Lock([NativeTypeName("const WICRect *")] WICRect* prcLock, [NativeTypeName("DWORD")] uint flags, IWICBitmapLock** ppILock) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IWICBitmap*)Unsafe.AsPointer(ref this), prcLock, flags, ppILock); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(9)] public HRESULT SetPalette(IWICPalette* pIPalette) @@ -94,53 +87,5 @@ namespace TerraFX.Interop.Windows { return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IWICBitmap*)Unsafe.AsPointer(ref this), dpiX, dpiY); } - - public interface Interface : IWICBitmapSource.Interface - { - [VtblIndex(8)] - HRESULT Lock([NativeTypeName("const WICRect *")] WICRect* prcLock, [NativeTypeName("DWORD")] uint flags, IWICBitmapLock** ppILock); - - [VtblIndex(9)] - HRESULT SetPalette(IWICPalette* pIPalette); - - [VtblIndex(10)] - HRESULT SetResolution(double dpiX, double dpiY); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (UINT *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSize; - - [NativeTypeName("HRESULT (WICPixelFormatGUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelFormat; - - [NativeTypeName("HRESULT (double *, double *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetResolution; - - [NativeTypeName("HRESULT (IWICPalette *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyPalette; - - [NativeTypeName("HRESULT (const WICRect *, UINT, UINT, BYTE *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyPixels; - - [NativeTypeName("HRESULT (const WICRect *, DWORD, IWICBitmapLock **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Lock; - - [NativeTypeName("HRESULT (IWICPalette *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPalette; - - [NativeTypeName("HRESULT (double, double) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetResolution; - } } } diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapClipper.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapClipper.cs deleted file mode 100644 index 61a94f9c..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapClipper.cs +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("E4FBCF03-223D-4E81-9333-D635556DD1B5")] - [NativeTypeName("struct IWICBitmapClipper : IWICBitmapSource")] - [NativeInheritance("IWICBitmapSource")] - internal unsafe partial struct IWICBitmapClipper : IWICBitmapClipper.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IWICBitmapClipper*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IWICBitmapClipper*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IWICBitmapClipper*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetSize(uint* puiWidth, uint* puiHeight) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IWICBitmapClipper*)Unsafe.AsPointer(ref this), puiWidth, puiHeight); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetPixelFormat([NativeTypeName("WICPixelFormatGUID *")] Guid* pPixelFormat) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IWICBitmapClipper*)Unsafe.AsPointer(ref this), pPixelFormat); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetResolution(double* pDpiX, double* pDpiY) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IWICBitmapClipper*)Unsafe.AsPointer(ref this), pDpiX, pDpiY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT CopyPalette(IWICPalette* pIPalette) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IWICBitmapClipper*)Unsafe.AsPointer(ref this), pIPalette); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT CopyPixels([NativeTypeName("const WICRect *")] WICRect* prc, uint cbStride, uint cbBufferSize, byte* pbBuffer) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IWICBitmapClipper*)Unsafe.AsPointer(ref this), prc, cbStride, cbBufferSize, pbBuffer); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT Initialize(IWICBitmapSource* pISource, [NativeTypeName("const WICRect *")] WICRect* prc) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IWICBitmapClipper*)Unsafe.AsPointer(ref this), pISource, prc); - } - - public interface Interface : IWICBitmapSource.Interface - { - [VtblIndex(8)] - HRESULT Initialize(IWICBitmapSource* pISource, [NativeTypeName("const WICRect *")] WICRect* prc); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (UINT *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSize; - - [NativeTypeName("HRESULT (WICPixelFormatGUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelFormat; - - [NativeTypeName("HRESULT (double *, double *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetResolution; - - [NativeTypeName("HRESULT (IWICPalette *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyPalette; - - [NativeTypeName("HRESULT (const WICRect *, UINT, UINT, BYTE *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyPixels; - - [NativeTypeName("HRESULT (IWICBitmapSource *, const WICRect *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Initialize; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapCodecInfo.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapCodecInfo.cs deleted file mode 100644 index a88fb5ab..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapCodecInfo.cs +++ /dev/null @@ -1,293 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("E87A44C4-B76E-4C47-8B09-298EB12A2714")] - [NativeTypeName("struct IWICBitmapCodecInfo : IWICComponentInfo")] - [NativeInheritance("IWICComponentInfo")] - internal unsafe partial struct IWICBitmapCodecInfo : IWICBitmapCodecInfo.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetComponentType(WICComponentType* pType) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this), pType); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetCLSID([NativeTypeName("CLSID *")] Guid* pclsid) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this), pclsid); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetSigningStatus([NativeTypeName("DWORD *")] uint* pStatus) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this), pStatus); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetAuthor(uint cchAuthor, [NativeTypeName("WCHAR *")] ushort* wzAuthor, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this), cchAuthor, wzAuthor, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT GetVendorGUID(Guid* pguidVendor) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this), pguidVendor); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT GetVersion(uint cchVersion, [NativeTypeName("WCHAR *")] ushort* wzVersion, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this), cchVersion, wzVersion, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT GetSpecVersion(uint cchSpecVersion, [NativeTypeName("WCHAR *")] ushort* wzSpecVersion, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this), cchSpecVersion, wzSpecVersion, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT GetFriendlyName(uint cchFriendlyName, [NativeTypeName("WCHAR *")] ushort* wzFriendlyName, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this), cchFriendlyName, wzFriendlyName, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT GetContainerFormat(Guid* pguidContainerFormat) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this), pguidContainerFormat); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT GetPixelFormats(uint cFormats, Guid* pguidPixelFormats, uint* pcActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this), cFormats, pguidPixelFormats, pcActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT GetColorManagementVersion(uint cchColorManagementVersion, [NativeTypeName("WCHAR *")] ushort* wzColorManagementVersion, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this), cchColorManagementVersion, wzColorManagementVersion, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT GetDeviceManufacturer(uint cchDeviceManufacturer, [NativeTypeName("WCHAR *")] ushort* wzDeviceManufacturer, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this), cchDeviceManufacturer, wzDeviceManufacturer, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT GetDeviceModels(uint cchDeviceModels, [NativeTypeName("WCHAR *")] ushort* wzDeviceModels, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this), cchDeviceModels, wzDeviceModels, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT GetMimeTypes(uint cchMimeTypes, [NativeTypeName("WCHAR *")] ushort* wzMimeTypes, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this), cchMimeTypes, wzMimeTypes, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public HRESULT GetFileExtensions(uint cchFileExtensions, [NativeTypeName("WCHAR *")] ushort* wzFileExtensions, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this), cchFileExtensions, wzFileExtensions, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public HRESULT DoesSupportAnimation(BOOL* pfSupportAnimation) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this), pfSupportAnimation); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(19)] - public HRESULT DoesSupportChromakey(BOOL* pfSupportChromakey) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this), pfSupportChromakey); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(20)] - public HRESULT DoesSupportLossless(BOOL* pfSupportLossless) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this), pfSupportLossless); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(21)] - public HRESULT DoesSupportMultiframe(BOOL* pfSupportMultiframe) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this), pfSupportMultiframe); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(22)] - public HRESULT MatchesMimeType([NativeTypeName("LPCWSTR")] ushort* wzMimeType, BOOL* pfMatches) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((IWICBitmapCodecInfo*)Unsafe.AsPointer(ref this), wzMimeType, pfMatches); - } - - public interface Interface : IWICComponentInfo.Interface - { - [VtblIndex(11)] - HRESULT GetContainerFormat(Guid* pguidContainerFormat); - - [VtblIndex(12)] - HRESULT GetPixelFormats(uint cFormats, Guid* pguidPixelFormats, uint* pcActual); - - [VtblIndex(13)] - HRESULT GetColorManagementVersion(uint cchColorManagementVersion, [NativeTypeName("WCHAR *")] ushort* wzColorManagementVersion, uint* pcchActual); - - [VtblIndex(14)] - HRESULT GetDeviceManufacturer(uint cchDeviceManufacturer, [NativeTypeName("WCHAR *")] ushort* wzDeviceManufacturer, uint* pcchActual); - - [VtblIndex(15)] - HRESULT GetDeviceModels(uint cchDeviceModels, [NativeTypeName("WCHAR *")] ushort* wzDeviceModels, uint* pcchActual); - - [VtblIndex(16)] - HRESULT GetMimeTypes(uint cchMimeTypes, [NativeTypeName("WCHAR *")] ushort* wzMimeTypes, uint* pcchActual); - - [VtblIndex(17)] - HRESULT GetFileExtensions(uint cchFileExtensions, [NativeTypeName("WCHAR *")] ushort* wzFileExtensions, uint* pcchActual); - - [VtblIndex(18)] - HRESULT DoesSupportAnimation(BOOL* pfSupportAnimation); - - [VtblIndex(19)] - HRESULT DoesSupportChromakey(BOOL* pfSupportChromakey); - - [VtblIndex(20)] - HRESULT DoesSupportLossless(BOOL* pfSupportLossless); - - [VtblIndex(21)] - HRESULT DoesSupportMultiframe(BOOL* pfSupportMultiframe); - - [VtblIndex(22)] - HRESULT MatchesMimeType([NativeTypeName("LPCWSTR")] ushort* wzMimeType, BOOL* pfMatches); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (WICComponentType *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetComponentType; - - [NativeTypeName("HRESULT (CLSID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetCLSID; - - [NativeTypeName("HRESULT (DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSigningStatus; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetAuthor; - - [NativeTypeName("HRESULT (GUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetVendorGUID; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetVersion; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSpecVersion; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFriendlyName; - - [NativeTypeName("HRESULT (GUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetContainerFormat; - - [NativeTypeName("HRESULT (UINT, GUID *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelFormats; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetColorManagementVersion; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDeviceManufacturer; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDeviceModels; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMimeTypes; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFileExtensions; - - [NativeTypeName("HRESULT (BOOL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DoesSupportAnimation; - - [NativeTypeName("HRESULT (BOOL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DoesSupportChromakey; - - [NativeTypeName("HRESULT (BOOL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DoesSupportLossless; - - [NativeTypeName("HRESULT (BOOL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DoesSupportMultiframe; - - [NativeTypeName("HRESULT (LPCWSTR, BOOL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] MatchesMimeType; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapDecoder.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapDecoder.cs index 18369b51..ed01c970 100644 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapDecoder.cs +++ b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapDecoder.cs @@ -12,7 +12,7 @@ namespace TerraFX.Interop.Windows [Guid("9EDDE9E7-8DEE-47EA-99DF-E6FAF2ED44BF")] [NativeTypeName("struct IWICBitmapDecoder : IUnknown")] [NativeInheritance("IUnknown")] - internal unsafe partial struct IWICBitmapDecoder : IWICBitmapDecoder.Interface + internal unsafe partial struct IWICBitmapDecoder { public void** lpVtbl; @@ -60,13 +60,6 @@ namespace TerraFX.Interop.Windows return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IWICBitmapDecoder*)Unsafe.AsPointer(ref this), pguidContainerFormat); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetDecoderInfo(IWICBitmapDecoderInfo** ppIDecoderInfo) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IWICBitmapDecoder*)Unsafe.AsPointer(ref this), ppIDecoderInfo); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(7)] public HRESULT CopyPalette(IWICPalette* pIPalette) @@ -74,13 +67,6 @@ namespace TerraFX.Interop.Windows return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IWICBitmapDecoder*)Unsafe.AsPointer(ref this), pIPalette); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT GetMetadataQueryReader(IWICMetadataQueryReader** ppIMetadataQueryReader) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IWICBitmapDecoder*)Unsafe.AsPointer(ref this), ppIMetadataQueryReader); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(9)] public HRESULT GetPreview(IWICBitmapSource** ppIBitmapSource) @@ -88,13 +74,6 @@ namespace TerraFX.Interop.Windows return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IWICBitmapDecoder*)Unsafe.AsPointer(ref this), ppIBitmapSource); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT GetColorContexts(uint cCount, IWICColorContext** ppIColorContexts, uint* pcActualCount) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IWICBitmapDecoder*)Unsafe.AsPointer(ref this), cCount, ppIColorContexts, pcActualCount); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(11)] public HRESULT GetThumbnail(IWICBitmapSource** ppIThumbnail) @@ -115,86 +94,5 @@ namespace TerraFX.Interop.Windows { return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IWICBitmapDecoder*)Unsafe.AsPointer(ref this), index, ppIBitmapFrame); } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT QueryCapability(IStream* pIStream, [NativeTypeName("DWORD *")] uint* pdwCapability); - - [VtblIndex(4)] - HRESULT Initialize(IStream* pIStream, WICDecodeOptions cacheOptions); - - [VtblIndex(5)] - HRESULT GetContainerFormat(Guid* pguidContainerFormat); - - [VtblIndex(6)] - HRESULT GetDecoderInfo(IWICBitmapDecoderInfo** ppIDecoderInfo); - - [VtblIndex(7)] - HRESULT CopyPalette(IWICPalette* pIPalette); - - [VtblIndex(8)] - HRESULT GetMetadataQueryReader(IWICMetadataQueryReader** ppIMetadataQueryReader); - - [VtblIndex(9)] - HRESULT GetPreview(IWICBitmapSource** ppIBitmapSource); - - [VtblIndex(10)] - HRESULT GetColorContexts(uint cCount, IWICColorContext** ppIColorContexts, uint* pcActualCount); - - [VtblIndex(11)] - HRESULT GetThumbnail(IWICBitmapSource** ppIThumbnail); - - [VtblIndex(12)] - HRESULT GetFrameCount(uint* pCount); - - [VtblIndex(13)] - HRESULT GetFrame(uint index, IWICBitmapFrameDecode** ppIBitmapFrame); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (IStream *, DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryCapability; - - [NativeTypeName("HRESULT (IStream *, WICDecodeOptions) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Initialize; - - [NativeTypeName("HRESULT (GUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetContainerFormat; - - [NativeTypeName("HRESULT (IWICBitmapDecoderInfo **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDecoderInfo; - - [NativeTypeName("HRESULT (IWICPalette *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyPalette; - - [NativeTypeName("HRESULT (IWICMetadataQueryReader **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMetadataQueryReader; - - [NativeTypeName("HRESULT (IWICBitmapSource **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPreview; - - [NativeTypeName("HRESULT (UINT, IWICColorContext **, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetColorContexts; - - [NativeTypeName("HRESULT (IWICBitmapSource **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetThumbnail; - - [NativeTypeName("HRESULT (UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFrameCount; - - [NativeTypeName("HRESULT (UINT, IWICBitmapFrameDecode **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFrame; - } } } diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapDecoderInfo.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapDecoderInfo.cs deleted file mode 100644 index 7104063b..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapDecoderInfo.cs +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("D8CD007F-D08F-4191-9BFC-236EA7F0E4B5")] - [NativeTypeName("struct IWICBitmapDecoderInfo : IWICBitmapCodecInfo")] - [NativeInheritance("IWICBitmapCodecInfo")] - internal unsafe partial struct IWICBitmapDecoderInfo : IWICBitmapDecoderInfo.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetComponentType(WICComponentType* pType) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), pType); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetCLSID([NativeTypeName("CLSID *")] Guid* pclsid) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), pclsid); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetSigningStatus([NativeTypeName("DWORD *")] uint* pStatus) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), pStatus); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetAuthor(uint cchAuthor, [NativeTypeName("WCHAR *")] ushort* wzAuthor, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), cchAuthor, wzAuthor, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT GetVendorGUID(Guid* pguidVendor) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), pguidVendor); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT GetVersion(uint cchVersion, [NativeTypeName("WCHAR *")] ushort* wzVersion, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), cchVersion, wzVersion, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT GetSpecVersion(uint cchSpecVersion, [NativeTypeName("WCHAR *")] ushort* wzSpecVersion, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), cchSpecVersion, wzSpecVersion, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT GetFriendlyName(uint cchFriendlyName, [NativeTypeName("WCHAR *")] ushort* wzFriendlyName, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), cchFriendlyName, wzFriendlyName, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT GetContainerFormat(Guid* pguidContainerFormat) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), pguidContainerFormat); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT GetPixelFormats(uint cFormats, Guid* pguidPixelFormats, uint* pcActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), cFormats, pguidPixelFormats, pcActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT GetColorManagementVersion(uint cchColorManagementVersion, [NativeTypeName("WCHAR *")] ushort* wzColorManagementVersion, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), cchColorManagementVersion, wzColorManagementVersion, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT GetDeviceManufacturer(uint cchDeviceManufacturer, [NativeTypeName("WCHAR *")] ushort* wzDeviceManufacturer, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), cchDeviceManufacturer, wzDeviceManufacturer, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT GetDeviceModels(uint cchDeviceModels, [NativeTypeName("WCHAR *")] ushort* wzDeviceModels, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), cchDeviceModels, wzDeviceModels, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT GetMimeTypes(uint cchMimeTypes, [NativeTypeName("WCHAR *")] ushort* wzMimeTypes, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), cchMimeTypes, wzMimeTypes, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public HRESULT GetFileExtensions(uint cchFileExtensions, [NativeTypeName("WCHAR *")] ushort* wzFileExtensions, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), cchFileExtensions, wzFileExtensions, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public HRESULT DoesSupportAnimation(BOOL* pfSupportAnimation) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), pfSupportAnimation); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(19)] - public HRESULT DoesSupportChromakey(BOOL* pfSupportChromakey) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), pfSupportChromakey); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(20)] - public HRESULT DoesSupportLossless(BOOL* pfSupportLossless) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), pfSupportLossless); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(21)] - public HRESULT DoesSupportMultiframe(BOOL* pfSupportMultiframe) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), pfSupportMultiframe); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(22)] - public HRESULT MatchesMimeType([NativeTypeName("LPCWSTR")] ushort* wzMimeType, BOOL* pfMatches) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), wzMimeType, pfMatches); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(23)] - public HRESULT GetPatterns(uint cbSizePatterns, WICBitmapPattern* pPatterns, uint* pcPatterns, uint* pcbPatternsActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[23]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), cbSizePatterns, pPatterns, pcPatterns, pcbPatternsActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(24)] - public HRESULT MatchesPattern(IStream* pIStream, BOOL* pfMatches) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[24]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), pIStream, pfMatches); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(25)] - public HRESULT CreateInstance(IWICBitmapDecoder** ppIBitmapDecoder) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[25]))((IWICBitmapDecoderInfo*)Unsafe.AsPointer(ref this), ppIBitmapDecoder); - } - - public interface Interface : IWICBitmapCodecInfo.Interface - { - [VtblIndex(23)] - HRESULT GetPatterns(uint cbSizePatterns, WICBitmapPattern* pPatterns, uint* pcPatterns, uint* pcbPatternsActual); - - [VtblIndex(24)] - HRESULT MatchesPattern(IStream* pIStream, BOOL* pfMatches); - - [VtblIndex(25)] - HRESULT CreateInstance(IWICBitmapDecoder** ppIBitmapDecoder); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (WICComponentType *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetComponentType; - - [NativeTypeName("HRESULT (CLSID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetCLSID; - - [NativeTypeName("HRESULT (DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSigningStatus; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetAuthor; - - [NativeTypeName("HRESULT (GUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetVendorGUID; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetVersion; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSpecVersion; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFriendlyName; - - [NativeTypeName("HRESULT (GUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetContainerFormat; - - [NativeTypeName("HRESULT (UINT, GUID *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelFormats; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetColorManagementVersion; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDeviceManufacturer; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDeviceModels; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMimeTypes; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFileExtensions; - - [NativeTypeName("HRESULT (BOOL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DoesSupportAnimation; - - [NativeTypeName("HRESULT (BOOL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DoesSupportChromakey; - - [NativeTypeName("HRESULT (BOOL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DoesSupportLossless; - - [NativeTypeName("HRESULT (BOOL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DoesSupportMultiframe; - - [NativeTypeName("HRESULT (LPCWSTR, BOOL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] MatchesMimeType; - - [NativeTypeName("HRESULT (UINT, WICBitmapPattern *, UINT *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPatterns; - - [NativeTypeName("HRESULT (IStream *, BOOL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] MatchesPattern; - - [NativeTypeName("HRESULT (IWICBitmapDecoder **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateInstance; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapEncoder.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapEncoder.cs index 3c5e8a15..018f4b80 100644 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapEncoder.cs +++ b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapEncoder.cs @@ -12,7 +12,7 @@ namespace TerraFX.Interop.Windows [Guid("00000103-A8F2-4877-BA0A-FD2B6645FB94")] [NativeTypeName("struct IWICBitmapEncoder : IUnknown")] [NativeInheritance("IUnknown")] - internal unsafe partial struct IWICBitmapEncoder : IWICBitmapEncoder.Interface + internal unsafe partial struct IWICBitmapEncoder { public void** lpVtbl; @@ -53,20 +53,6 @@ namespace TerraFX.Interop.Windows return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IWICBitmapEncoder*)Unsafe.AsPointer(ref this), pguidContainerFormat); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetEncoderInfo(IWICBitmapEncoderInfo** ppIEncoderInfo) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IWICBitmapEncoder*)Unsafe.AsPointer(ref this), ppIEncoderInfo); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT SetColorContexts(uint cCount, IWICColorContext** ppIColorContext) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IWICBitmapEncoder*)Unsafe.AsPointer(ref this), cCount, ppIColorContext); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(7)] public HRESULT SetPalette(IWICPalette* pIPalette) @@ -90,9 +76,9 @@ namespace TerraFX.Interop.Windows [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(10)] - public HRESULT CreateNewFrame(IWICBitmapFrameEncode** ppIFrameEncode, IPropertyBag2** ppIEncoderOptions) + public HRESULT CreateNewFrame(IWICBitmapFrameEncode** ppIFrameEncode, void** ppIEncoderOptions) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IWICBitmapEncoder*)Unsafe.AsPointer(ref this), ppIFrameEncode, ppIEncoderOptions); + return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IWICBitmapEncoder*)Unsafe.AsPointer(ref this), ppIFrameEncode, ppIEncoderOptions); } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -101,87 +87,5 @@ namespace TerraFX.Interop.Windows { return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IWICBitmapEncoder*)Unsafe.AsPointer(ref this)); } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT GetMetadataQueryWriter(IWICMetadataQueryWriter** ppIMetadataQueryWriter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IWICBitmapEncoder*)Unsafe.AsPointer(ref this), ppIMetadataQueryWriter); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT Initialize(IStream* pIStream, WICBitmapEncoderCacheOption cacheOption); - - [VtblIndex(4)] - HRESULT GetContainerFormat(Guid* pguidContainerFormat); - - [VtblIndex(5)] - HRESULT GetEncoderInfo(IWICBitmapEncoderInfo** ppIEncoderInfo); - - [VtblIndex(6)] - HRESULT SetColorContexts(uint cCount, IWICColorContext** ppIColorContext); - - [VtblIndex(7)] - HRESULT SetPalette(IWICPalette* pIPalette); - - [VtblIndex(8)] - HRESULT SetThumbnail(IWICBitmapSource* pIThumbnail); - - [VtblIndex(9)] - HRESULT SetPreview(IWICBitmapSource* pIPreview); - - [VtblIndex(10)] - HRESULT CreateNewFrame(IWICBitmapFrameEncode** ppIFrameEncode, IPropertyBag2** ppIEncoderOptions); - - [VtblIndex(11)] - HRESULT Commit(); - - [VtblIndex(12)] - HRESULT GetMetadataQueryWriter(IWICMetadataQueryWriter** ppIMetadataQueryWriter); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (IStream *, WICBitmapEncoderCacheOption) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Initialize; - - [NativeTypeName("HRESULT (GUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetContainerFormat; - - [NativeTypeName("HRESULT (IWICBitmapEncoderInfo **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetEncoderInfo; - - [NativeTypeName("HRESULT (UINT, IWICColorContext **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetColorContexts; - - [NativeTypeName("HRESULT (IWICPalette *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPalette; - - [NativeTypeName("HRESULT (IWICBitmapSource *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetThumbnail; - - [NativeTypeName("HRESULT (IWICBitmapSource *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPreview; - - [NativeTypeName("HRESULT (IWICBitmapFrameEncode **, IPropertyBag2 **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateNewFrame; - - [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Commit; - - [NativeTypeName("HRESULT (IWICMetadataQueryWriter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMetadataQueryWriter; - } } } diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapEncoderInfo.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapEncoderInfo.cs deleted file mode 100644 index a1e5175e..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapEncoderInfo.cs +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("94C9B4EE-A09F-4F92-8A1E-4A9BCE7E76FB")] - [NativeTypeName("struct IWICBitmapEncoderInfo : IWICBitmapCodecInfo")] - [NativeInheritance("IWICBitmapCodecInfo")] - internal unsafe partial struct IWICBitmapEncoderInfo : IWICBitmapEncoderInfo.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetComponentType(WICComponentType* pType) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), pType); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetCLSID([NativeTypeName("CLSID *")] Guid* pclsid) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), pclsid); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetSigningStatus([NativeTypeName("DWORD *")] uint* pStatus) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), pStatus); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetAuthor(uint cchAuthor, [NativeTypeName("WCHAR *")] ushort* wzAuthor, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), cchAuthor, wzAuthor, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT GetVendorGUID(Guid* pguidVendor) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), pguidVendor); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT GetVersion(uint cchVersion, [NativeTypeName("WCHAR *")] ushort* wzVersion, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), cchVersion, wzVersion, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT GetSpecVersion(uint cchSpecVersion, [NativeTypeName("WCHAR *")] ushort* wzSpecVersion, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), cchSpecVersion, wzSpecVersion, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT GetFriendlyName(uint cchFriendlyName, [NativeTypeName("WCHAR *")] ushort* wzFriendlyName, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), cchFriendlyName, wzFriendlyName, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT GetContainerFormat(Guid* pguidContainerFormat) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), pguidContainerFormat); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT GetPixelFormats(uint cFormats, Guid* pguidPixelFormats, uint* pcActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), cFormats, pguidPixelFormats, pcActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT GetColorManagementVersion(uint cchColorManagementVersion, [NativeTypeName("WCHAR *")] ushort* wzColorManagementVersion, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), cchColorManagementVersion, wzColorManagementVersion, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT GetDeviceManufacturer(uint cchDeviceManufacturer, [NativeTypeName("WCHAR *")] ushort* wzDeviceManufacturer, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), cchDeviceManufacturer, wzDeviceManufacturer, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT GetDeviceModels(uint cchDeviceModels, [NativeTypeName("WCHAR *")] ushort* wzDeviceModels, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), cchDeviceModels, wzDeviceModels, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT GetMimeTypes(uint cchMimeTypes, [NativeTypeName("WCHAR *")] ushort* wzMimeTypes, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), cchMimeTypes, wzMimeTypes, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public HRESULT GetFileExtensions(uint cchFileExtensions, [NativeTypeName("WCHAR *")] ushort* wzFileExtensions, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), cchFileExtensions, wzFileExtensions, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public HRESULT DoesSupportAnimation(BOOL* pfSupportAnimation) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), pfSupportAnimation); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(19)] - public HRESULT DoesSupportChromakey(BOOL* pfSupportChromakey) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), pfSupportChromakey); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(20)] - public HRESULT DoesSupportLossless(BOOL* pfSupportLossless) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), pfSupportLossless); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(21)] - public HRESULT DoesSupportMultiframe(BOOL* pfSupportMultiframe) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), pfSupportMultiframe); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(22)] - public HRESULT MatchesMimeType([NativeTypeName("LPCWSTR")] ushort* wzMimeType, BOOL* pfMatches) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), wzMimeType, pfMatches); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(23)] - public HRESULT CreateInstance(IWICBitmapEncoder** ppIBitmapEncoder) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[23]))((IWICBitmapEncoderInfo*)Unsafe.AsPointer(ref this), ppIBitmapEncoder); - } - - public interface Interface : IWICBitmapCodecInfo.Interface - { - [VtblIndex(23)] - HRESULT CreateInstance(IWICBitmapEncoder** ppIBitmapEncoder); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (WICComponentType *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetComponentType; - - [NativeTypeName("HRESULT (CLSID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetCLSID; - - [NativeTypeName("HRESULT (DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSigningStatus; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetAuthor; - - [NativeTypeName("HRESULT (GUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetVendorGUID; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetVersion; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSpecVersion; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFriendlyName; - - [NativeTypeName("HRESULT (GUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetContainerFormat; - - [NativeTypeName("HRESULT (UINT, GUID *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelFormats; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetColorManagementVersion; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDeviceManufacturer; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDeviceModels; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMimeTypes; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFileExtensions; - - [NativeTypeName("HRESULT (BOOL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DoesSupportAnimation; - - [NativeTypeName("HRESULT (BOOL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DoesSupportChromakey; - - [NativeTypeName("HRESULT (BOOL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DoesSupportLossless; - - [NativeTypeName("HRESULT (BOOL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] DoesSupportMultiframe; - - [NativeTypeName("HRESULT (LPCWSTR, BOOL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] MatchesMimeType; - - [NativeTypeName("HRESULT (IWICBitmapEncoder **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateInstance; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapFlipRotator.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapFlipRotator.cs deleted file mode 100644 index 716865f0..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapFlipRotator.cs +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("5009834F-2D6A-41CE-9E1B-17C5AFF7A782")] - [NativeTypeName("struct IWICBitmapFlipRotator : IWICBitmapSource")] - [NativeInheritance("IWICBitmapSource")] - internal unsafe partial struct IWICBitmapFlipRotator : IWICBitmapFlipRotator.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IWICBitmapFlipRotator*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IWICBitmapFlipRotator*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IWICBitmapFlipRotator*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetSize(uint* puiWidth, uint* puiHeight) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IWICBitmapFlipRotator*)Unsafe.AsPointer(ref this), puiWidth, puiHeight); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetPixelFormat([NativeTypeName("WICPixelFormatGUID *")] Guid* pPixelFormat) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IWICBitmapFlipRotator*)Unsafe.AsPointer(ref this), pPixelFormat); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetResolution(double* pDpiX, double* pDpiY) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IWICBitmapFlipRotator*)Unsafe.AsPointer(ref this), pDpiX, pDpiY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT CopyPalette(IWICPalette* pIPalette) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IWICBitmapFlipRotator*)Unsafe.AsPointer(ref this), pIPalette); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT CopyPixels([NativeTypeName("const WICRect *")] WICRect* prc, uint cbStride, uint cbBufferSize, byte* pbBuffer) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IWICBitmapFlipRotator*)Unsafe.AsPointer(ref this), prc, cbStride, cbBufferSize, pbBuffer); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT Initialize(IWICBitmapSource* pISource, WICBitmapTransformOptions options) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IWICBitmapFlipRotator*)Unsafe.AsPointer(ref this), pISource, options); - } - - public interface Interface : IWICBitmapSource.Interface - { - [VtblIndex(8)] - HRESULT Initialize(IWICBitmapSource* pISource, WICBitmapTransformOptions options); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (UINT *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSize; - - [NativeTypeName("HRESULT (WICPixelFormatGUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelFormat; - - [NativeTypeName("HRESULT (double *, double *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetResolution; - - [NativeTypeName("HRESULT (IWICPalette *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyPalette; - - [NativeTypeName("HRESULT (const WICRect *, UINT, UINT, BYTE *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyPixels; - - [NativeTypeName("HRESULT (IWICBitmapSource *, WICBitmapTransformOptions) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Initialize; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapFrameDecode.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapFrameDecode.cs index 89c53a4c..cfa35e32 100644 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapFrameDecode.cs +++ b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapFrameDecode.cs @@ -12,7 +12,7 @@ namespace TerraFX.Interop.Windows [Guid("3B16811B-6A43-4EC9-A813-3D930C13B940")] [NativeTypeName("struct IWICBitmapFrameDecode : IWICBitmapSource")] [NativeInheritance("IWICBitmapSource")] - internal unsafe partial struct IWICBitmapFrameDecode : IWICBitmapFrameDecode.Interface + internal unsafe partial struct IWICBitmapFrameDecode { public void** lpVtbl; @@ -74,73 +74,11 @@ namespace TerraFX.Interop.Windows return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IWICBitmapFrameDecode*)Unsafe.AsPointer(ref this), prc, cbStride, cbBufferSize, pbBuffer); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT GetMetadataQueryReader(IWICMetadataQueryReader** ppIMetadataQueryReader) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IWICBitmapFrameDecode*)Unsafe.AsPointer(ref this), ppIMetadataQueryReader); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT GetColorContexts(uint cCount, IWICColorContext** ppIColorContexts, uint* pcActualCount) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IWICBitmapFrameDecode*)Unsafe.AsPointer(ref this), cCount, ppIColorContexts, pcActualCount); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(10)] public HRESULT GetThumbnail(IWICBitmapSource** ppIThumbnail) { return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IWICBitmapFrameDecode*)Unsafe.AsPointer(ref this), ppIThumbnail); } - - public interface Interface : IWICBitmapSource.Interface - { - [VtblIndex(8)] - HRESULT GetMetadataQueryReader(IWICMetadataQueryReader** ppIMetadataQueryReader); - - [VtblIndex(9)] - HRESULT GetColorContexts(uint cCount, IWICColorContext** ppIColorContexts, uint* pcActualCount); - - [VtblIndex(10)] - HRESULT GetThumbnail(IWICBitmapSource** ppIThumbnail); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (UINT *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSize; - - [NativeTypeName("HRESULT (WICPixelFormatGUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelFormat; - - [NativeTypeName("HRESULT (double *, double *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetResolution; - - [NativeTypeName("HRESULT (IWICPalette *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyPalette; - - [NativeTypeName("HRESULT (const WICRect *, UINT, UINT, BYTE *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyPixels; - - [NativeTypeName("HRESULT (IWICMetadataQueryReader **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMetadataQueryReader; - - [NativeTypeName("HRESULT (UINT, IWICColorContext **, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetColorContexts; - - [NativeTypeName("HRESULT (IWICBitmapSource **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetThumbnail; - } } } diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapFrameEncode.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapFrameEncode.cs index 26c97ff1..7af93722 100644 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapFrameEncode.cs +++ b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapFrameEncode.cs @@ -12,7 +12,7 @@ namespace TerraFX.Interop.Windows [Guid("00000105-A8F2-4877-BA0A-FD2B6645FB94")] [NativeTypeName("struct IWICBitmapFrameEncode : IUnknown")] [NativeInheritance("IUnknown")] - internal unsafe partial struct IWICBitmapFrameEncode : IWICBitmapFrameEncode.Interface + internal unsafe partial struct IWICBitmapFrameEncode { public void** lpVtbl; @@ -41,9 +41,9 @@ namespace TerraFX.Interop.Windows [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(3)] - public HRESULT Initialize(IPropertyBag2* pIEncoderOptions) + public HRESULT Initialize(void* pIEncoderOptions) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IWICBitmapFrameEncode*)Unsafe.AsPointer(ref this), pIEncoderOptions); + return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IWICBitmapFrameEncode*)Unsafe.AsPointer(ref this), pIEncoderOptions); } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -67,13 +67,6 @@ namespace TerraFX.Interop.Windows return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IWICBitmapFrameEncode*)Unsafe.AsPointer(ref this), pPixelFormat); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT SetColorContexts(uint cCount, IWICColorContext** ppIColorContext) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IWICBitmapFrameEncode*)Unsafe.AsPointer(ref this), cCount, ppIColorContext); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(8)] public HRESULT SetPalette(IWICPalette* pIPalette) @@ -108,93 +101,5 @@ namespace TerraFX.Interop.Windows { return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IWICBitmapFrameEncode*)Unsafe.AsPointer(ref this)); } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT GetMetadataQueryWriter(IWICMetadataQueryWriter** ppIMetadataQueryWriter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IWICBitmapFrameEncode*)Unsafe.AsPointer(ref this), ppIMetadataQueryWriter); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT Initialize(IPropertyBag2* pIEncoderOptions); - - [VtblIndex(4)] - HRESULT SetSize(uint uiWidth, uint uiHeight); - - [VtblIndex(5)] - HRESULT SetResolution(double dpiX, double dpiY); - - [VtblIndex(6)] - HRESULT SetPixelFormat([NativeTypeName("WICPixelFormatGUID *")] Guid* pPixelFormat); - - [VtblIndex(7)] - HRESULT SetColorContexts(uint cCount, IWICColorContext** ppIColorContext); - - [VtblIndex(8)] - HRESULT SetPalette(IWICPalette* pIPalette); - - [VtblIndex(9)] - HRESULT SetThumbnail(IWICBitmapSource* pIThumbnail); - - [VtblIndex(10)] - HRESULT WritePixels(uint lineCount, uint cbStride, uint cbBufferSize, byte* pbPixels); - - [VtblIndex(11)] - HRESULT WriteSource(IWICBitmapSource* pIBitmapSource, WICRect* prc); - - [VtblIndex(12)] - HRESULT Commit(); - - [VtblIndex(13)] - HRESULT GetMetadataQueryWriter(IWICMetadataQueryWriter** ppIMetadataQueryWriter); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (IPropertyBag2 *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Initialize; - - [NativeTypeName("HRESULT (UINT, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetSize; - - [NativeTypeName("HRESULT (double, double) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetResolution; - - [NativeTypeName("HRESULT (WICPixelFormatGUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPixelFormat; - - [NativeTypeName("HRESULT (UINT, IWICColorContext **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetColorContexts; - - [NativeTypeName("HRESULT (IWICPalette *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetPalette; - - [NativeTypeName("HRESULT (IWICBitmapSource *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetThumbnail; - - [NativeTypeName("HRESULT (UINT, UINT, UINT, BYTE *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] WritePixels; - - [NativeTypeName("HRESULT (IWICBitmapSource *, WICRect *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] WriteSource; - - [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Commit; - - [NativeTypeName("HRESULT (IWICMetadataQueryWriter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMetadataQueryWriter; - } } } diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapLock.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapLock.cs deleted file mode 100644 index ebcec879..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapLock.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("00000123-A8F2-4877-BA0A-FD2B6645FB94")] - [NativeTypeName("struct IWICBitmapLock : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IWICBitmapLock : IWICBitmapLock.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IWICBitmapLock*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IWICBitmapLock*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IWICBitmapLock*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetSize(uint* puiWidth, uint* puiHeight) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IWICBitmapLock*)Unsafe.AsPointer(ref this), puiWidth, puiHeight); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetStride(uint* pcbStride) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IWICBitmapLock*)Unsafe.AsPointer(ref this), pcbStride); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetDataPointer(uint* pcbBufferSize, [NativeTypeName("WICInProcPointer *")] byte** ppbData) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IWICBitmapLock*)Unsafe.AsPointer(ref this), pcbBufferSize, ppbData); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetPixelFormat([NativeTypeName("WICPixelFormatGUID *")] Guid* pPixelFormat) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IWICBitmapLock*)Unsafe.AsPointer(ref this), pPixelFormat); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT GetSize(uint* puiWidth, uint* puiHeight); - - [VtblIndex(4)] - HRESULT GetStride(uint* pcbStride); - - [VtblIndex(5)] - HRESULT GetDataPointer(uint* pcbBufferSize, [NativeTypeName("WICInProcPointer *")] byte** ppbData); - - [VtblIndex(6)] - HRESULT GetPixelFormat([NativeTypeName("WICPixelFormatGUID *")] Guid* pPixelFormat); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (UINT *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSize; - - [NativeTypeName("HRESULT (UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetStride; - - [NativeTypeName("HRESULT (UINT *, WICInProcPointer *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetDataPointer; - - [NativeTypeName("HRESULT (WICPixelFormatGUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelFormat; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapScaler.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapScaler.cs deleted file mode 100644 index 56a89b07..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapScaler.cs +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("00000302-A8F2-4877-BA0A-FD2B6645FB94")] - [NativeTypeName("struct IWICBitmapScaler : IWICBitmapSource")] - [NativeInheritance("IWICBitmapSource")] - internal unsafe partial struct IWICBitmapScaler : IWICBitmapScaler.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IWICBitmapScaler*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IWICBitmapScaler*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IWICBitmapScaler*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetSize(uint* puiWidth, uint* puiHeight) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IWICBitmapScaler*)Unsafe.AsPointer(ref this), puiWidth, puiHeight); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetPixelFormat([NativeTypeName("WICPixelFormatGUID *")] Guid* pPixelFormat) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IWICBitmapScaler*)Unsafe.AsPointer(ref this), pPixelFormat); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetResolution(double* pDpiX, double* pDpiY) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IWICBitmapScaler*)Unsafe.AsPointer(ref this), pDpiX, pDpiY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT CopyPalette(IWICPalette* pIPalette) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IWICBitmapScaler*)Unsafe.AsPointer(ref this), pIPalette); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT CopyPixels([NativeTypeName("const WICRect *")] WICRect* prc, uint cbStride, uint cbBufferSize, byte* pbBuffer) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IWICBitmapScaler*)Unsafe.AsPointer(ref this), prc, cbStride, cbBufferSize, pbBuffer); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT Initialize(IWICBitmapSource* pISource, uint uiWidth, uint uiHeight, WICBitmapInterpolationMode mode) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IWICBitmapScaler*)Unsafe.AsPointer(ref this), pISource, uiWidth, uiHeight, mode); - } - - public interface Interface : IWICBitmapSource.Interface - { - [VtblIndex(8)] - HRESULT Initialize(IWICBitmapSource* pISource, uint uiWidth, uint uiHeight, WICBitmapInterpolationMode mode); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (UINT *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSize; - - [NativeTypeName("HRESULT (WICPixelFormatGUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelFormat; - - [NativeTypeName("HRESULT (double *, double *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetResolution; - - [NativeTypeName("HRESULT (IWICPalette *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyPalette; - - [NativeTypeName("HRESULT (const WICRect *, UINT, UINT, BYTE *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyPixels; - - [NativeTypeName("HRESULT (IWICBitmapSource *, UINT, UINT, WICBitmapInterpolationMode) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Initialize; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapSource.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapSource.cs index dfe9d31b..439b5c54 100644 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapSource.cs +++ b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICBitmapSource.cs @@ -12,7 +12,7 @@ namespace TerraFX.Interop.Windows [Guid("00000120-A8F2-4877-BA0A-FD2B6645FB94")] [NativeTypeName("struct IWICBitmapSource : IUnknown")] [NativeInheritance("IUnknown")] - internal unsafe partial struct IWICBitmapSource : IWICBitmapSource.Interface + internal unsafe partial struct IWICBitmapSource { public void** lpVtbl; @@ -73,50 +73,5 @@ namespace TerraFX.Interop.Windows { return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IWICBitmapSource*)Unsafe.AsPointer(ref this), prc, cbStride, cbBufferSize, pbBuffer); } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT GetSize(uint* puiWidth, uint* puiHeight); - - [VtblIndex(4)] - HRESULT GetPixelFormat([NativeTypeName("WICPixelFormatGUID *")] Guid* pPixelFormat); - - [VtblIndex(5)] - HRESULT GetResolution(double* pDpiX, double* pDpiY); - - [VtblIndex(6)] - HRESULT CopyPalette(IWICPalette* pIPalette); - - [VtblIndex(7)] - HRESULT CopyPixels([NativeTypeName("const WICRect *")] WICRect* prc, uint cbStride, uint cbBufferSize, byte* pbBuffer); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (UINT *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSize; - - [NativeTypeName("HRESULT (WICPixelFormatGUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelFormat; - - [NativeTypeName("HRESULT (double *, double *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetResolution; - - [NativeTypeName("HRESULT (IWICPalette *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyPalette; - - [NativeTypeName("HRESULT (const WICRect *, UINT, UINT, BYTE *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyPixels; - } } } diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICColorContext.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICColorContext.cs deleted file mode 100644 index 3c44289e..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICColorContext.cs +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("3C613A02-34B2-44EA-9A7C-45AEA9C6FD6D")] - [NativeTypeName("struct IWICColorContext : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IWICColorContext : IWICColorContext.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IWICColorContext*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IWICColorContext*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IWICColorContext*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT InitializeFromFilename([NativeTypeName("LPCWSTR")] ushort* wzFilename) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IWICColorContext*)Unsafe.AsPointer(ref this), wzFilename); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT InitializeFromMemory([NativeTypeName("const BYTE *")] byte* pbBuffer, uint cbBufferSize) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IWICColorContext*)Unsafe.AsPointer(ref this), pbBuffer, cbBufferSize); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT InitializeFromExifColorSpace(uint value) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IWICColorContext*)Unsafe.AsPointer(ref this), value); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetType(WICColorContextType* pType) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IWICColorContext*)Unsafe.AsPointer(ref this), pType); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT GetProfileBytes(uint cbBuffer, byte* pbBuffer, uint* pcbActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IWICColorContext*)Unsafe.AsPointer(ref this), cbBuffer, pbBuffer, pcbActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT GetExifColorSpace(uint* pValue) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IWICColorContext*)Unsafe.AsPointer(ref this), pValue); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT InitializeFromFilename([NativeTypeName("LPCWSTR")] ushort* wzFilename); - - [VtblIndex(4)] - HRESULT InitializeFromMemory([NativeTypeName("const BYTE *")] byte* pbBuffer, uint cbBufferSize); - - [VtblIndex(5)] - HRESULT InitializeFromExifColorSpace(uint value); - - [VtblIndex(6)] - HRESULT GetType(WICColorContextType* pType); - - [VtblIndex(7)] - HRESULT GetProfileBytes(uint cbBuffer, byte* pbBuffer, uint* pcbActual); - - [VtblIndex(8)] - HRESULT GetExifColorSpace(uint* pValue); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (LPCWSTR) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] InitializeFromFilename; - - [NativeTypeName("HRESULT (const BYTE *, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] InitializeFromMemory; - - [NativeTypeName("HRESULT (UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] InitializeFromExifColorSpace; - - [NativeTypeName("HRESULT (WICColorContextType *) __attribute__((stdcall))")] - public new delegate* unmanaged[Stdcall] GetType; - - [NativeTypeName("HRESULT (UINT, BYTE *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetProfileBytes; - - [NativeTypeName("HRESULT (UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetExifColorSpace; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICColorTransform.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICColorTransform.cs deleted file mode 100644 index e1507d8f..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICColorTransform.cs +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("B66F034F-D0E2-40AB-B436-6DE39E321A94")] - [NativeTypeName("struct IWICColorTransform : IWICBitmapSource")] - [NativeInheritance("IWICBitmapSource")] - internal unsafe partial struct IWICColorTransform : IWICColorTransform.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IWICColorTransform*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IWICColorTransform*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IWICColorTransform*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetSize(uint* puiWidth, uint* puiHeight) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IWICColorTransform*)Unsafe.AsPointer(ref this), puiWidth, puiHeight); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetPixelFormat([NativeTypeName("WICPixelFormatGUID *")] Guid* pPixelFormat) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IWICColorTransform*)Unsafe.AsPointer(ref this), pPixelFormat); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetResolution(double* pDpiX, double* pDpiY) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IWICColorTransform*)Unsafe.AsPointer(ref this), pDpiX, pDpiY); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT CopyPalette(IWICPalette* pIPalette) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IWICColorTransform*)Unsafe.AsPointer(ref this), pIPalette); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT CopyPixels([NativeTypeName("const WICRect *")] WICRect* prc, uint cbStride, uint cbBufferSize, byte* pbBuffer) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IWICColorTransform*)Unsafe.AsPointer(ref this), prc, cbStride, cbBufferSize, pbBuffer); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT Initialize(IWICBitmapSource* pIBitmapSource, IWICColorContext* pIContextSource, IWICColorContext* pIContextDest, [NativeTypeName("REFWICPixelFormatGUID")] Guid* pixelFmtDest) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IWICColorTransform*)Unsafe.AsPointer(ref this), pIBitmapSource, pIContextSource, pIContextDest, pixelFmtDest); - } - - public interface Interface : IWICBitmapSource.Interface - { - [VtblIndex(8)] - HRESULT Initialize(IWICBitmapSource* pIBitmapSource, IWICColorContext* pIContextSource, IWICColorContext* pIContextDest, [NativeTypeName("REFWICPixelFormatGUID")] Guid* pixelFmtDest); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (UINT *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSize; - - [NativeTypeName("HRESULT (WICPixelFormatGUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelFormat; - - [NativeTypeName("HRESULT (double *, double *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetResolution; - - [NativeTypeName("HRESULT (IWICPalette *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyPalette; - - [NativeTypeName("HRESULT (const WICRect *, UINT, UINT, BYTE *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyPixels; - - [NativeTypeName("HRESULT (IWICBitmapSource *, IWICColorContext *, IWICColorContext *, REFWICPixelFormatGUID) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Initialize; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICComponentInfo.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICComponentInfo.cs deleted file mode 100644 index b8115300..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICComponentInfo.cs +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("23BC3F0A-698B-4357-886B-F24D50671334")] - [NativeTypeName("struct IWICComponentInfo : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IWICComponentInfo : IWICComponentInfo.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IWICComponentInfo*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IWICComponentInfo*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IWICComponentInfo*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetComponentType(WICComponentType* pType) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IWICComponentInfo*)Unsafe.AsPointer(ref this), pType); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetCLSID([NativeTypeName("CLSID *")] Guid* pclsid) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IWICComponentInfo*)Unsafe.AsPointer(ref this), pclsid); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetSigningStatus([NativeTypeName("DWORD *")] uint* pStatus) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IWICComponentInfo*)Unsafe.AsPointer(ref this), pStatus); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetAuthor(uint cchAuthor, [NativeTypeName("WCHAR *")] ushort* wzAuthor, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IWICComponentInfo*)Unsafe.AsPointer(ref this), cchAuthor, wzAuthor, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT GetVendorGUID(Guid* pguidVendor) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IWICComponentInfo*)Unsafe.AsPointer(ref this), pguidVendor); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT GetVersion(uint cchVersion, [NativeTypeName("WCHAR *")] ushort* wzVersion, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IWICComponentInfo*)Unsafe.AsPointer(ref this), cchVersion, wzVersion, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT GetSpecVersion(uint cchSpecVersion, [NativeTypeName("WCHAR *")] ushort* wzSpecVersion, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IWICComponentInfo*)Unsafe.AsPointer(ref this), cchSpecVersion, wzSpecVersion, pcchActual); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT GetFriendlyName(uint cchFriendlyName, [NativeTypeName("WCHAR *")] ushort* wzFriendlyName, uint* pcchActual) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IWICComponentInfo*)Unsafe.AsPointer(ref this), cchFriendlyName, wzFriendlyName, pcchActual); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT GetComponentType(WICComponentType* pType); - - [VtblIndex(4)] - HRESULT GetCLSID([NativeTypeName("CLSID *")] Guid* pclsid); - - [VtblIndex(5)] - HRESULT GetSigningStatus([NativeTypeName("DWORD *")] uint* pStatus); - - [VtblIndex(6)] - HRESULT GetAuthor(uint cchAuthor, [NativeTypeName("WCHAR *")] ushort* wzAuthor, uint* pcchActual); - - [VtblIndex(7)] - HRESULT GetVendorGUID(Guid* pguidVendor); - - [VtblIndex(8)] - HRESULT GetVersion(uint cchVersion, [NativeTypeName("WCHAR *")] ushort* wzVersion, uint* pcchActual); - - [VtblIndex(9)] - HRESULT GetSpecVersion(uint cchSpecVersion, [NativeTypeName("WCHAR *")] ushort* wzSpecVersion, uint* pcchActual); - - [VtblIndex(10)] - HRESULT GetFriendlyName(uint cchFriendlyName, [NativeTypeName("WCHAR *")] ushort* wzFriendlyName, uint* pcchActual); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (WICComponentType *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetComponentType; - - [NativeTypeName("HRESULT (CLSID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetCLSID; - - [NativeTypeName("HRESULT (DWORD *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSigningStatus; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetAuthor; - - [NativeTypeName("HRESULT (GUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetVendorGUID; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetVersion; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSpecVersion; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetFriendlyName; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICFastMetadataEncoder.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICFastMetadataEncoder.cs deleted file mode 100644 index 33ef8f75..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICFastMetadataEncoder.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("B84E2C09-78C9-4AC4-8BD3-524AE1663A2F")] - [NativeTypeName("struct IWICFastMetadataEncoder : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IWICFastMetadataEncoder : IWICFastMetadataEncoder.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IWICFastMetadataEncoder*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IWICFastMetadataEncoder*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IWICFastMetadataEncoder*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT Commit() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IWICFastMetadataEncoder*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetMetadataQueryWriter(IWICMetadataQueryWriter** ppIMetadataQueryWriter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IWICFastMetadataEncoder*)Unsafe.AsPointer(ref this), ppIMetadataQueryWriter); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT Commit(); - - [VtblIndex(4)] - HRESULT GetMetadataQueryWriter(IWICMetadataQueryWriter** ppIMetadataQueryWriter); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Commit; - - [NativeTypeName("HRESULT (IWICMetadataQueryWriter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMetadataQueryWriter; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICFormatConverter.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICFormatConverter.cs index 59cf4a11..e8eb2513 100644 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICFormatConverter.cs +++ b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICFormatConverter.cs @@ -12,7 +12,7 @@ namespace TerraFX.Interop.Windows [Guid("00000301-A8F2-4877-BA0A-FD2B6645FB94")] [NativeTypeName("struct IWICFormatConverter : IWICBitmapSource")] [NativeInheritance("IWICBitmapSource")] - internal unsafe partial struct IWICFormatConverter : IWICFormatConverter.Interface + internal unsafe partial struct IWICFormatConverter { public void** lpVtbl; @@ -87,47 +87,5 @@ namespace TerraFX.Interop.Windows { return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IWICFormatConverter*)Unsafe.AsPointer(ref this), srcPixelFormat, dstPixelFormat, pfCanConvert); } - - public interface Interface : IWICBitmapSource.Interface - { - [VtblIndex(8)] - HRESULT Initialize(IWICBitmapSource* pISource, [NativeTypeName("REFWICPixelFormatGUID")] Guid* dstFormat, WICBitmapDitherType dither, IWICPalette* pIPalette, double alphaThresholdPercent, WICBitmapPaletteType paletteTranslate); - - [VtblIndex(9)] - HRESULT CanConvert([NativeTypeName("REFWICPixelFormatGUID")] Guid* srcPixelFormat, [NativeTypeName("REFWICPixelFormatGUID")] Guid* dstPixelFormat, BOOL* pfCanConvert); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (UINT *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetSize; - - [NativeTypeName("HRESULT (WICPixelFormatGUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetPixelFormat; - - [NativeTypeName("HRESULT (double *, double *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetResolution; - - [NativeTypeName("HRESULT (IWICPalette *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyPalette; - - [NativeTypeName("HRESULT (const WICRect *, UINT, UINT, BYTE *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyPixels; - - [NativeTypeName("HRESULT (IWICBitmapSource *, REFWICPixelFormatGUID, WICBitmapDitherType, IWICPalette *, double, WICBitmapPaletteType) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Initialize; - - [NativeTypeName("HRESULT (REFWICPixelFormatGUID, REFWICPixelFormatGUID, BOOL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CanConvert; - } } } diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICImageEncoder.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICImageEncoder.cs deleted file mode 100644 index 17915c89..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICImageEncoder.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Versioning; -using TerraFX.Interop.DirectX; - -namespace TerraFX.Interop.Windows -{ - [SupportedOSPlatform("windows8.0")] - [Guid("04C75BF8-3CE1-473B-ACC5-3CC4F5E94999")] - [NativeTypeName("struct IWICImageEncoder : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IWICImageEncoder : IWICImageEncoder.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IWICImageEncoder*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IWICImageEncoder*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IWICImageEncoder*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT WriteFrame(ID2D1Image* pImage, IWICBitmapFrameEncode* pFrameEncode, [NativeTypeName("const WICImageParameters *")] WICImageParameters* pImageParameters) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IWICImageEncoder*)Unsafe.AsPointer(ref this), pImage, pFrameEncode, pImageParameters); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT WriteFrameThumbnail(ID2D1Image* pImage, IWICBitmapFrameEncode* pFrameEncode, [NativeTypeName("const WICImageParameters *")] WICImageParameters* pImageParameters) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IWICImageEncoder*)Unsafe.AsPointer(ref this), pImage, pFrameEncode, pImageParameters); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT WriteThumbnail(ID2D1Image* pImage, IWICBitmapEncoder* pEncoder, [NativeTypeName("const WICImageParameters *")] WICImageParameters* pImageParameters) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IWICImageEncoder*)Unsafe.AsPointer(ref this), pImage, pEncoder, pImageParameters); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT WriteFrame(ID2D1Image* pImage, IWICBitmapFrameEncode* pFrameEncode, [NativeTypeName("const WICImageParameters *")] WICImageParameters* pImageParameters); - - [VtblIndex(4)] - HRESULT WriteFrameThumbnail(ID2D1Image* pImage, IWICBitmapFrameEncode* pFrameEncode, [NativeTypeName("const WICImageParameters *")] WICImageParameters* pImageParameters); - - [VtblIndex(5)] - HRESULT WriteThumbnail(ID2D1Image* pImage, IWICBitmapEncoder* pEncoder, [NativeTypeName("const WICImageParameters *")] WICImageParameters* pImageParameters); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (ID2D1Image *, IWICBitmapFrameEncode *, const WICImageParameters *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] WriteFrame; - - [NativeTypeName("HRESULT (ID2D1Image *, IWICBitmapFrameEncode *, const WICImageParameters *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] WriteFrameThumbnail; - - [NativeTypeName("HRESULT (ID2D1Image *, IWICBitmapEncoder *, const WICImageParameters *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] WriteThumbnail; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICImagingFactory.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICImagingFactory.cs deleted file mode 100644 index 33992fbc..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICImagingFactory.cs +++ /dev/null @@ -1,382 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("EC5EC8A9-C395-4314-9C77-54D7A935FF70")] - [NativeTypeName("struct IWICImagingFactory : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IWICImagingFactory : IWICImagingFactory.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IWICImagingFactory*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IWICImagingFactory*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT CreateDecoderFromFilename([NativeTypeName("LPCWSTR")] ushort* wzFilename, [NativeTypeName("const GUID *")] Guid* pguidVendor, [NativeTypeName("DWORD")] uint dwDesiredAccess, WICDecodeOptions metadataOptions, IWICBitmapDecoder** ppIDecoder) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), wzFilename, pguidVendor, dwDesiredAccess, metadataOptions, ppIDecoder); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT CreateDecoderFromStream(IStream* pIStream, [NativeTypeName("const GUID *")] Guid* pguidVendor, WICDecodeOptions metadataOptions, IWICBitmapDecoder** ppIDecoder) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), pIStream, pguidVendor, metadataOptions, ppIDecoder); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT CreateDecoderFromFileHandle([NativeTypeName("ULONG_PTR")] nuint hFile, [NativeTypeName("const GUID *")] Guid* pguidVendor, WICDecodeOptions metadataOptions, IWICBitmapDecoder** ppIDecoder) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), hFile, pguidVendor, metadataOptions, ppIDecoder); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT CreateComponentInfo([NativeTypeName("const IID &")] Guid* clsidComponent, IWICComponentInfo** ppIInfo) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), clsidComponent, ppIInfo); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT CreateDecoder([NativeTypeName("const GUID &")] Guid* guidContainerFormat, [NativeTypeName("const GUID *")] Guid* pguidVendor, IWICBitmapDecoder** ppIDecoder) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), guidContainerFormat, pguidVendor, ppIDecoder); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT CreateEncoder([NativeTypeName("const GUID &")] Guid* guidContainerFormat, [NativeTypeName("const GUID *")] Guid* pguidVendor, IWICBitmapEncoder** ppIEncoder) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), guidContainerFormat, pguidVendor, ppIEncoder); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT CreatePalette(IWICPalette** ppIPalette) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), ppIPalette); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT CreateFormatConverter(IWICFormatConverter** ppIFormatConverter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), ppIFormatConverter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CreateBitmapScaler(IWICBitmapScaler** ppIBitmapScaler) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), ppIBitmapScaler); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT CreateBitmapClipper(IWICBitmapClipper** ppIBitmapClipper) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), ppIBitmapClipper); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT CreateBitmapFlipRotator(IWICBitmapFlipRotator** ppIBitmapFlipRotator) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), ppIBitmapFlipRotator); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(14)] - public HRESULT CreateStream(IWICStream** ppIWICStream) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), ppIWICStream); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT CreateColorContext(IWICColorContext** ppIWICColorContext) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), ppIWICColorContext); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT CreateColorTransformer(IWICColorTransform** ppIWICColorTransform) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), ppIWICColorTransform); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(17)] - public HRESULT CreateBitmap(uint uiWidth, uint uiHeight, [NativeTypeName("REFWICPixelFormatGUID")] Guid* pixelFormat, WICBitmapCreateCacheOption option, IWICBitmap** ppIBitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), uiWidth, uiHeight, pixelFormat, option, ppIBitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(18)] - public HRESULT CreateBitmapFromSource(IWICBitmapSource* pIBitmapSource, WICBitmapCreateCacheOption option, IWICBitmap** ppIBitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), pIBitmapSource, option, ppIBitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(19)] - public HRESULT CreateBitmapFromSourceRect(IWICBitmapSource* pIBitmapSource, uint x, uint y, uint width, uint height, IWICBitmap** ppIBitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), pIBitmapSource, x, y, width, height, ppIBitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(20)] - public HRESULT CreateBitmapFromMemory(uint uiWidth, uint uiHeight, [NativeTypeName("REFWICPixelFormatGUID")] Guid* pixelFormat, uint cbStride, uint cbBufferSize, byte* pbBuffer, IWICBitmap** ppIBitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), uiWidth, uiHeight, pixelFormat, cbStride, cbBufferSize, pbBuffer, ppIBitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(21)] - public HRESULT CreateBitmapFromHBITMAP(HBITMAP hBitmap, HPALETTE hPalette, WICBitmapAlphaChannelOption options, IWICBitmap** ppIBitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), hBitmap, hPalette, options, ppIBitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(22)] - public HRESULT CreateBitmapFromHICON(HICON hIcon, IWICBitmap** ppIBitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), hIcon, ppIBitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(23)] - public HRESULT CreateComponentEnumerator([NativeTypeName("DWORD")] uint componentTypes, [NativeTypeName("DWORD")] uint options, IEnumUnknown** ppIEnumUnknown) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[23]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), componentTypes, options, ppIEnumUnknown); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(24)] - public HRESULT CreateFastMetadataEncoderFromDecoder(IWICBitmapDecoder* pIDecoder, IWICFastMetadataEncoder** ppIFastEncoder) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[24]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), pIDecoder, ppIFastEncoder); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(25)] - public HRESULT CreateFastMetadataEncoderFromFrameDecode(IWICBitmapFrameDecode* pIFrameDecoder, IWICFastMetadataEncoder** ppIFastEncoder) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[25]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), pIFrameDecoder, ppIFastEncoder); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(26)] - public HRESULT CreateQueryWriter([NativeTypeName("const GUID &")] Guid* guidMetadataFormat, [NativeTypeName("const GUID *")] Guid* pguidVendor, IWICMetadataQueryWriter** ppIQueryWriter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[26]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), guidMetadataFormat, pguidVendor, ppIQueryWriter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(27)] - public HRESULT CreateQueryWriterFromReader(IWICMetadataQueryReader* pIQueryReader, [NativeTypeName("const GUID *")] Guid* pguidVendor, IWICMetadataQueryWriter** ppIQueryWriter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[27]))((IWICImagingFactory*)Unsafe.AsPointer(ref this), pIQueryReader, pguidVendor, ppIQueryWriter); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT CreateDecoderFromFilename([NativeTypeName("LPCWSTR")] ushort* wzFilename, [NativeTypeName("const GUID *")] Guid* pguidVendor, [NativeTypeName("DWORD")] uint dwDesiredAccess, WICDecodeOptions metadataOptions, IWICBitmapDecoder** ppIDecoder); - - [VtblIndex(4)] - HRESULT CreateDecoderFromStream(IStream* pIStream, [NativeTypeName("const GUID *")] Guid* pguidVendor, WICDecodeOptions metadataOptions, IWICBitmapDecoder** ppIDecoder); - - [VtblIndex(5)] - HRESULT CreateDecoderFromFileHandle([NativeTypeName("ULONG_PTR")] nuint hFile, [NativeTypeName("const GUID *")] Guid* pguidVendor, WICDecodeOptions metadataOptions, IWICBitmapDecoder** ppIDecoder); - - [VtblIndex(6)] - HRESULT CreateComponentInfo([NativeTypeName("const IID &")] Guid* clsidComponent, IWICComponentInfo** ppIInfo); - - [VtblIndex(7)] - HRESULT CreateDecoder([NativeTypeName("const GUID &")] Guid* guidContainerFormat, [NativeTypeName("const GUID *")] Guid* pguidVendor, IWICBitmapDecoder** ppIDecoder); - - [VtblIndex(8)] - HRESULT CreateEncoder([NativeTypeName("const GUID &")] Guid* guidContainerFormat, [NativeTypeName("const GUID *")] Guid* pguidVendor, IWICBitmapEncoder** ppIEncoder); - - [VtblIndex(9)] - HRESULT CreatePalette(IWICPalette** ppIPalette); - - [VtblIndex(10)] - HRESULT CreateFormatConverter(IWICFormatConverter** ppIFormatConverter); - - [VtblIndex(11)] - HRESULT CreateBitmapScaler(IWICBitmapScaler** ppIBitmapScaler); - - [VtblIndex(12)] - HRESULT CreateBitmapClipper(IWICBitmapClipper** ppIBitmapClipper); - - [VtblIndex(13)] - HRESULT CreateBitmapFlipRotator(IWICBitmapFlipRotator** ppIBitmapFlipRotator); - - [VtblIndex(14)] - HRESULT CreateStream(IWICStream** ppIWICStream); - - [VtblIndex(15)] - HRESULT CreateColorContext(IWICColorContext** ppIWICColorContext); - - [VtblIndex(16)] - HRESULT CreateColorTransformer(IWICColorTransform** ppIWICColorTransform); - - [VtblIndex(17)] - HRESULT CreateBitmap(uint uiWidth, uint uiHeight, [NativeTypeName("REFWICPixelFormatGUID")] Guid* pixelFormat, WICBitmapCreateCacheOption option, IWICBitmap** ppIBitmap); - - [VtblIndex(18)] - HRESULT CreateBitmapFromSource(IWICBitmapSource* pIBitmapSource, WICBitmapCreateCacheOption option, IWICBitmap** ppIBitmap); - - [VtblIndex(19)] - HRESULT CreateBitmapFromSourceRect(IWICBitmapSource* pIBitmapSource, uint x, uint y, uint width, uint height, IWICBitmap** ppIBitmap); - - [VtblIndex(20)] - HRESULT CreateBitmapFromMemory(uint uiWidth, uint uiHeight, [NativeTypeName("REFWICPixelFormatGUID")] Guid* pixelFormat, uint cbStride, uint cbBufferSize, byte* pbBuffer, IWICBitmap** ppIBitmap); - - [VtblIndex(21)] - HRESULT CreateBitmapFromHBITMAP(HBITMAP hBitmap, HPALETTE hPalette, WICBitmapAlphaChannelOption options, IWICBitmap** ppIBitmap); - - [VtblIndex(22)] - HRESULT CreateBitmapFromHICON(HICON hIcon, IWICBitmap** ppIBitmap); - - [VtblIndex(23)] - HRESULT CreateComponentEnumerator([NativeTypeName("DWORD")] uint componentTypes, [NativeTypeName("DWORD")] uint options, IEnumUnknown** ppIEnumUnknown); - - [VtblIndex(24)] - HRESULT CreateFastMetadataEncoderFromDecoder(IWICBitmapDecoder* pIDecoder, IWICFastMetadataEncoder** ppIFastEncoder); - - [VtblIndex(25)] - HRESULT CreateFastMetadataEncoderFromFrameDecode(IWICBitmapFrameDecode* pIFrameDecoder, IWICFastMetadataEncoder** ppIFastEncoder); - - [VtblIndex(26)] - HRESULT CreateQueryWriter([NativeTypeName("const GUID &")] Guid* guidMetadataFormat, [NativeTypeName("const GUID *")] Guid* pguidVendor, IWICMetadataQueryWriter** ppIQueryWriter); - - [VtblIndex(27)] - HRESULT CreateQueryWriterFromReader(IWICMetadataQueryReader* pIQueryReader, [NativeTypeName("const GUID *")] Guid* pguidVendor, IWICMetadataQueryWriter** ppIQueryWriter); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (LPCWSTR, const GUID *, DWORD, WICDecodeOptions, IWICBitmapDecoder **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateDecoderFromFilename; - - [NativeTypeName("HRESULT (IStream *, const GUID *, WICDecodeOptions, IWICBitmapDecoder **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateDecoderFromStream; - - [NativeTypeName("HRESULT (ULONG_PTR, const GUID *, WICDecodeOptions, IWICBitmapDecoder **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateDecoderFromFileHandle; - - [NativeTypeName("HRESULT (const IID &, IWICComponentInfo **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateComponentInfo; - - [NativeTypeName("HRESULT (const GUID &, const GUID *, IWICBitmapDecoder **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateDecoder; - - [NativeTypeName("HRESULT (const GUID &, const GUID *, IWICBitmapEncoder **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateEncoder; - - [NativeTypeName("HRESULT (IWICPalette **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreatePalette; - - [NativeTypeName("HRESULT (IWICFormatConverter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateFormatConverter; - - [NativeTypeName("HRESULT (IWICBitmapScaler **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapScaler; - - [NativeTypeName("HRESULT (IWICBitmapClipper **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapClipper; - - [NativeTypeName("HRESULT (IWICBitmapFlipRotator **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapFlipRotator; - - [NativeTypeName("HRESULT (IWICStream **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateStream; - - [NativeTypeName("HRESULT (IWICColorContext **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateColorContext; - - [NativeTypeName("HRESULT (IWICColorTransform **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateColorTransformer; - - [NativeTypeName("HRESULT (UINT, UINT, REFWICPixelFormatGUID, WICBitmapCreateCacheOption, IWICBitmap **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmap; - - [NativeTypeName("HRESULT (IWICBitmapSource *, WICBitmapCreateCacheOption, IWICBitmap **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapFromSource; - - [NativeTypeName("HRESULT (IWICBitmapSource *, UINT, UINT, UINT, UINT, IWICBitmap **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapFromSourceRect; - - [NativeTypeName("HRESULT (UINT, UINT, REFWICPixelFormatGUID, UINT, UINT, BYTE *, IWICBitmap **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapFromMemory; - - [NativeTypeName("HRESULT (HBITMAP, HPALETTE, WICBitmapAlphaChannelOption, IWICBitmap **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapFromHBITMAP; - - [NativeTypeName("HRESULT (HICON, IWICBitmap **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapFromHICON; - - [NativeTypeName("HRESULT (DWORD, DWORD, IEnumUnknown **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateComponentEnumerator; - - [NativeTypeName("HRESULT (IWICBitmapDecoder *, IWICFastMetadataEncoder **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateFastMetadataEncoderFromDecoder; - - [NativeTypeName("HRESULT (IWICBitmapFrameDecode *, IWICFastMetadataEncoder **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateFastMetadataEncoderFromFrameDecode; - - [NativeTypeName("HRESULT (const GUID &, const GUID *, IWICMetadataQueryWriter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateQueryWriter; - - [NativeTypeName("HRESULT (IWICMetadataQueryReader *, const GUID *, IWICMetadataQueryWriter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateQueryWriterFromReader; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICImagingFactory2.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICImagingFactory2.cs index bf5e1fc9..ef504dce 100644 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICImagingFactory2.cs +++ b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICImagingFactory2.cs @@ -15,7 +15,7 @@ namespace TerraFX.Interop.Windows [Guid("7B816B45-1996-4476-B132-DE9E247C8AF0")] [NativeTypeName("struct IWICImagingFactory2 : IWICImagingFactory")] [NativeInheritance("IWICImagingFactory")] - internal unsafe partial struct IWICImagingFactory2 : IWICImagingFactory2.Interface + internal unsafe partial struct IWICImagingFactory2 { public void** lpVtbl; @@ -63,13 +63,6 @@ namespace TerraFX.Interop.Windows return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IWICImagingFactory2*)Unsafe.AsPointer(ref this), hFile, pguidVendor, metadataOptions, ppIDecoder); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT CreateComponentInfo([NativeTypeName("const IID &")] Guid* clsidComponent, IWICComponentInfo** ppIInfo) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IWICImagingFactory2*)Unsafe.AsPointer(ref this), clsidComponent, ppIInfo); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(7)] public HRESULT CreateDecoder([NativeTypeName("const GUID &")] Guid* guidContainerFormat, [NativeTypeName("const GUID *")] Guid* pguidVendor, IWICBitmapDecoder** ppIDecoder) @@ -98,27 +91,6 @@ namespace TerraFX.Interop.Windows return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IWICImagingFactory2*)Unsafe.AsPointer(ref this), ppIFormatConverter); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT CreateBitmapScaler(IWICBitmapScaler** ppIBitmapScaler) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IWICImagingFactory2*)Unsafe.AsPointer(ref this), ppIBitmapScaler); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT CreateBitmapClipper(IWICBitmapClipper** ppIBitmapClipper) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IWICImagingFactory2*)Unsafe.AsPointer(ref this), ppIBitmapClipper); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT CreateBitmapFlipRotator(IWICBitmapFlipRotator** ppIBitmapFlipRotator) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IWICImagingFactory2*)Unsafe.AsPointer(ref this), ppIBitmapFlipRotator); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(14)] public HRESULT CreateStream(IWICStream** ppIWICStream) @@ -126,20 +98,6 @@ namespace TerraFX.Interop.Windows return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IWICImagingFactory2*)Unsafe.AsPointer(ref this), ppIWICStream); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT CreateColorContext(IWICColorContext** ppIWICColorContext) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IWICImagingFactory2*)Unsafe.AsPointer(ref this), ppIWICColorContext); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(16)] - public HRESULT CreateColorTransformer(IWICColorTransform** ppIWICColorTransform) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IWICImagingFactory2*)Unsafe.AsPointer(ref this), ppIWICColorTransform); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(17)] public HRESULT CreateBitmap(uint uiWidth, uint uiHeight, [NativeTypeName("REFWICPixelFormatGUID")] Guid* pixelFormat, WICBitmapCreateCacheOption option, IWICBitmap** ppIBitmap) @@ -167,157 +125,5 @@ namespace TerraFX.Interop.Windows { return ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((IWICImagingFactory2*)Unsafe.AsPointer(ref this), uiWidth, uiHeight, pixelFormat, cbStride, cbBufferSize, pbBuffer, ppIBitmap); } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(21)] - public HRESULT CreateBitmapFromHBITMAP(HBITMAP hBitmap, HPALETTE hPalette, WICBitmapAlphaChannelOption options, IWICBitmap** ppIBitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((IWICImagingFactory2*)Unsafe.AsPointer(ref this), hBitmap, hPalette, options, ppIBitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(22)] - public HRESULT CreateBitmapFromHICON(HICON hIcon, IWICBitmap** ppIBitmap) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((IWICImagingFactory2*)Unsafe.AsPointer(ref this), hIcon, ppIBitmap); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(23)] - public HRESULT CreateComponentEnumerator([NativeTypeName("DWORD")] uint componentTypes, [NativeTypeName("DWORD")] uint options, IEnumUnknown** ppIEnumUnknown) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[23]))((IWICImagingFactory2*)Unsafe.AsPointer(ref this), componentTypes, options, ppIEnumUnknown); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(24)] - public HRESULT CreateFastMetadataEncoderFromDecoder(IWICBitmapDecoder* pIDecoder, IWICFastMetadataEncoder** ppIFastEncoder) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[24]))((IWICImagingFactory2*)Unsafe.AsPointer(ref this), pIDecoder, ppIFastEncoder); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(25)] - public HRESULT CreateFastMetadataEncoderFromFrameDecode(IWICBitmapFrameDecode* pIFrameDecoder, IWICFastMetadataEncoder** ppIFastEncoder) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[25]))((IWICImagingFactory2*)Unsafe.AsPointer(ref this), pIFrameDecoder, ppIFastEncoder); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(26)] - public HRESULT CreateQueryWriter([NativeTypeName("const GUID &")] Guid* guidMetadataFormat, [NativeTypeName("const GUID *")] Guid* pguidVendor, IWICMetadataQueryWriter** ppIQueryWriter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[26]))((IWICImagingFactory2*)Unsafe.AsPointer(ref this), guidMetadataFormat, pguidVendor, ppIQueryWriter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(27)] - public HRESULT CreateQueryWriterFromReader(IWICMetadataQueryReader* pIQueryReader, [NativeTypeName("const GUID *")] Guid* pguidVendor, IWICMetadataQueryWriter** ppIQueryWriter) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[27]))((IWICImagingFactory2*)Unsafe.AsPointer(ref this), pIQueryReader, pguidVendor, ppIQueryWriter); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(28)] - public HRESULT CreateImageEncoder(ID2D1Device* pD2DDevice, IWICImageEncoder** ppWICImageEncoder) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((IWICImagingFactory2*)Unsafe.AsPointer(ref this), pD2DDevice, ppWICImageEncoder); - } - - public interface Interface : IWICImagingFactory.Interface - { - [VtblIndex(28)] - HRESULT CreateImageEncoder(ID2D1Device* pD2DDevice, IWICImageEncoder** ppWICImageEncoder); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (LPCWSTR, const GUID *, DWORD, WICDecodeOptions, IWICBitmapDecoder **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateDecoderFromFilename; - - [NativeTypeName("HRESULT (IStream *, const GUID *, WICDecodeOptions, IWICBitmapDecoder **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateDecoderFromStream; - - [NativeTypeName("HRESULT (ULONG_PTR, const GUID *, WICDecodeOptions, IWICBitmapDecoder **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateDecoderFromFileHandle; - - [NativeTypeName("HRESULT (const IID &, IWICComponentInfo **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateComponentInfo; - - [NativeTypeName("HRESULT (const GUID &, const GUID *, IWICBitmapDecoder **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateDecoder; - - [NativeTypeName("HRESULT (const GUID &, const GUID *, IWICBitmapEncoder **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateEncoder; - - [NativeTypeName("HRESULT (IWICPalette **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreatePalette; - - [NativeTypeName("HRESULT (IWICFormatConverter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateFormatConverter; - - [NativeTypeName("HRESULT (IWICBitmapScaler **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapScaler; - - [NativeTypeName("HRESULT (IWICBitmapClipper **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapClipper; - - [NativeTypeName("HRESULT (IWICBitmapFlipRotator **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapFlipRotator; - - [NativeTypeName("HRESULT (IWICStream **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateStream; - - [NativeTypeName("HRESULT (IWICColorContext **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateColorContext; - - [NativeTypeName("HRESULT (IWICColorTransform **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateColorTransformer; - - [NativeTypeName("HRESULT (UINT, UINT, REFWICPixelFormatGUID, WICBitmapCreateCacheOption, IWICBitmap **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmap; - - [NativeTypeName("HRESULT (IWICBitmapSource *, WICBitmapCreateCacheOption, IWICBitmap **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapFromSource; - - [NativeTypeName("HRESULT (IWICBitmapSource *, UINT, UINT, UINT, UINT, IWICBitmap **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapFromSourceRect; - - [NativeTypeName("HRESULT (UINT, UINT, REFWICPixelFormatGUID, UINT, UINT, BYTE *, IWICBitmap **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapFromMemory; - - [NativeTypeName("HRESULT (HBITMAP, HPALETTE, WICBitmapAlphaChannelOption, IWICBitmap **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapFromHBITMAP; - - [NativeTypeName("HRESULT (HICON, IWICBitmap **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateBitmapFromHICON; - - [NativeTypeName("HRESULT (DWORD, DWORD, IEnumUnknown **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateComponentEnumerator; - - [NativeTypeName("HRESULT (IWICBitmapDecoder *, IWICFastMetadataEncoder **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateFastMetadataEncoderFromDecoder; - - [NativeTypeName("HRESULT (IWICBitmapFrameDecode *, IWICFastMetadataEncoder **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateFastMetadataEncoderFromFrameDecode; - - [NativeTypeName("HRESULT (const GUID &, const GUID *, IWICMetadataQueryWriter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateQueryWriter; - - [NativeTypeName("HRESULT (IWICMetadataQueryReader *, const GUID *, IWICMetadataQueryWriter **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateQueryWriterFromReader; - - [NativeTypeName("HRESULT (ID2D1Device *, IWICImageEncoder **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CreateImageEncoder; - } } } diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICMetadataQueryReader.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICMetadataQueryReader.cs deleted file mode 100644 index 625d6571..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICMetadataQueryReader.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("30989668-E1C9-4597-B395-458EEDB808DF")] - [NativeTypeName("struct IWICMetadataQueryReader : IUnknown")] - [NativeInheritance("IUnknown")] - internal unsafe partial struct IWICMetadataQueryReader : IWICMetadataQueryReader.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IWICMetadataQueryReader*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IWICMetadataQueryReader*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IWICMetadataQueryReader*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetContainerFormat(Guid* pguidContainerFormat) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IWICMetadataQueryReader*)Unsafe.AsPointer(ref this), pguidContainerFormat); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetLocation(uint cchMaxLength, [NativeTypeName("WCHAR *")] ushort* wzNamespace, uint* pcchActualLength) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IWICMetadataQueryReader*)Unsafe.AsPointer(ref this), cchMaxLength, wzNamespace, pcchActualLength); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetMetadataByName([NativeTypeName("LPCWSTR")] ushort* wzName, PROPVARIANT* pvarValue) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IWICMetadataQueryReader*)Unsafe.AsPointer(ref this), wzName, pvarValue); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetEnumerator(IEnumString** ppIEnumString) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IWICMetadataQueryReader*)Unsafe.AsPointer(ref this), ppIEnumString); - } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT GetContainerFormat(Guid* pguidContainerFormat); - - [VtblIndex(4)] - HRESULT GetLocation(uint cchMaxLength, [NativeTypeName("WCHAR *")] ushort* wzNamespace, uint* pcchActualLength); - - [VtblIndex(5)] - HRESULT GetMetadataByName([NativeTypeName("LPCWSTR")] ushort* wzName, PROPVARIANT* pvarValue); - - [VtblIndex(6)] - HRESULT GetEnumerator(IEnumString** ppIEnumString); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (GUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetContainerFormat; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetLocation; - - [NativeTypeName("HRESULT (LPCWSTR, PROPVARIANT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMetadataByName; - - [NativeTypeName("HRESULT (IEnumString **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetEnumerator; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICMetadataQueryWriter.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICMetadataQueryWriter.cs deleted file mode 100644 index 058f86b2..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICMetadataQueryWriter.cs +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows -{ - [Guid("A721791A-0DEF-4D06-BD91-2118BF1DB10B")] - [NativeTypeName("struct IWICMetadataQueryWriter : IWICMetadataQueryReader")] - [NativeInheritance("IWICMetadataQueryReader")] - internal unsafe partial struct IWICMetadataQueryWriter : IWICMetadataQueryWriter.Interface - { - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IWICMetadataQueryWriter*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IWICMetadataQueryWriter*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IWICMetadataQueryWriter*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetContainerFormat(Guid* pguidContainerFormat) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IWICMetadataQueryWriter*)Unsafe.AsPointer(ref this), pguidContainerFormat); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetLocation(uint cchMaxLength, [NativeTypeName("WCHAR *")] ushort* wzNamespace, uint* pcchActualLength) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IWICMetadataQueryWriter*)Unsafe.AsPointer(ref this), cchMaxLength, wzNamespace, pcchActualLength); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetMetadataByName([NativeTypeName("LPCWSTR")] ushort* wzName, PROPVARIANT* pvarValue) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IWICMetadataQueryWriter*)Unsafe.AsPointer(ref this), wzName, pvarValue); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT GetEnumerator(IEnumString** ppIEnumString) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IWICMetadataQueryWriter*)Unsafe.AsPointer(ref this), ppIEnumString); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT SetMetadataByName([NativeTypeName("LPCWSTR")] ushort* wzName, [NativeTypeName("const PROPVARIANT *")] PROPVARIANT* pvarValue) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IWICMetadataQueryWriter*)Unsafe.AsPointer(ref this), wzName, pvarValue); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT RemoveMetadataByName([NativeTypeName("LPCWSTR")] ushort* wzName) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IWICMetadataQueryWriter*)Unsafe.AsPointer(ref this), wzName); - } - - public interface Interface : IWICMetadataQueryReader.Interface - { - [VtblIndex(7)] - HRESULT SetMetadataByName([NativeTypeName("LPCWSTR")] ushort* wzName, [NativeTypeName("const PROPVARIANT *")] PROPVARIANT* pvarValue); - - [VtblIndex(8)] - HRESULT RemoveMetadataByName([NativeTypeName("LPCWSTR")] ushort* wzName); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (GUID *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetContainerFormat; - - [NativeTypeName("HRESULT (UINT, WCHAR *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetLocation; - - [NativeTypeName("HRESULT (LPCWSTR, PROPVARIANT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetMetadataByName; - - [NativeTypeName("HRESULT (IEnumString **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetEnumerator; - - [NativeTypeName("HRESULT (LPCWSTR, const PROPVARIANT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetMetadataByName; - - [NativeTypeName("HRESULT (LPCWSTR) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] RemoveMetadataByName; - } - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICPalette.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICPalette.cs index a0e04b40..a6f6ae88 100644 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICPalette.cs +++ b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICPalette.cs @@ -12,7 +12,7 @@ namespace TerraFX.Interop.Windows [Guid("00000040-A8F2-4877-BA0A-FD2B6645FB94")] [NativeTypeName("struct IWICPalette : IUnknown")] [NativeInheritance("IUnknown")] - internal unsafe partial struct IWICPalette : IWICPalette.Interface + internal unsafe partial struct IWICPalette { public void** lpVtbl; @@ -108,80 +108,5 @@ namespace TerraFX.Interop.Windows { return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IWICPalette*)Unsafe.AsPointer(ref this), pfHasAlpha); } - - public interface Interface : IUnknown.Interface - { - [VtblIndex(3)] - HRESULT InitializePredefined(WICBitmapPaletteType ePaletteType, BOOL fAddTransparentColor); - - [VtblIndex(4)] - HRESULT InitializeCustom([NativeTypeName("WICColor *")] uint* pColors, uint cCount); - - [VtblIndex(5)] - HRESULT InitializeFromBitmap(IWICBitmapSource* pISurface, uint cCount, BOOL fAddTransparentColor); - - [VtblIndex(6)] - HRESULT InitializeFromPalette(IWICPalette* pIPalette); - - [VtblIndex(7)] - HRESULT GetType(WICBitmapPaletteType* pePaletteType); - - [VtblIndex(8)] - HRESULT GetColorCount(uint* pcCount); - - [VtblIndex(9)] - HRESULT GetColors(uint cCount, [NativeTypeName("WICColor *")] uint* pColors, uint* pcActualColors); - - [VtblIndex(10)] - HRESULT IsBlackWhite(BOOL* pfIsBlackWhite); - - [VtblIndex(11)] - HRESULT IsGrayscale(BOOL* pfIsGrayscale); - - [VtblIndex(12)] - HRESULT HasAlpha(BOOL* pfHasAlpha); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (WICBitmapPaletteType, BOOL) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] InitializePredefined; - - [NativeTypeName("HRESULT (WICColor *, UINT) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] InitializeCustom; - - [NativeTypeName("HRESULT (IWICBitmapSource *, UINT, BOOL) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] InitializeFromBitmap; - - [NativeTypeName("HRESULT (IWICPalette *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] InitializeFromPalette; - - [NativeTypeName("HRESULT (WICBitmapPaletteType *) __attribute__((stdcall))")] - public new delegate* unmanaged[Stdcall] GetType; - - [NativeTypeName("HRESULT (UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetColorCount; - - [NativeTypeName("HRESULT (UINT, WICColor *, UINT *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] GetColors; - - [NativeTypeName("HRESULT (BOOL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsBlackWhite; - - [NativeTypeName("HRESULT (BOOL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] IsGrayscale; - - [NativeTypeName("HRESULT (BOOL *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] HasAlpha; - } } } diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICStream.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICStream.cs index bef24436..f5af19fa 100644 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICStream.cs +++ b/src/TerraFX.Interop.Windows/Windows/um/wincodec/IWICStream.cs @@ -12,7 +12,7 @@ namespace TerraFX.Interop.Windows [Guid("135FF860-22B7-4DDF-B0F6-218F4F299A43")] [NativeTypeName("struct IWICStream : IStream")] [NativeInheritance("IStream")] - internal unsafe partial struct IWICStream : IWICStream.Interface + internal unsafe partial struct IWICStream { public void** lpVtbl; @@ -102,13 +102,6 @@ namespace TerraFX.Interop.Windows return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IWICStream*)Unsafe.AsPointer(ref this), libOffset, cb, dwLockType); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT Stat(STATSTG* pstatstg, [NativeTypeName("DWORD")] uint grfStatFlag) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IWICStream*)Unsafe.AsPointer(ref this), pstatstg, grfStatFlag); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(13)] public HRESULT Clone(IStream** ppstm) @@ -143,77 +136,5 @@ namespace TerraFX.Interop.Windows { return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IWICStream*)Unsafe.AsPointer(ref this), pIStream, ulOffset, ulMaxSize); } - - public interface Interface : IStream.Interface - { - [VtblIndex(14)] - HRESULT InitializeFromIStream(IStream* pIStream); - - [VtblIndex(15)] - HRESULT InitializeFromFilename([NativeTypeName("LPCWSTR")] ushort* wzFileName, [NativeTypeName("DWORD")] uint dwDesiredAccess); - - [VtblIndex(16)] - HRESULT InitializeFromMemory([NativeTypeName("WICInProcPointer")] byte* pbBuffer, [NativeTypeName("DWORD")] uint cbBufferSize); - - [VtblIndex(17)] - HRESULT InitializeFromIStreamRegion(IStream* pIStream, ULARGE_INTEGER ulOffset, ULARGE_INTEGER ulMaxSize); - } - - internal partial struct Vtbl - { - [NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] QueryInterface; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] AddRef; - - [NativeTypeName("ULONG () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Release; - - [NativeTypeName("HRESULT (void *, ULONG, ULONG *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Read; - - [NativeTypeName("HRESULT (const void *, ULONG, ULONG *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Write; - - [NativeTypeName("HRESULT (LARGE_INTEGER, DWORD, ULARGE_INTEGER *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Seek; - - [NativeTypeName("HRESULT (ULARGE_INTEGER) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] SetSize; - - [NativeTypeName("HRESULT (IStream *, ULARGE_INTEGER, ULARGE_INTEGER *, ULARGE_INTEGER *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] CopyTo; - - [NativeTypeName("HRESULT (DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Commit; - - [NativeTypeName("HRESULT () __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Revert; - - [NativeTypeName("HRESULT (ULARGE_INTEGER, ULARGE_INTEGER, DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] LockRegion; - - [NativeTypeName("HRESULT (ULARGE_INTEGER, ULARGE_INTEGER, DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] UnlockRegion; - - [NativeTypeName("HRESULT (STATSTG *, DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Stat; - - [NativeTypeName("HRESULT (IStream **) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] Clone; - - [NativeTypeName("HRESULT (IStream *) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] InitializeFromIStream; - - [NativeTypeName("HRESULT (LPCWSTR, DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] InitializeFromFilename; - - [NativeTypeName("HRESULT (WICInProcPointer, DWORD) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] InitializeFromMemory; - - [NativeTypeName("HRESULT (IStream *, ULARGE_INTEGER, ULARGE_INTEGER) __attribute__((stdcall))")] - public delegate* unmanaged[Stdcall] InitializeFromIStreamRegion; - } } } diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/WICBitmapInterpolationMode.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/WICBitmapInterpolationMode.cs deleted file mode 100644 index f4fac487..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/WICBitmapInterpolationMode.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal enum WICBitmapInterpolationMode - { - WICBitmapInterpolationModeNearestNeighbor = 0, - WICBitmapInterpolationModeLinear = 0x1, - WICBitmapInterpolationModeCubic = 0x2, - WICBitmapInterpolationModeFant = 0x3, - WICBitmapInterpolationModeHighQualityCubic = 0x4, - WICBITMAPINTERPOLATIONMODE_FORCE_DWORD = 0x7fffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/WICBitmapPattern.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/WICBitmapPattern.cs deleted file mode 100644 index 3a3013a4..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/WICBitmapPattern.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal unsafe partial struct WICBitmapPattern - { - public ULARGE_INTEGER Position; - - [NativeTypeName("ULONG")] - public uint Length; - - public byte* Pattern; - - public byte* Mask; - - public BOOL EndOfStream; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/WICBitmapTransformOptions.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/WICBitmapTransformOptions.cs deleted file mode 100644 index d4eddbff..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/WICBitmapTransformOptions.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal enum WICBitmapTransformOptions - { - WICBitmapTransformRotate0 = 0, - WICBitmapTransformRotate90 = 0x1, - WICBitmapTransformRotate180 = 0x2, - WICBitmapTransformRotate270 = 0x3, - WICBitmapTransformFlipHorizontal = 0x8, - WICBitmapTransformFlipVertical = 0x10, - WICBITMAPTRANSFORMOPTIONS_FORCE_DWORD = 0x7fffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/WICColorContextType.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/WICColorContextType.cs deleted file mode 100644 index 1a200301..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/WICColorContextType.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal enum WICColorContextType - { - WICColorContextUninitialized = 0, - WICColorContextProfile = 0x1, - WICColorContextExifColorSpace = 0x2, - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/WICComponentType.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/WICComponentType.cs deleted file mode 100644 index 9b6f8e98..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/WICComponentType.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -namespace TerraFX.Interop.Windows -{ - internal enum WICComponentType - { - WICDecoder = 0x1, - WICEncoder = 0x2, - WICPixelFormatConverter = 0x4, - WICMetadataReader = 0x8, - WICMetadataWriter = 0x10, - WICPixelFormat = 0x20, - WICAllComponents = 0x3f, - WICCOMPONENTTYPE_FORCE_DWORD = 0x7fffffff, - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/wincodec/WICImageParameters.cs b/src/TerraFX.Interop.Windows/Windows/um/wincodec/WICImageParameters.cs deleted file mode 100644 index b1ad1a9d..00000000 --- a/src/TerraFX.Interop.Windows/Windows/um/wincodec/WICImageParameters.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System.Runtime.Versioning; -using TerraFX.Interop.DirectX; - -namespace TerraFX.Interop.Windows -{ - [SupportedOSPlatform("windows8.0")] - internal partial struct WICImageParameters - { - public D2D1_PIXEL_FORMAT PixelFormat; - - public float DpiX; - - public float DpiY; - - public float Top; - - public float Left; - - [NativeTypeName("UINT32")] - public uint PixelWidth; - - [NativeTypeName("UINT32")] - public uint PixelHeight; - } -} diff --git a/src/TerraFX.Interop.Windows/Windows/um/winnt/Windows.cs b/src/TerraFX.Interop.Windows/Windows/um/winnt/Windows.cs index 320eab77..c3b5a2cc 100644 --- a/src/TerraFX.Interop.Windows/Windows/um/winnt/Windows.cs +++ b/src/TerraFX.Interop.Windows/Windows/um/winnt/Windows.cs @@ -3,756 +3,14 @@ // Ported from um/winnt.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. -using System; -using System.Diagnostics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - namespace TerraFX.Interop.Windows { internal static partial class Windows { - [NativeTypeName("const GUID")] - public static ref readonly Guid NO_SUBGROUP_GUID - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x3E, 0x41, 0xA3, 0xFE, - 0x05, 0x7E, - 0x11, 0x49, - 0x9A, - 0x71, - 0x70, - 0x03, - 0x31, - 0xF1, - 0xC2, - 0x94 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid ALL_POWERSCHEMES_GUID - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x5E, 0xE9, 0xA1, 0x68, - 0xEA, 0x13, - 0xE1, 0x41, - 0x80, - 0x11, - 0x0C, - 0x49, - 0x6C, - 0xA4, - 0x90, - 0xB0 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("#define ANYSIZE_ARRAY 1")] - public const int ANYSIZE_ARRAY = 1; - - [NativeTypeName("#define PRAGMA_DEPRECATED_DDK 0")] - public const int PRAGMA_DEPRECATED_DDK = 0; - - [NativeTypeName("#define UCSCHAR_INVALID_CHARACTER (0xffffffff)")] - public const uint UCSCHAR_INVALID_CHARACTER = (0xffffffff); - - [NativeTypeName("#define MIN_UCSCHAR (0)")] - public const int MIN_UCSCHAR = (0); - - [NativeTypeName("#define ALL_PROCESSOR_GROUPS 0xffff")] - public const int ALL_PROCESSOR_GROUPS = 0xffff; - - [NativeTypeName("#define APPLICATION_ERROR_MASK 0x20000000")] - public const int APPLICATION_ERROR_MASK = 0x20000000; - - [NativeTypeName("#define MAXLONGLONG (0x7fffffffffffffff)")] - public const long MAXLONGLONG = (0x7fffffffffffffff); - - [NativeTypeName("#define ANSI_NULL ((CHAR)0)")] - public const sbyte ANSI_NULL = ((sbyte)(0)); - - [NativeTypeName("#define UNICODE_NULL ((WCHAR)0)")] - public const ushort UNICODE_NULL = ((ushort)(0)); - - [NativeTypeName("#define UNICODE_STRING_MAX_BYTES ((WORD ) 65534)")] - public const ushort UNICODE_STRING_MAX_BYTES = ((ushort)(65534)); - - [NativeTypeName("#define UNICODE_STRING_MAX_CHARS (32767)")] - public const int UNICODE_STRING_MAX_CHARS = (32767); - - [NativeTypeName("#define MINCHAR 0x80")] - public const int MINCHAR = 0x80; - - [NativeTypeName("#define MAXCHAR 0x7f")] - public const int MAXCHAR = 0x7f; - - [NativeTypeName("#define MINSHORT 0x8000")] - public const int MINSHORT = 0x8000; - - [NativeTypeName("#define MAXSHORT 0x7fff")] - public const int MAXSHORT = 0x7fff; - - [NativeTypeName("#define MINLONG 0x80000000")] - public const uint MINLONG = 0x80000000; - - [NativeTypeName("#define MAXLONG 0x7fffffff")] - public const int MAXLONG = 0x7fffffff; - - [NativeTypeName("#define MAXBYTE 0xff")] - public const int MAXBYTE = 0xff; - - [NativeTypeName("#define MAXWORD 0xffff")] - public const int MAXWORD = 0xffff; - - [NativeTypeName("#define MAXDWORD 0xffffffff")] - public const uint MAXDWORD = 0xffffffff; - - [NativeTypeName("#define ENCLAVE_SHORT_ID_LENGTH 16")] - public const int ENCLAVE_SHORT_ID_LENGTH = 16; - - [NativeTypeName("#define ENCLAVE_LONG_ID_LENGTH 32")] - public const int ENCLAVE_LONG_ID_LENGTH = 32; - - [NativeTypeName("#define NLS_VALID_LOCALE_MASK 0x000fffff")] - public const int NLS_VALID_LOCALE_MASK = 0x000fffff; - - [NativeTypeName("#define _MM_HINT_T0 1")] - public const int _MM_HINT_T0 = 1; - - [NativeTypeName("#define _MM_HINT_T1 2")] - public const int _MM_HINT_T1 = 2; - - [NativeTypeName("#define _MM_HINT_T2 3")] - public const int _MM_HINT_T2 = 3; - - [NativeTypeName("#define _MM_HINT_NTA 0")] - public const int _MM_HINT_NTA = 0; - - [NativeTypeName("#define DELETE (0x00010000L)")] - public const int DELETE = (0x00010000); - - [NativeTypeName("#define WRITE_DAC (0x00040000L)")] - public const int WRITE_DAC = (0x00040000); - - [NativeTypeName("#define WRITE_OWNER (0x00080000L)")] - public const int WRITE_OWNER = (0x00080000); - - [NativeTypeName("#define SYNCHRONIZE (0x00100000L)")] - public const int SYNCHRONIZE = (0x00100000); - - [NativeTypeName("#define STANDARD_RIGHTS_REQUIRED (0x000F0000L)")] - public const int STANDARD_RIGHTS_REQUIRED = (0x000F0000); - - [NativeTypeName("#define STANDARD_RIGHTS_READ (READ_CONTROL)")] - public const int STANDARD_RIGHTS_READ = ((0x00020000)); - - [NativeTypeName("#define STANDARD_RIGHTS_WRITE (READ_CONTROL)")] - public const int STANDARD_RIGHTS_WRITE = ((0x00020000)); - - [NativeTypeName("#define STANDARD_RIGHTS_EXECUTE (READ_CONTROL)")] - public const int STANDARD_RIGHTS_EXECUTE = ((0x00020000)); - - [NativeTypeName("#define STANDARD_RIGHTS_ALL (0x001F0000L)")] - public const int STANDARD_RIGHTS_ALL = (0x001F0000); - - [NativeTypeName("#define SPECIFIC_RIGHTS_ALL (0x0000FFFFL)")] - public const int SPECIFIC_RIGHTS_ALL = (0x0000FFFF); - [NativeTypeName("#define GENERIC_READ (0x80000000L)")] public const uint GENERIC_READ = (0x80000000); [NativeTypeName("#define GENERIC_WRITE (0x40000000L)")] public const int GENERIC_WRITE = (0x40000000); - - [NativeTypeName("#define GENERIC_EXECUTE (0x20000000L)")] - public const int GENERIC_EXECUTE = (0x20000000); - - [NativeTypeName("#define GENERIC_ALL (0x10000000L)")] - public const int GENERIC_ALL = (0x10000000); - - [NativeTypeName("#define FOREST_USER_RID_MAX (0x000001F3L)")] - public const int FOREST_USER_RID_MAX = (0x000001F3); - - [NativeTypeName("#define ACL_REVISION (2)")] - public const int ACL_REVISION = (2); - - [NativeTypeName("#define ACL_REVISION_DS (4)")] - public const int ACL_REVISION_DS = (4); - - [NativeTypeName("#define ACL_REVISION1 (1)")] - public const int ACL_REVISION1 = (1); - - [NativeTypeName("#define MIN_ACL_REVISION ACL_REVISION2")] - public const int MIN_ACL_REVISION = (2); - - [NativeTypeName("#define ACL_REVISION2 (2)")] - public const int ACL_REVISION2 = (2); - - [NativeTypeName("#define ACL_REVISION3 (3)")] - public const int ACL_REVISION3 = (3); - - [NativeTypeName("#define ACL_REVISION4 (4)")] - public const int ACL_REVISION4 = (4); - - [NativeTypeName("#define OBJECT_INHERIT_ACE (0x1)")] - public const int OBJECT_INHERIT_ACE = (0x1); - - [NativeTypeName("#define NO_PROPAGATE_INHERIT_ACE (0x4)")] - public const int NO_PROPAGATE_INHERIT_ACE = (0x4); - - [NativeTypeName("#define INHERIT_ONLY_ACE (0x8)")] - public const int INHERIT_ONLY_ACE = (0x8); - - [NativeTypeName("#define INHERITED_ACE (0x10)")] - public const int INHERITED_ACE = (0x10); - - [NativeTypeName("#define VALID_INHERIT_FLAGS (0x1F)")] - public const int VALID_INHERIT_FLAGS = (0x1F); - - [NativeTypeName("#define CRITICAL_ACE_FLAG (0x20)")] - public const int CRITICAL_ACE_FLAG = (0x20); - - [NativeTypeName("#define SUCCESSFUL_ACCESS_ACE_FLAG (0x40)")] - public const int SUCCESSFUL_ACCESS_ACE_FLAG = (0x40); - - [NativeTypeName("#define FAILED_ACCESS_ACE_FLAG (0x80)")] - public const int FAILED_ACCESS_ACE_FLAG = (0x80); - - [NativeTypeName("#define ACE_OBJECT_TYPE_PRESENT 0x1")] - public const int ACE_OBJECT_TYPE_PRESENT = 0x1; - - [NativeTypeName("#define ACE_INHERITED_OBJECT_TYPE_PRESENT 0x2")] - public const int ACE_INHERITED_OBJECT_TYPE_PRESENT = 0x2; - - [NativeTypeName("#define AUDIT_ALLOW_NO_PRIVILEGE 0x1")] - public const int AUDIT_ALLOW_NO_PRIVILEGE = 0x1; - - [NativeTypeName("#define PRIVILEGE_SET_ALL_NECESSARY (1)")] - public const int PRIVILEGE_SET_ALL_NECESSARY = (1); - - [NativeTypeName("#define POLICY_AUDIT_SUBCATEGORY_COUNT (59)")] - public const int POLICY_AUDIT_SUBCATEGORY_COUNT = (59); - - [NativeTypeName("#define DISABLE_MAX_PRIVILEGE 0x1")] - public const int DISABLE_MAX_PRIVILEGE = 0x1; - - [NativeTypeName("#define SANDBOX_INERT 0x2")] - public const int SANDBOX_INERT = 0x2; - - [NativeTypeName("#define LUA_TOKEN 0x4")] - public const int LUA_TOKEN = 0x4; - - [NativeTypeName("#define WRITE_RESTRICTED 0x8")] - public const int WRITE_RESTRICTED = 0x8; - - [NativeTypeName("#define OWNER_SECURITY_INFORMATION (0x00000001L)")] - public const int OWNER_SECURITY_INFORMATION = (0x00000001); - - [NativeTypeName("#define GROUP_SECURITY_INFORMATION (0x00000002L)")] - public const int GROUP_SECURITY_INFORMATION = (0x00000002); - - [NativeTypeName("#define DACL_SECURITY_INFORMATION (0x00000004L)")] - public const int DACL_SECURITY_INFORMATION = (0x00000004); - - [NativeTypeName("#define SACL_SECURITY_INFORMATION (0x00000008L)")] - public const int SACL_SECURITY_INFORMATION = (0x00000008); - - [NativeTypeName("#define LABEL_SECURITY_INFORMATION (0x00000010L)")] - public const int LABEL_SECURITY_INFORMATION = (0x00000010); - - [NativeTypeName("#define ATTRIBUTE_SECURITY_INFORMATION (0x00000020L)")] - public const int ATTRIBUTE_SECURITY_INFORMATION = (0x00000020); - - [NativeTypeName("#define SCOPE_SECURITY_INFORMATION (0x00000040L)")] - public const int SCOPE_SECURITY_INFORMATION = (0x00000040); - - [NativeTypeName("#define PROTECTED_DACL_SECURITY_INFORMATION (0x80000000L)")] - public const uint PROTECTED_DACL_SECURITY_INFORMATION = (0x80000000); - - [NativeTypeName("#define PROTECTED_SACL_SECURITY_INFORMATION (0x40000000L)")] - public const int PROTECTED_SACL_SECURITY_INFORMATION = (0x40000000); - - [NativeTypeName("#define UNPROTECTED_DACL_SECURITY_INFORMATION (0x20000000L)")] - public const int UNPROTECTED_DACL_SECURITY_INFORMATION = (0x20000000); - - [NativeTypeName("#define UNPROTECTED_SACL_SECURITY_INFORMATION (0x10000000L)")] - public const int UNPROTECTED_SACL_SECURITY_INFORMATION = (0x10000000); - - [NativeTypeName("#define FLS_MAXIMUM_AVAILABLE 4080")] - public const int FLS_MAXIMUM_AVAILABLE = 4080; - - [NativeTypeName("#define TLS_MINIMUM_AVAILABLE 64")] - public const int TLS_MINIMUM_AVAILABLE = 64; - - [NativeTypeName("#define COMPONENT_KTM 0x01")] - public const int COMPONENT_KTM = 0x01; - - [NativeTypeName("#define COMPONENT_VALID_FLAGS (COMPONENT_KTM)")] - public const int COMPONENT_VALID_FLAGS = (0x01); - - [NativeTypeName("#define DYNAMIC_EH_CONTINUATION_TARGET_ADD (0x00000001)")] - public const int DYNAMIC_EH_CONTINUATION_TARGET_ADD = (0x00000001); - - [NativeTypeName("#define DYNAMIC_EH_CONTINUATION_TARGET_PROCESSED (0x00000002)")] - public const int DYNAMIC_EH_CONTINUATION_TARGET_PROCESSED = (0x00000002); - - [NativeTypeName("#define DYNAMIC_ENFORCED_ADDRESS_RANGE_ADD (0x00000001)")] - public const int DYNAMIC_ENFORCED_ADDRESS_RANGE_ADD = (0x00000001); - - [NativeTypeName("#define DYNAMIC_ENFORCED_ADDRESS_RANGE_PROCESSED (0x00000002)")] - public const int DYNAMIC_ENFORCED_ADDRESS_RANGE_PROCESSED = (0x00000002); - - [NativeTypeName("#define QUOTA_LIMITS_HARDWS_MIN_ENABLE 0x00000001")] - public const int QUOTA_LIMITS_HARDWS_MIN_ENABLE = 0x00000001; - - [NativeTypeName("#define QUOTA_LIMITS_HARDWS_MIN_DISABLE 0x00000002")] - public const int QUOTA_LIMITS_HARDWS_MIN_DISABLE = 0x00000002; - - [NativeTypeName("#define QUOTA_LIMITS_HARDWS_MAX_ENABLE 0x00000004")] - public const int QUOTA_LIMITS_HARDWS_MAX_ENABLE = 0x00000004; - - [NativeTypeName("#define QUOTA_LIMITS_HARDWS_MAX_DISABLE 0x00000008")] - public const int QUOTA_LIMITS_HARDWS_MAX_DISABLE = 0x00000008; - - [NativeTypeName("#define QUOTA_LIMITS_USE_DEFAULT_LIMITS 0x00000010")] - public const int QUOTA_LIMITS_USE_DEFAULT_LIMITS = 0x00000010; - - [NativeTypeName("#define MUTANT_QUERY_STATE 0x0001")] - public const int MUTANT_QUERY_STATE = 0x0001; - - [NativeTypeName("#define MUTANT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|\\\r\n MUTANT_QUERY_STATE)")] - public const int MUTANT_ALL_ACCESS = ((0x000F0000) | (0x00100000) | 0x0001); - - [NativeTypeName("#define SEMAPHORE_MODIFY_STATE 0x0002")] - public const int SEMAPHORE_MODIFY_STATE = 0x0002; - - [NativeTypeName("#define SEMAPHORE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)")] - public const int SEMAPHORE_ALL_ACCESS = ((0x000F0000) | (0x00100000) | 0x3); - - [NativeTypeName("#define TIMER_QUERY_STATE 0x0001")] - public const int TIMER_QUERY_STATE = 0x0001; - - [NativeTypeName("#define TIMER_MODIFY_STATE 0x0002")] - public const int TIMER_MODIFY_STATE = 0x0002; - - [NativeTypeName("#define TIMER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|\\\r\n TIMER_QUERY_STATE|TIMER_MODIFY_STATE)")] - public const int TIMER_ALL_ACCESS = ((0x000F0000) | (0x00100000) | 0x0001 | 0x0002); - - [NativeTypeName("#define LTP_PC_SMT 0x1")] - public const int LTP_PC_SMT = 0x1; - - [NativeTypeName("#define CACHE_FULLY_ASSOCIATIVE 0xFF")] - public const int CACHE_FULLY_ASSOCIATIVE = 0xFF; - - [NativeTypeName("#define CFG_CALL_TARGET_VALID (0x00000001)")] - public const int CFG_CALL_TARGET_VALID = (0x00000001); - - [NativeTypeName("#define CFG_CALL_TARGET_PROCESSED (0x00000002)")] - public const int CFG_CALL_TARGET_PROCESSED = (0x00000002); - - [NativeTypeName("#define CFG_CALL_TARGET_CONVERT_EXPORT_SUPPRESSED_TO_VALID (0x00000004)")] - public const int CFG_CALL_TARGET_CONVERT_EXPORT_SUPPRESSED_TO_VALID = (0x00000004); - - [NativeTypeName("#define CFG_CALL_TARGET_VALID_XFG (0x00000008)")] - public const int CFG_CALL_TARGET_VALID_XFG = (0x00000008); - - [NativeTypeName("#define CFG_CALL_TARGET_CONVERT_XFG_TO_CFG (0x00000010)")] - public const int CFG_CALL_TARGET_CONVERT_XFG_TO_CFG = (0x00000010); - - [NativeTypeName("#define SECTION_QUERY 0x0001")] - public const int SECTION_QUERY = 0x0001; - - [NativeTypeName("#define SECTION_MAP_WRITE 0x0002")] - public const int SECTION_MAP_WRITE = 0x0002; - - [NativeTypeName("#define SECTION_MAP_READ 0x0004")] - public const int SECTION_MAP_READ = 0x0004; - - [NativeTypeName("#define SECTION_MAP_EXECUTE 0x0008")] - public const int SECTION_MAP_EXECUTE = 0x0008; - - [NativeTypeName("#define SECTION_EXTEND_SIZE 0x0010")] - public const int SECTION_EXTEND_SIZE = 0x0010; - - [NativeTypeName("#define SECTION_MAP_EXECUTE_EXPLICIT 0x0020")] - public const int SECTION_MAP_EXECUTE_EXPLICIT = 0x0020; - - [NativeTypeName("#define SECTION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SECTION_QUERY|\\\r\n SECTION_MAP_WRITE | \\\r\n SECTION_MAP_READ | \\\r\n SECTION_MAP_EXECUTE | \\\r\n SECTION_EXTEND_SIZE)")] - public const int SECTION_ALL_ACCESS = ((0x000F0000) | 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010); - - [NativeTypeName("#define SESSION_QUERY_ACCESS 0x0001")] - public const int SESSION_QUERY_ACCESS = 0x0001; - - [NativeTypeName("#define SESSION_MODIFY_ACCESS 0x0002")] - public const int SESSION_MODIFY_ACCESS = 0x0002; - - [NativeTypeName("#define SESSION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \\\r\n SESSION_QUERY_ACCESS | \\\r\n SESSION_MODIFY_ACCESS)")] - public const int SESSION_ALL_ACCESS = ((0x000F0000) | 0x0001 | 0x0002); - - [NativeTypeName("#define WRITE_WATCH_FLAG_RESET 0x01")] - public const int WRITE_WATCH_FLAG_RESET = 0x01; - - [NativeTypeName("#define ENCLAVE_TYPE_SGX 0x00000001")] - public const int ENCLAVE_TYPE_SGX = 0x00000001; - - [NativeTypeName("#define ENCLAVE_TYPE_SGX2 0x00000002")] - public const int ENCLAVE_TYPE_SGX2 = 0x00000002; - - [NativeTypeName("#define ENCLAVE_TYPE_VBS 0x00000010")] - public const int ENCLAVE_TYPE_VBS = 0x00000010; - - [NativeTypeName("#define ENCLAVE_VBS_FLAG_DEBUG 0x00000001")] - public const int ENCLAVE_VBS_FLAG_DEBUG = 0x00000001; - - [NativeTypeName("#define ENCLAVE_TYPE_VBS_BASIC 0x00000011")] - public const int ENCLAVE_TYPE_VBS_BASIC = 0x00000011; - - [NativeTypeName("#define VBS_BASIC_PAGE_MEASURED_DATA 0x00000001")] - public const int VBS_BASIC_PAGE_MEASURED_DATA = 0x00000001; - - [NativeTypeName("#define VBS_BASIC_PAGE_UNMEASURED_DATA 0x00000002")] - public const int VBS_BASIC_PAGE_UNMEASURED_DATA = 0x00000002; - - [NativeTypeName("#define VBS_BASIC_PAGE_ZERO_FILL 0x00000003")] - public const int VBS_BASIC_PAGE_ZERO_FILL = 0x00000003; - - [NativeTypeName("#define VBS_BASIC_PAGE_THREAD_DESCRIPTOR 0x00000004")] - public const int VBS_BASIC_PAGE_THREAD_DESCRIPTOR = 0x00000004; - - [NativeTypeName("#define VBS_BASIC_PAGE_SYSTEM_CALL 0x00000005")] - public const int VBS_BASIC_PAGE_SYSTEM_CALL = 0x00000005; - - [NativeTypeName("#define DEDICATED_MEMORY_CACHE_ELIGIBLE 0x1")] - public const int DEDICATED_MEMORY_CACHE_ELIGIBLE = 0x1; - - [NativeTypeName("#define TREE_CONNECT_ATTRIBUTE_PRIVACY 0x00004000")] - public const int TREE_CONNECT_ATTRIBUTE_PRIVACY = 0x00004000; - - [NativeTypeName("#define TREE_CONNECT_ATTRIBUTE_INTEGRITY 0x00008000")] - public const int TREE_CONNECT_ATTRIBUTE_INTEGRITY = 0x00008000; - - [NativeTypeName("#define TREE_CONNECT_ATTRIBUTE_GLOBAL 0x00000004")] - public const int TREE_CONNECT_ATTRIBUTE_GLOBAL = 0x00000004; - - [NativeTypeName("#define TREE_CONNECT_ATTRIBUTE_PINNED 0x00000002")] - public const int TREE_CONNECT_ATTRIBUTE_PINNED = 0x00000002; - - [NativeTypeName("#define MAILSLOT_NO_MESSAGE ((DWORD)-1)")] - public const uint MAILSLOT_NO_MESSAGE = unchecked((uint)(-1)); - - [NativeTypeName("#define MAILSLOT_WAIT_FOREVER ((DWORD)-1)")] - public const uint MAILSLOT_WAIT_FOREVER = unchecked((uint)(-1)); - - [NativeTypeName("#define FLUSH_FLAGS_FILE_DATA_ONLY 0x00000001")] - public const int FLUSH_FLAGS_FILE_DATA_ONLY = 0x00000001; - - [NativeTypeName("#define FLUSH_FLAGS_NO_SYNC 0x00000002")] - public const int FLUSH_FLAGS_NO_SYNC = 0x00000002; - - [NativeTypeName("#define FLUSH_FLAGS_FILE_DATA_SYNC_ONLY 0x00000004")] - public const int FLUSH_FLAGS_FILE_DATA_SYNC_ONLY = 0x00000004; - - [NativeTypeName("#define SHUFFLE_FILE_FLAG_SKIP_INITIALIZING_NEW_CLUSTERS (0x00000001)")] - public const int SHUFFLE_FILE_FLAG_SKIP_INITIALIZING_NEW_CLUSTERS = (0x00000001); - - [NativeTypeName("#define SMB_CCF_APP_INSTANCE_EA_NAME \"ClusteredApplicationInstance\"")] - public static ReadOnlySpan SMB_CCF_APP_INSTANCE_EA_NAME => new byte[] { 0x43, 0x6C, 0x75, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x41, 0x70, 0x70, 0x6C, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x49, 0x6E, 0x73, 0x74, 0x61, 0x6E, 0x63, 0x65, 0x00 }; - - [NativeTypeName("#define NETWORK_APP_INSTANCE_CSV_FLAGS_VALID_ONLY_IF_CSV_COORDINATOR 0x00000001")] - public const int NETWORK_APP_INSTANCE_CSV_FLAGS_VALID_ONLY_IF_CSV_COORDINATOR = 0x00000001; - - [NativeTypeName("#define DUPLICATE_CLOSE_SOURCE 0x00000001")] - public const int DUPLICATE_CLOSE_SOURCE = 0x00000001; - - [NativeTypeName("#define DUPLICATE_SAME_ACCESS 0x00000002")] - public const int DUPLICATE_SAME_ACCESS = 0x00000002; - - [NativeTypeName("#define PERFSTATE_POLICY_CHANGE_IDEAL 0")] - public const int PERFSTATE_POLICY_CHANGE_IDEAL = 0; - - [NativeTypeName("#define PERFSTATE_POLICY_CHANGE_SINGLE 1")] - public const int PERFSTATE_POLICY_CHANGE_SINGLE = 1; - - [NativeTypeName("#define PERFSTATE_POLICY_CHANGE_ROCKET 2")] - public const int PERFSTATE_POLICY_CHANGE_ROCKET = 2; - - [NativeTypeName("#define PERFSTATE_POLICY_CHANGE_IDEAL_AGGRESSIVE 3")] - public const int PERFSTATE_POLICY_CHANGE_IDEAL_AGGRESSIVE = 3; - - [NativeTypeName("#define PERFSTATE_POLICY_CHANGE_DECREASE_MAX PERFSTATE_POLICY_CHANGE_ROCKET")] - public const int PERFSTATE_POLICY_CHANGE_DECREASE_MAX = 2; - - [NativeTypeName("#define PERFSTATE_POLICY_CHANGE_INCREASE_MAX PERFSTATE_POLICY_CHANGE_IDEAL_AGGRESSIVE")] - public const int PERFSTATE_POLICY_CHANGE_INCREASE_MAX = 3; - - [NativeTypeName("#define CORE_PARKING_POLICY_CHANGE_IDEAL 0")] - public const int CORE_PARKING_POLICY_CHANGE_IDEAL = 0; - - [NativeTypeName("#define CORE_PARKING_POLICY_CHANGE_SINGLE 1")] - public const int CORE_PARKING_POLICY_CHANGE_SINGLE = 1; - - [NativeTypeName("#define CORE_PARKING_POLICY_CHANGE_ROCKET 2")] - public const int CORE_PARKING_POLICY_CHANGE_ROCKET = 2; - - [NativeTypeName("#define CORE_PARKING_POLICY_CHANGE_MULTISTEP 3")] - public const int CORE_PARKING_POLICY_CHANGE_MULTISTEP = 3; - - [NativeTypeName("#define CORE_PARKING_POLICY_CHANGE_MAX CORE_PARKING_POLICY_CHANGE_MULTISTEP")] - public const int CORE_PARKING_POLICY_CHANGE_MAX = 3; - - [NativeTypeName("#define DIAGNOSTIC_REASON_VERSION 0")] - public const int DIAGNOSTIC_REASON_VERSION = 0; - - [NativeTypeName("#define DIAGNOSTIC_REASON_SIMPLE_STRING 0x00000001")] - public const int DIAGNOSTIC_REASON_SIMPLE_STRING = 0x00000001; - - [NativeTypeName("#define DIAGNOSTIC_REASON_DETAILED_STRING 0x00000002")] - public const int DIAGNOSTIC_REASON_DETAILED_STRING = 0x00000002; - - [NativeTypeName("#define DIAGNOSTIC_REASON_NOT_SPECIFIED 0x80000000")] - public const uint DIAGNOSTIC_REASON_NOT_SPECIFIED = 0x80000000; - - [NativeTypeName("#define DIAGNOSTIC_REASON_INVALID_FLAGS (~0x80000007)")] - public const uint DIAGNOSTIC_REASON_INVALID_FLAGS = (~0x80000007); - - [NativeTypeName("#define PDCAP_D0_SUPPORTED 0x00000001")] - public const int PDCAP_D0_SUPPORTED = 0x00000001; - - [NativeTypeName("#define PDCAP_D1_SUPPORTED 0x00000002")] - public const int PDCAP_D1_SUPPORTED = 0x00000002; - - [NativeTypeName("#define PDCAP_D2_SUPPORTED 0x00000004")] - public const int PDCAP_D2_SUPPORTED = 0x00000004; - - [NativeTypeName("#define PDCAP_D3_SUPPORTED 0x00000008")] - public const int PDCAP_D3_SUPPORTED = 0x00000008; - - [NativeTypeName("#define PDCAP_WAKE_FROM_D0_SUPPORTED 0x00000010")] - public const int PDCAP_WAKE_FROM_D0_SUPPORTED = 0x00000010; - - [NativeTypeName("#define PDCAP_WAKE_FROM_D1_SUPPORTED 0x00000020")] - public const int PDCAP_WAKE_FROM_D1_SUPPORTED = 0x00000020; - - [NativeTypeName("#define PDCAP_WAKE_FROM_D2_SUPPORTED 0x00000040")] - public const int PDCAP_WAKE_FROM_D2_SUPPORTED = 0x00000040; - - [NativeTypeName("#define PDCAP_WAKE_FROM_D3_SUPPORTED 0x00000080")] - public const int PDCAP_WAKE_FROM_D3_SUPPORTED = 0x00000080; - - [NativeTypeName("#define PDCAP_WARM_EJECT_SUPPORTED 0x00000100")] - public const int PDCAP_WARM_EJECT_SUPPORTED = 0x00000100; - - [NativeTypeName("#define ACPI_PPM_SOFTWARE_ALL 0xFC")] - public const int ACPI_PPM_SOFTWARE_ALL = 0xFC; - - [NativeTypeName("#define ACPI_PPM_SOFTWARE_ANY 0xFD")] - public const int ACPI_PPM_SOFTWARE_ANY = 0xFD; - - [NativeTypeName("#define ACPI_PPM_HARDWARE_ALL 0xFE")] - public const int ACPI_PPM_HARDWARE_ALL = 0xFE; - - [NativeTypeName("#define NUM_DISCHARGE_POLICIES 4")] - public const int NUM_DISCHARGE_POLICIES = 4; - - [NativeTypeName("#define DISCHARGE_POLICY_CRITICAL 0")] - public const int DISCHARGE_POLICY_CRITICAL = 0; - - [NativeTypeName("#define DISCHARGE_POLICY_LOW 1")] - public const int DISCHARGE_POLICY_LOW = 1; - - [NativeTypeName("#define PO_THROTTLE_NONE 0")] - public const int PO_THROTTLE_NONE = 0; - - [NativeTypeName("#define PO_THROTTLE_CONSTANT 1")] - public const int PO_THROTTLE_CONSTANT = 1; - - [NativeTypeName("#define PO_THROTTLE_DEGRADE 2")] - public const int PO_THROTTLE_DEGRADE = 2; - - [NativeTypeName("#define PO_THROTTLE_ADAPTIVE 3")] - public const int PO_THROTTLE_ADAPTIVE = 3; - - [NativeTypeName("#define PO_THROTTLE_MAXIMUM 4")] - public const int PO_THROTTLE_MAXIMUM = 4; - - [NativeTypeName("#define HIBERFILE_TYPE_NONE 0x00")] - public const int HIBERFILE_TYPE_NONE = 0x00; - - [NativeTypeName("#define HIBERFILE_TYPE_REDUCED 0x01")] - public const int HIBERFILE_TYPE_REDUCED = 0x01; - - [NativeTypeName("#define HIBERFILE_TYPE_FULL 0x02")] - public const int HIBERFILE_TYPE_FULL = 0x02; - - [NativeTypeName("#define HIBERFILE_TYPE_MAX 0x03")] - public const int HIBERFILE_TYPE_MAX = 0x03; - - [NativeTypeName("#define N_BTMASK 0x000F")] - public const int N_BTMASK = 0x000F; - - [NativeTypeName("#define N_TMASK 0x0030")] - public const int N_TMASK = 0x0030; - - [NativeTypeName("#define N_TMASK1 0x00C0")] - public const int N_TMASK1 = 0x00C0; - - [NativeTypeName("#define N_TMASK2 0x00F0")] - public const int N_TMASK2 = 0x00F0; - - [NativeTypeName("#define N_BTSHFT 4")] - public const int N_BTSHFT = 4; - - [NativeTypeName("#define N_TSHIFT 2")] - public const int N_TSHIFT = 2; - - [NativeTypeName("#define FRAME_FPO 0")] - public const int FRAME_FPO = 0; - - [NativeTypeName("#define FRAME_TRAP 1")] - public const int FRAME_TRAP = 1; - - [NativeTypeName("#define FRAME_TSS 2")] - public const int FRAME_TSS = 2; - - [NativeTypeName("#define FRAME_NONFPO 3")] - public const int FRAME_NONFPO = 3; - - [NativeTypeName("#define SIZEOF_RFPO_DATA 16")] - public const int SIZEOF_RFPO_DATA = 16; - - [NativeTypeName("#define NON_PAGED_DEBUG_SIGNATURE 0x494E")] - public const int NON_PAGED_DEBUG_SIGNATURE = 0x494E; - - [NativeTypeName("#define IMPORT_OBJECT_HDR_SIG2 0xffff")] - public const int IMPORT_OBJECT_HDR_SIG2 = 0xffff; - - [NativeTypeName("#define UNWIND_HISTORY_TABLE_SIZE 12")] - public const int UNWIND_HISTORY_TABLE_SIZE = 12; - - [NativeTypeName("#define COMPRESSION_FORMAT_NONE (0x0000)")] - public const int COMPRESSION_FORMAT_NONE = (0x0000); - - [NativeTypeName("#define COMPRESSION_FORMAT_DEFAULT (0x0001)")] - public const int COMPRESSION_FORMAT_DEFAULT = (0x0001); - - [NativeTypeName("#define COMPRESSION_FORMAT_LZNT1 (0x0002)")] - public const int COMPRESSION_FORMAT_LZNT1 = (0x0002); - - [NativeTypeName("#define COMPRESSION_FORMAT_XPRESS (0x0003)")] - public const int COMPRESSION_FORMAT_XPRESS = (0x0003); - - [NativeTypeName("#define COMPRESSION_FORMAT_XPRESS_HUFF (0x0004)")] - public const int COMPRESSION_FORMAT_XPRESS_HUFF = (0x0004); - - [NativeTypeName("#define COMPRESSION_FORMAT_XP10 (0x0005)")] - public const int COMPRESSION_FORMAT_XP10 = (0x0005); - - [NativeTypeName("#define COMPRESSION_ENGINE_STANDARD (0x0000)")] - public const int COMPRESSION_ENGINE_STANDARD = (0x0000); - - [NativeTypeName("#define COMPRESSION_ENGINE_MAXIMUM (0x0100)")] - public const int COMPRESSION_ENGINE_MAXIMUM = (0x0100); - - [NativeTypeName("#define COMPRESSION_ENGINE_HIBER (0x0200)")] - public const int COMPRESSION_ENGINE_HIBER = (0x0200); - - [NativeTypeName("#define MESSAGE_RESOURCE_UNICODE 0x0001")] - public const int MESSAGE_RESOURCE_UNICODE = 0x0001; - - [NativeTypeName("#define MESSAGE_RESOURCE_UTF8 0x0002")] - public const int MESSAGE_RESOURCE_UTF8 = 0x0002; - - [NativeTypeName("#define VRL_PREDEFINED_CLASS_BEGIN (1 << 0)")] - public const int VRL_PREDEFINED_CLASS_BEGIN = (1 << 0); - - [NativeTypeName("#define VRL_CUSTOM_CLASS_BEGIN (1 << 8)")] - public const int VRL_CUSTOM_CLASS_BEGIN = (1 << 8); - - [NativeTypeName("#define VRL_CLASS_CONSISTENCY (VRL_PREDEFINED_CLASS_BEGIN << 0)")] - public const int VRL_CLASS_CONSISTENCY = ((1 << 0) << 0); - - [NativeTypeName("#define VRL_ENABLE_KERNEL_BREAKS (1 << 31)")] - public const int VRL_ENABLE_KERNEL_BREAKS = (1 << 31); - - [NativeTypeName("#define CTMF_INCLUDE_APPCONTAINER 0x00000001UL")] - public const uint CTMF_INCLUDE_APPCONTAINER = 0x00000001U; - - [NativeTypeName("#define CTMF_INCLUDE_LPAC 0x00000002UL")] - public const uint CTMF_INCLUDE_LPAC = 0x00000002U; - - [NativeTypeName("#define CTMF_VALID_FLAGS (CTMF_INCLUDE_APPCONTAINER | CTMF_INCLUDE_LPAC)")] - public const uint CTMF_VALID_FLAGS = (0x00000001U | 0x00000002U); - - [NativeTypeName("#define FLUSH_NV_MEMORY_IN_FLAG_NO_DRAIN (0x00000001)")] - public const int FLUSH_NV_MEMORY_IN_FLAG_NO_DRAIN = (0x00000001); - - [NativeTypeName("#define FLUSH_NV_MEMORY_DEFAULT_TOKEN (ULONG_PTR)(-1)")] - public static nuint FLUSH_NV_MEMORY_DEFAULT_TOKEN => unchecked((nuint)(-1)); - - [NativeTypeName("#define WRITE_NV_MEMORY_FLAG_FLUSH (0x00000001)")] - public const int WRITE_NV_MEMORY_FLAG_FLUSH = (0x00000001); - - [NativeTypeName("#define WRITE_NV_MEMORY_FLAG_NON_TEMPORAL (0x00000002)")] - public const int WRITE_NV_MEMORY_FLAG_NON_TEMPORAL = (0x00000002); - - [NativeTypeName("#define WRITE_NV_MEMORY_FLAG_PERSIST (WRITE_NV_MEMORY_FLAG_FLUSH \\\r\n | WRITE_NV_MEMORY_FLAG_NON_TEMPORAL)")] - public const int WRITE_NV_MEMORY_FLAG_PERSIST = ((0x00000001) | (0x00000002)); - - [NativeTypeName("#define WRITE_NV_MEMORY_FLAG_NO_DRAIN (0x00000100)")] - public const int WRITE_NV_MEMORY_FLAG_NO_DRAIN = (0x00000100); - - [NativeTypeName("#define FILL_NV_MEMORY_FLAG_FLUSH (0x00000001)")] - public const int FILL_NV_MEMORY_FLAG_FLUSH = (0x00000001); - - [NativeTypeName("#define FILL_NV_MEMORY_FLAG_NON_TEMPORAL (0x00000002)")] - public const int FILL_NV_MEMORY_FLAG_NON_TEMPORAL = (0x00000002); - - [NativeTypeName("#define FILL_NV_MEMORY_FLAG_PERSIST (FILL_NV_MEMORY_FLAG_FLUSH \\\r\n | FILL_NV_MEMORY_FLAG_NON_TEMPORAL)")] - public const int FILL_NV_MEMORY_FLAG_PERSIST = ((0x00000001) | (0x00000002)); - - [NativeTypeName("#define FILL_NV_MEMORY_FLAG_NO_DRAIN (0x00000100)")] - public const int FILL_NV_MEMORY_FLAG_NO_DRAIN = (0x00000100); - - [NativeTypeName("#define PERFORMANCE_DATA_VERSION 1")] - public const int PERFORMANCE_DATA_VERSION = 1; - - [NativeTypeName("#define UNIFIEDBUILDREVISION_KEY L\"\\\\Registry\\\\Machine\\\\Software\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\"")] - public const string UNIFIEDBUILDREVISION_KEY = "\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion"; - - [NativeTypeName("#define UNIFIEDBUILDREVISION_VALUE L\"UBR\"")] - public const string UNIFIEDBUILDREVISION_VALUE = "UBR"; - - [NativeTypeName("#define UNIFIEDBUILDREVISION_MIN 0x00000000")] - public const int UNIFIEDBUILDREVISION_MIN = 0x00000000; - - [NativeTypeName("#define DLL_PROCESS_ATTACH 1")] - public const int DLL_PROCESS_ATTACH = 1; - - [NativeTypeName("#define DLL_THREAD_ATTACH 2")] - public const int DLL_THREAD_ATTACH = 2; - - [NativeTypeName("#define DLL_THREAD_DETACH 3")] - public const int DLL_THREAD_DETACH = 3; - - [NativeTypeName("#define DLL_PROCESS_DETACH 0")] - public const int DLL_PROCESS_DETACH = 0; - - [NativeTypeName("#define MAXLOGICALLOGNAMESIZE 256")] - public const int MAXLOGICALLOGNAMESIZE = 256; } } diff --git a/tests/ComputeSharp.Tests.NativeLibrariesResolver/NativeLibrariesResolverTests.cs b/tests/ComputeSharp.Tests.NativeLibrariesResolver/NativeLibrariesResolverTests.cs index cd9741a3..64b123f5 100644 --- a/tests/ComputeSharp.Tests.NativeLibrariesResolver/NativeLibrariesResolverTests.cs +++ b/tests/ComputeSharp.Tests.NativeLibrariesResolver/NativeLibrariesResolverTests.cs @@ -13,7 +13,7 @@ public class NativeLibrariesResolverTests /// /// Performs static initialization for the assembly before any unit tests are run. /// - /// The for the test runner instance in use. + /// The for the test runner instance in use. [AssemblyInitialize] public static void Initialize(TestContext _) { diff --git a/tests/ComputeSharp.Tests.SourceGenerators/ComputeSharp.Tests.SourceGenerators.csproj b/tests/ComputeSharp.Tests.SourceGenerators/ComputeSharp.Tests.SourceGenerators.csproj index 382ed22a..f246d2c8 100644 --- a/tests/ComputeSharp.Tests.SourceGenerators/ComputeSharp.Tests.SourceGenerators.csproj +++ b/tests/ComputeSharp.Tests.SourceGenerators/ComputeSharp.Tests.SourceGenerators.csproj @@ -9,7 +9,7 @@ - + diff --git a/tests/ComputeSharp.Tests.SourceGenerators/DiagnosticsTests.cs b/tests/ComputeSharp.Tests.SourceGenerators/DiagnosticsTests.cs index e3a11320..f956aeea 100644 --- a/tests/ComputeSharp.Tests.SourceGenerators/DiagnosticsTests.cs +++ b/tests/ComputeSharp.Tests.SourceGenerators/DiagnosticsTests.cs @@ -1404,8 +1404,7 @@ public class DiagnosticsTests /// /// The generator type to use. /// The input source to process. - /// The target index to check in the resulting output. - /// The expected body to compare with the generated code. + /// The expected diagnostics ids to be generated. private static void VerifyGeneratedDiagnostics(string source, params string[] diagnosticsIds) where TGenerator : class, ISourceGenerator, new() { diff --git a/tests/ComputeSharp.Tests/Attributes/AdditionalDataAttribute.cs b/tests/ComputeSharp.Tests/Attributes/AdditionalDataAttribute.cs index 6922c6ee..d4c0b0bc 100644 --- a/tests/ComputeSharp.Tests/Attributes/AdditionalDataAttribute.cs +++ b/tests/ComputeSharp.Tests/Attributes/AdditionalDataAttribute.cs @@ -3,7 +3,7 @@ namespace ComputeSharp.Tests.Attributes; /// -/// An attribute to use with adding additional arbitrary input data. +/// An attribute to use with adding additional arbitrary input data. /// [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] public sealed class AdditionalDataAttribute : Attribute diff --git a/tests/ComputeSharp.Tests/Attributes/AdditionalResourceAttribute.cs b/tests/ComputeSharp.Tests/Attributes/AdditionalResourceAttribute.cs index bc2cedab..f5c8fda9 100644 --- a/tests/ComputeSharp.Tests/Attributes/AdditionalResourceAttribute.cs +++ b/tests/ComputeSharp.Tests/Attributes/AdditionalResourceAttribute.cs @@ -3,7 +3,7 @@ namespace ComputeSharp.Tests.Attributes; /// -/// An attribute to use with targeting an additional specific resource type. +/// An attribute to use with targeting an additional specific resource type. /// [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] public sealed class AdditionalResourceAttribute : Attribute diff --git a/tests/ComputeSharp.Tests/Attributes/AllDevicesAttribute.cs b/tests/ComputeSharp.Tests/Attributes/AllDevicesAttribute.cs index 9976dc66..1c83a15d 100644 --- a/tests/ComputeSharp.Tests/Attributes/AllDevicesAttribute.cs +++ b/tests/ComputeSharp.Tests/Attributes/AllDevicesAttribute.cs @@ -3,7 +3,7 @@ namespace ComputeSharp.Tests.Attributes; /// -/// An attribute to use with targeting all supported devices. +/// An attribute to use with targeting all supported devices. /// [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] public sealed class AllDevicesAttribute : Attribute diff --git a/tests/ComputeSharp.Tests/Attributes/DataAttribute.cs b/tests/ComputeSharp.Tests/Attributes/DataAttribute.cs index c4f63acf..b1633f24 100644 --- a/tests/ComputeSharp.Tests/Attributes/DataAttribute.cs +++ b/tests/ComputeSharp.Tests/Attributes/DataAttribute.cs @@ -3,7 +3,7 @@ namespace ComputeSharp.Tests.Attributes; /// -/// An attribute to use with adding arbitrary input data. +/// An attribute to use with adding arbitrary input data. /// [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] public sealed class DataAttribute : Attribute diff --git a/tests/ComputeSharp.Tests/Attributes/DeviceAttribute.cs b/tests/ComputeSharp.Tests/Attributes/DeviceAttribute.cs index 7c249b42..4bf2e34e 100644 --- a/tests/ComputeSharp.Tests/Attributes/DeviceAttribute.cs +++ b/tests/ComputeSharp.Tests/Attributes/DeviceAttribute.cs @@ -4,7 +4,7 @@ using ComputeSharp.Tests.Extensions; namespace ComputeSharp.Tests.Attributes; /// -/// An attribute to use with adding a specific input. +/// An attribute to use with adding a specific input. /// [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] public sealed class DeviceAttribute : Attribute diff --git a/tests/ComputeSharp.Tests/Attributes/ResourceAttribute.cs b/tests/ComputeSharp.Tests/Attributes/ResourceAttribute.cs index 72f9d75a..08e6477f 100644 --- a/tests/ComputeSharp.Tests/Attributes/ResourceAttribute.cs +++ b/tests/ComputeSharp.Tests/Attributes/ResourceAttribute.cs @@ -3,7 +3,7 @@ namespace ComputeSharp.Tests.Attributes; /// -/// An attribute to use with targeting a specific resource type. +/// An attribute to use with targeting a specific resource type. /// [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] public sealed class ResourceAttribute : Attribute diff --git a/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj b/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj index df48a716..d4c166a1 100644 --- a/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj +++ b/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj @@ -8,7 +8,7 @@ - + @@ -29,6 +29,8 @@ + + $(NoWarn);CS0649 @@ -40,18 +42,6 @@ - - - - - - - - - - - - diff --git a/tests/ComputeSharp.Tests/Extensions/GraphicsDeviceExtensions.cs b/tests/ComputeSharp.Tests/Extensions/GraphicsDeviceExtensions.cs index 0491aa04..003cbbb3 100644 --- a/tests/ComputeSharp.Tests/Extensions/GraphicsDeviceExtensions.cs +++ b/tests/ComputeSharp.Tests/Extensions/GraphicsDeviceExtensions.cs @@ -266,6 +266,7 @@ public static class GraphicsDeviceExtensions /// The type of items in the texture. /// The target instance to allocate the texture for. /// The type of texture to allocate. + /// The input 3D array to use as source data for the texture. /// A instance of the requested size. [Pure] public static Texture3D AllocateTexture3D(this GraphicsDevice device, Type type, T[,,] data) @@ -309,7 +310,7 @@ public static class GraphicsDeviceExtensions /// The type of texture to allocate. /// The type of filepath to use. /// The filename of the image file to load and decode into the texture. - /// A instance with the contents of the specified file. + /// A instance with the contents of the specified file. [Pure] public static Texture2D LoadTexture2D(this GraphicsDevice device, Type textureType, Type inputType, string filename) where T : unmanaged, IUnorm @@ -341,7 +342,7 @@ public static class GraphicsDeviceExtensions /// The instance to use to allocate the texture. /// The type of texture to allocate. /// The buffer with the image data to load and decode into the texture. - /// A instance with the contents of the specified file. + /// A instance with the contents of the specified file. [Pure] public static Texture2D LoadTexture2D(this GraphicsDevice device, Type type, byte[] buffer) where T : unmanaged, IUnorm diff --git a/tests/ComputeSharp.Tests/Extensions/ImagingExtensions.cs b/tests/ComputeSharp.Tests/Extensions/ImagingExtensions.cs index 2b79f68a..c68a82fc 100644 --- a/tests/ComputeSharp.Tests/Extensions/ImagingExtensions.cs +++ b/tests/ComputeSharp.Tests/Extensions/ImagingExtensions.cs @@ -18,7 +18,7 @@ public static class ImagingExtensions /// Creates a new instance with the specified texture data. /// /// The input pixel format used in the texture. - /// The target pixel format for the returned image. + /// The target pixel format for the returned image. /// The source instance to read data from. /// An image with the data from the input texture. [Pure] diff --git a/tests/ComputeSharp.Tests/Shaders/Compute/HelloWorld.cs b/tests/ComputeSharp.Tests/Shaders/Compute/HelloWorld.cs index aab1ab01..09e3e831 100644 --- a/tests/ComputeSharp.Tests/Shaders/Compute/HelloWorld.cs +++ b/tests/ComputeSharp.Tests/Shaders/Compute/HelloWorld.cs @@ -1,28 +1,27 @@ -namespace ComputeSharp.SwapChain.Shaders.Compute +namespace ComputeSharp.SwapChain.Shaders.Compute; + +/// +/// A simple shader to get started with based on shadertoy new shader template. +/// Ported from . +/// +[AutoConstructor] +internal readonly partial struct HelloWorld : IPixelShader { /// - /// A simple shader to get started with based on shadertoy new shader template. - /// Ported from . + /// The current time since the start of the application. /// - [AutoConstructor] - internal readonly partial struct HelloWorld : IPixelShader + public readonly float time; + + /// + public float4 Execute() { - /// - /// The current time since the start of the application. - /// - public readonly float time; + // Normalized screen space UV coordinates from 0.0 to 1.0 + float2 uv = ThreadIds.Normalized.XY; - /// - public float4 Execute() - { - // Normalized screen space UV coordinates from 0.0 to 1.0 - float2 uv = ThreadIds.Normalized.XY; + // Time varying pixel color + float3 col = 0.5f + 0.5f * Hlsl.Cos(time + new float3(uv, uv.X) + new float3(0, 2, 4)); - // Time varying pixel color - float3 col = 0.5f + 0.5f * Hlsl.Cos(time + new float3(uv, uv.X) + new float3(0, 2, 4)); - - // Output to screen - return new(col, 1f); - } + // Output to screen + return new(col, 1f); } } diff --git a/tests/ComputeSharp.Tests/ShadersTests.cs b/tests/ComputeSharp.Tests/ShadersTests.cs index 573ab028..3099466f 100644 --- a/tests/ComputeSharp.Tests/ShadersTests.cs +++ b/tests/ComputeSharp.Tests/ShadersTests.cs @@ -136,7 +136,6 @@ public class ShadersTests /// /// Executes a given test for a specified shader. /// - /// The type of shader to test. /// The device to use. /// The type of shader being executed. /// The comparison delta. @@ -194,7 +193,8 @@ public class ShadersTests /// /// Executes a given test for a specified shader. /// - /// The type of shader to test. + /// The type of compute shader to test. + /// The type of pixel shader to test. /// The device to use. /// The type of shader being executed. /// The factory of compute shaders. diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props new file mode 100644 index 00000000..e190c8b2 --- /dev/null +++ b/tests/Directory.Build.props @@ -0,0 +1,7 @@ + + + + + $(NoWarn);CS1591 + + \ No newline at end of file