Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UWP/WinUI3 Renderer] Consolidate Xaml IDLs #8334

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Midl Include="idl\AdaptiveCards.ObjectModel.Uwp.idl">
<HeaderFileName>%(Filename).h</HeaderFileName>
<Midl Include="..\SharedObjectModel\idl\AdaptiveCards.ObjectModel.Shared.idl">
<HeaderFileName>AdaptiveCards.ObjectModel.Uwp.h</HeaderFileName>
<!-- Enable Windows Runtime ABI header files. when /reference is passed to midl.exe, the ABI head includes headers
like Windows.AI.MachineLearning.MachineLearningContract.h which doesn't exist actually in SDK. To workaround
the problem, DisableReferences is enabled to disable /reference. -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Midl Include="idl\AdaptiveCards.ObjectModel.Uwp.idl" />
<Midl Include="..\SharedObjectModel\idl\AdaptiveCards.ObjectModel.Shared.idl" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
Expand Down
14 changes: 3 additions & 11 deletions source/uwp/Renderer/AdaptiveCardRenderer.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -167,21 +167,13 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Midl Include="idl\AdaptiveCards.Rendering.Uwp.idl">
<HeaderFileName>%(Filename).h</HeaderFileName>
<Midl Include="..\SharedRenderer\idl\AdaptiveCards.Rendering.Shared.idl">
<HeaderFileName>AdaptiveCards.Rendering.Uwp.h</HeaderFileName>
<!-- Enable Windows Runtime ABI header files. when /reference is passed to midl.exe, the ABI head includes headers
like Windows.AI.MachineLearning.MachineLearningContract.h which doesn't exist actually in SDK. To workaround
the problem, DisableReferences is enabled to disable /reference. -->
<DisableReferences>true</DisableReferences>
<AdditionalIncludeDirectories>$(WindowsSDK_IncludePath)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(WindowsSDK_IncludePath);..\AdaptiveCardsObjectModel\idl;..\AdaptiveCardsObjectModel</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(WindowsSDK_IncludePath);..\AdaptiveCardsObjectModel\idl</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(WindowsSDK_IncludePath);..\AdaptiveCardsObjectModel\idl</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(WindowsSDK_IncludePath);..\AdaptiveCardsObjectModel\idl</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(WindowsSDK_IncludePath);..\AdaptiveCardsObjectModel\idl</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(WindowsSDK_IncludePath);..\AdaptiveCardsObjectModel\idl</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(WindowsSDK_IncludePath);..\AdaptiveCardsObjectModel\idl</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(WindowsSDK_IncludePath);..\AdaptiveCardsObjectModel\idl</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(WindowsSDK_IncludePath);..\SharedObjectModel\idl</AdditionalIncludeDirectories>
</Midl>
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion source/uwp/Renderer/AdaptiveCardRenderer.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Midl Include="idl\AdaptiveCards.Rendering.Uwp.idl" />
<Midl Include="..\SharedRenderer\idl\AdaptiveCards.Rendering.Shared.idl" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
Expand Down
3 changes: 3 additions & 0 deletions source/uwp/SharedObjectModel/SharedObjectModel.vcxitems
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,7 @@
<ClInclude Include="$(MSBuildThisFileDirectory)lib\CustomElementWrapper.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)lib\ObjectModelUtil.h" />
</ItemGroup>
<ItemGroup>
<Content Include="$(MSBuildThisFileDirectory)idl\AdaptiveCards.ObjectModel.Shared.idl" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
<Filter Include="lib">
<UniqueIdentifier>{1ec8d94c-6cf1-4aa0-84ec-9e56e7e29bbf}</UniqueIdentifier>
</Filter>
<Filter Include="idl">
<UniqueIdentifier>{9cc5c3b9-11da-434a-b9db-872f2b3e63c6}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(MSBuildThisFileDirectory)dll\dll.cpp">
Expand Down Expand Up @@ -474,4 +477,9 @@
<Filter>lib</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Content Include="$(MSBuildThisFileDirectory)idl\AdaptiveCards.ObjectModel.Shared.idl">
<Filter>idl</Filter>
</Content>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#ifdef USE_WINUI3

#define Xaml_OM WinUI3

#else // !USE_WINUI3

import "Windows.Foundation.idl";
import "Windows.Data.Json.idl";

namespace AdaptiveCards.ObjectModel.Uwp
#define Xaml_OM Uwp

#endif // USE_WINUI3

namespace AdaptiveCards.ObjectModel.Xaml_OM
{
runtimeclass AdaptiveCardParseResult;

Expand Down
3 changes: 3 additions & 0 deletions source/uwp/SharedRenderer/SharedRenderer.vcxitems
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,7 @@
<ClCompile Include="$(MSBuildThisFileDirectory)lib\XamlHelpers.cpp" />
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
</ItemGroup>
<ItemGroup>
<Content Include="$(MSBuildThisFileDirectory)idl\AdaptiveCards.Rendering.Shared.idl" />
</ItemGroup>
</Project>
8 changes: 8 additions & 0 deletions source/uwp/SharedRenderer/SharedRenderer.vcxitems.filters
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
<Filter Include="lib">
<UniqueIdentifier>{f0d5bd17-6de3-451b-8140-05034df4bd3b}</UniqueIdentifier>
</Filter>
<Filter Include="idl">
<UniqueIdentifier>{35312e60-67cd-4550-ba9c-920cd2a16b1b}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(MSBuildThisFileDirectory)dll\CppWinRTIncludes.h">
Expand Down Expand Up @@ -505,4 +508,9 @@
</ClCompile>
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
</ItemGroup>
<ItemGroup>
<Content Include="$(MSBuildThisFileDirectory)idl\AdaptiveCards.Rendering.Shared.idl">
<Filter>idl</Filter>
</Content>
</ItemGroup>
</Project>
Loading