-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
preview: Test non-WinRT dependency of dependency #7
- Loading branch information
Showing
29 changed files
with
505 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include "pch.h" | ||
#include "BlankPage.h" | ||
#if __has_include("BlankPage.g.cpp") | ||
#include "BlankPage.g.cpp" | ||
#endif | ||
|
||
using namespace winrt; | ||
using namespace Windows::UI::Xaml; | ||
|
||
namespace winrt::TestDep::implementation | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#pragma once | ||
|
||
#include "BlankPage.g.h" | ||
|
||
namespace winrt::TestDep::implementation | ||
{ | ||
struct BlankPage : BlankPageT<BlankPage> | ||
{ | ||
BlankPage() | ||
{ | ||
// Xaml objects should not call InitializeComponent during construction. | ||
// See https://github.com/microsoft/cppwinrt/tree/master/nuget#initializecomponent | ||
} | ||
}; | ||
} | ||
|
||
namespace winrt::TestDep::factory_implementation | ||
{ | ||
struct BlankPage : BlankPageT<BlankPage, implementation::BlankPage> | ||
{ | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace TestDep | ||
{ | ||
[default_interface] | ||
runtimeclass BlankPage : Microsoft.UI.Xaml.Controls.Page | ||
{ | ||
BlankPage(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<Page | ||
x:Class="TestDep.BlankPage" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="using:TestDep" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d"> | ||
<StackPanel> | ||
<local:DepUserControl /> | ||
<local:DepCustomControl /> | ||
</StackPanel> | ||
</Page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include "pch.h" | ||
#include "DepCustomControl.h" | ||
#if __has_include("DepCustomControl.g.cpp") | ||
#include "DepCustomControl.g.cpp" | ||
#endif | ||
#include "../TestNonWinRTDep/SomeLibrary.h" | ||
#include <iostream> | ||
|
||
using namespace winrt; | ||
using namespace Microsoft::UI::Xaml; | ||
|
||
// To learn more about WinUI, the WinUI project structure, | ||
// and more about our project templates, see: http://aka.ms/winui-project-info. | ||
|
||
namespace winrt::TestDepOfDep::implementation | ||
{ | ||
DepCustomControl::DepCustomControl() | ||
{ | ||
DefaultStyleKey(winrt::box_value(L"TestDepOfDep.DepCustomControl")); | ||
int result = SomeFunction(42); | ||
std::cout << result << std::endl; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#pragma once | ||
|
||
#include "DepCustomControl.g.h" | ||
|
||
namespace winrt::TestDepOfDep::implementation | ||
{ | ||
struct DepCustomControl : DepCustomControlT<DepCustomControl> | ||
{ | ||
DepCustomControl(); | ||
}; | ||
} | ||
|
||
namespace winrt::TestDepOfDep::factory_implementation | ||
{ | ||
struct DepCustomControl : DepCustomControlT<DepCustomControl, implementation::DepCustomControl> | ||
{ | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace TestDepOfDep | ||
{ | ||
[default_interface] | ||
runtimeclass DepCustomControl : Microsoft.UI.Xaml.Controls.Control | ||
{ | ||
DepCustomControl(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<ResourceDictionary | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:TestDepOfDep"> | ||
|
||
<Style TargetType="local:DepCustomControl"> | ||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate TargetType="local:DepCustomControl"> | ||
<TextBlock Text="Hello from dep of dep custom control" /> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
</ResourceDictionary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include "pch.h" | ||
#include "SomeLibrary.h" | ||
|
||
int SomeFunction(int x) | ||
{ | ||
return x * x; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#pragma once | ||
|
||
#ifdef TESTNONWINRTDEP_EXPORTS | ||
#define SOME_LIB_API __declspec(dllexport) | ||
#else | ||
#define SOME_LIB_API __declspec(dllimport) | ||
#endif | ||
|
||
SOME_LIB_API int __stdcall SomeFunction(int x); |
Oops, something went wrong.