Skip to content

Commit

Permalink
Switch to C++/WinRT -optimized (#1737)
Browse files Browse the repository at this point in the history
  • Loading branch information
jevansaks committed Dec 11, 2019
1 parent 35577ba commit 46f9da3
Show file tree
Hide file tree
Showing 310 changed files with 2,161 additions and 1,187 deletions.
Expand Up @@ -22,7 +22,7 @@ $(ActivatableTypes)
<Path>Microsoft.UI.Xaml.dll</Path>
<!-- Special type that we manually list here which is not part of the Nuget dll distribution package.
This is our breadcrumb that we leave to be able to detect at runtime that we're using the framework package. -->
<ActivatableClass ActivatableClassId="Microsoft.UI.Xaml.Controls.Internal.FrameworkPackageDetector" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="Microsoft.UI.Private.Controls.FrameworkPackageDetector" ThreadingModel="both" />
</InProcessServer>
</Extension>
</Extensions>
Expand Down
@@ -1,9 +1,10 @@
#include "pch.h"
#include "pch.h"
#include "common.h"
#include "AnimatedVisualPlayerAutomationPeer.h"

#include "AnimatedVisualPlayer.h"

#include "AnimatedVisualPlayerAutomationPeer.properties.cpp"

AnimatedVisualPlayerAutomationPeer::AnimatedVisualPlayerAutomationPeer(winrt::AnimatedVisualPlayer const& owner)
: ReferenceTracker(owner)
{
Expand Down
@@ -1,4 +1,4 @@
#pragma once
#pragma once

#include "AnimatedVisualPlayer.h"

Expand All @@ -14,5 +14,3 @@ class AnimatedVisualPlayerAutomationPeer :
hstring GetClassNameCore();
winrt::AutomationControlType GetAutomationControlTypeCore();
};

CppWinRTActivatableClassWithBasicFactory(AnimatedVisualPlayerAutomationPeer)
4 changes: 3 additions & 1 deletion dev/ColorPicker/ColorPickerSliderAutomationPeer.cpp
Expand Up @@ -9,6 +9,8 @@
#include "ResourceAccessor.h"
#include "Utils.h"

#include "ColorPickerSliderAutomationPeer.properties.cpp"

ColorPickerSliderAutomationPeer::ColorPickerSliderAutomationPeer(winrt::ColorPickerSlider const& owner)
: ReferenceTracker(owner)
{
Expand Down Expand Up @@ -115,4 +117,4 @@ winrt::hstring ColorPickerSliderAutomationPeer::GetValueString(winrt::Color colo
resourceStringWithoutName,
value);
}
}
}
1 change: 0 additions & 1 deletion dev/ColorPicker/ColorPickerSliderAutomationPeer.h
Expand Up @@ -27,4 +27,3 @@ class ColorPickerSliderAutomationPeer :
winrt::hstring GetValueString(winrt::Color color, int value);
};

CppWinRTActivatableClassWithBasicFactory(ColorPickerSliderAutomationPeer)
4 changes: 3 additions & 1 deletion dev/ColorPicker/ColorSpectrumAutomationPeer.cpp
Expand Up @@ -8,6 +8,8 @@
#include "ResourceAccessor.h"
#include "Utils.h"

#include "ColorSpectrumAutomationPeer.properties.cpp"

ColorSpectrumAutomationPeer::ColorSpectrumAutomationPeer(winrt::ColorSpectrum const& owner) :
ReferenceTracker(owner)
{
Expand Down Expand Up @@ -124,4 +126,4 @@ winrt::hstring ColorSpectrumAutomationPeer::GetValueString(winrt::Color color, w
ResourceAccessor::GetLocalizedStringResource(SR_ValueStringColorSpectrumWithoutColorName),
hue, saturation, value);
}
}
}
2 changes: 0 additions & 2 deletions dev/ColorPicker/ColorSpectrumAutomationPeer.h
Expand Up @@ -33,5 +33,3 @@ class ColorSpectrumAutomationPeer :
private:
static winrt::hstring GetValueString(winrt::Color color, winrt::float4 hsvColor);
};

CppWinRTActivatableClassWithBasicFactory(ColorSpectrumAutomationPeer)
2 changes: 2 additions & 0 deletions dev/CommandBarFlyout/CommandBarFlyout.cpp
Expand Up @@ -8,6 +8,8 @@
#include "Vector.h"
#include "RuntimeProfiler.h"

#include "CommandBarFlyout.properties.cpp"

// Change to 'true' to turn on debugging outputs in Output window
bool CommandBarFlyoutTrace::s_IsDebugOutputEnabled{ false };
bool CommandBarFlyoutTrace::s_IsVerboseDebugOutputEnabled{ false };
Expand Down
1 change: 0 additions & 1 deletion dev/CommandBarFlyout/CommandBarFlyout.h
Expand Up @@ -42,4 +42,3 @@ class CommandBarFlyout :
bool m_isClosingAfterCloseAnimation{ false };
};

CppWinRTActivatableClassWithBasicFactory(CommandBarFlyout);
2 changes: 2 additions & 0 deletions dev/CommandBarFlyout/TextCommandBarFlyout.cpp
Expand Up @@ -8,6 +8,8 @@
#include "ResourceAccessor.h"
#include "RuntimeProfiler.h"

#include "TextCommandBarFlyout.properties.cpp"

TextCommandBarFlyout::TextCommandBarFlyout()
{
__RP_Marker_ClassById(RuntimeProfiler::ProfId_TextCommandBarFlyout);
Expand Down
1 change: 0 additions & 1 deletion dev/CommandBarFlyout/TextCommandBarFlyout.h
Expand Up @@ -92,4 +92,3 @@ class TextCommandBarFlyout :
bool m_isSettingToggleButtonState = false;
};

CppWinRTActivatableClassWithBasicFactory(TextCommandBarFlyout);
2 changes: 2 additions & 0 deletions dev/DropDownButton/DropDownButton.cpp
Expand Up @@ -8,6 +8,8 @@
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"

#include "DropDownButton.properties.cpp"

DropDownButton::DropDownButton()
{
__RP_Marker_ClassById(RuntimeProfiler::ProfId_DropDownButton);
Expand Down
1 change: 0 additions & 1 deletion dev/DropDownButton/DropDownButton.h
Expand Up @@ -40,4 +40,3 @@ class DropDownButton :
winrt::FlyoutBase::Closed_revoker m_flyoutClosedRevoker{};
};

CppWinRTActivatableClassWithBasicFactory(DropDownButton);
3 changes: 3 additions & 0 deletions dev/DropDownButton/DropDownButtonAutomationPeer.cpp
Expand Up @@ -8,6 +8,9 @@
#include "DropDownButtonAutomationPeer.h"
#include "Utils.h"


#include "DropDownButtonAutomationPeer.properties.cpp"

DropDownButtonAutomationPeer::DropDownButtonAutomationPeer(winrt::DropDownButton const& owner)
: ReferenceTracker(owner)
{
Expand Down
2 changes: 0 additions & 2 deletions dev/DropDownButton/DropDownButtonAutomationPeer.h
Expand Up @@ -25,5 +25,3 @@ class DropDownButtonAutomationPeer :
private:
com_ptr<DropDownButton> GetImpl();
};

CppWinRTActivatableClassWithBasicFactory(DropDownButtonAutomationPeer);
16 changes: 16 additions & 0 deletions dev/Generated/AcrylicTestApi.properties.cpp
@@ -0,0 +1,16 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

// DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
#include "pch.h"
#include "common.h"
#include "AcrylicTestApi.h"

namespace winrt::Microsoft::UI::Private::Media
{
CppWinRTActivatableClassWithBasicFactory(AcrylicTestApi)
}

#include "AcrylicTestApi.g.cpp"


7 changes: 6 additions & 1 deletion dev/Generated/AnimatedVisualPlayer.properties.cpp
Expand Up @@ -6,7 +6,12 @@
#include "common.h"
#include "AnimatedVisualPlayer.h"

CppWinRTActivatableClassWithDPFactory(AnimatedVisualPlayer)
namespace winrt::Microsoft::UI::Xaml::Controls
{
CppWinRTActivatableClassWithDPFactory(AnimatedVisualPlayer)
}

#include "AnimatedVisualPlayer.g.cpp"

GlobalDependencyProperty AnimatedVisualPlayerProperties::s_AutoPlayProperty{ nullptr };
GlobalDependencyProperty AnimatedVisualPlayerProperties::s_DiagnosticsProperty{ nullptr };
Expand Down
16 changes: 16 additions & 0 deletions dev/Generated/AnimatedVisualPlayerAutomationPeer.properties.cpp
@@ -0,0 +1,16 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

// DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
#include "pch.h"
#include "common.h"
#include "AnimatedVisualPlayerAutomationPeer.h"

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
{
CppWinRTActivatableClassWithBasicFactory(AnimatedVisualPlayerAutomationPeer)
}

#include "AnimatedVisualPlayerAutomationPeer.g.cpp"


7 changes: 6 additions & 1 deletion dev/Generated/AutoSuggestBoxHelper.properties.cpp
Expand Up @@ -6,7 +6,12 @@
#include "common.h"
#include "AutoSuggestBoxHelper.h"

CppWinRTActivatableClassWithDPFactory(AutoSuggestBoxHelper)
namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
{
CppWinRTActivatableClassWithDPFactory(AutoSuggestBoxHelper)
}

#include "AutoSuggestBoxHelper.g.cpp"

GlobalDependencyProperty AutoSuggestBoxHelperProperties::s_KeepInteriorCornersSquareProperty{ nullptr };

Expand Down
7 changes: 6 additions & 1 deletion dev/Generated/BitmapIconSource.properties.cpp
Expand Up @@ -6,7 +6,12 @@
#include "common.h"
#include "BitmapIconSource.h"

CppWinRTActivatableClassWithDPFactory(BitmapIconSource)
namespace winrt::Microsoft::UI::Xaml::Controls
{
CppWinRTActivatableClassWithDPFactory(BitmapIconSource)
}

#include "BitmapIconSource.g.cpp"

GlobalDependencyProperty BitmapIconSourceProperties::s_ShowAsMonochromeProperty{ nullptr };
GlobalDependencyProperty BitmapIconSourceProperties::s_UriSourceProperty{ nullptr };
Expand Down
7 changes: 6 additions & 1 deletion dev/Generated/ButtonInteraction.properties.cpp
Expand Up @@ -6,7 +6,12 @@
#include "common.h"
#include "ButtonInteraction.h"

CppWinRTActivatableClassWithBasicFactory(ButtonInteraction)
namespace winrt::Microsoft::UI::Private::Controls
{
CppWinRTActivatableClassWithBasicFactory(ButtonInteraction)
}

#include "ButtonInteraction.g.cpp"


ButtonInteractionProperties::ButtonInteractionProperties()
Expand Down
7 changes: 6 additions & 1 deletion dev/Generated/ColorPicker.properties.cpp
Expand Up @@ -6,7 +6,12 @@
#include "common.h"
#include "ColorPicker.h"

CppWinRTActivatableClassWithDPFactory(ColorPicker)
namespace winrt::Microsoft::UI::Xaml::Controls
{
CppWinRTActivatableClassWithDPFactory(ColorPicker)
}

#include "ColorPicker.g.cpp"

GlobalDependencyProperty ColorPickerProperties::s_ColorProperty{ nullptr };
GlobalDependencyProperty ColorPickerProperties::s_ColorSpectrumComponentsProperty{ nullptr };
Expand Down
7 changes: 6 additions & 1 deletion dev/Generated/ColorPickerSlider.properties.cpp
Expand Up @@ -6,7 +6,12 @@
#include "common.h"
#include "ColorPickerSlider.h"

CppWinRTActivatableClassWithDPFactory(ColorPickerSlider)
namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
{
CppWinRTActivatableClassWithDPFactory(ColorPickerSlider)
}

#include "ColorPickerSlider.g.cpp"

GlobalDependencyProperty ColorPickerSliderProperties::s_ColorChannelProperty{ nullptr };

Expand Down
16 changes: 16 additions & 0 deletions dev/Generated/ColorPickerSliderAutomationPeer.properties.cpp
@@ -0,0 +1,16 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

// DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
#include "pch.h"
#include "common.h"
#include "ColorPickerSliderAutomationPeer.h"

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
{
CppWinRTActivatableClassWithBasicFactory(ColorPickerSliderAutomationPeer)
}

#include "ColorPickerSliderAutomationPeer.g.cpp"


7 changes: 6 additions & 1 deletion dev/Generated/ColorSpectrum.properties.cpp
Expand Up @@ -6,7 +6,12 @@
#include "common.h"
#include "ColorSpectrum.h"

CppWinRTActivatableClassWithDPFactory(ColorSpectrum)
namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
{
CppWinRTActivatableClassWithDPFactory(ColorSpectrum)
}

#include "ColorSpectrum.g.cpp"

GlobalDependencyProperty ColorSpectrumProperties::s_ColorProperty{ nullptr };
GlobalDependencyProperty ColorSpectrumProperties::s_ComponentsProperty{ nullptr };
Expand Down
16 changes: 16 additions & 0 deletions dev/Generated/ColorSpectrumAutomationPeer.properties.cpp
@@ -0,0 +1,16 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

// DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
#include "pch.h"
#include "common.h"
#include "ColorSpectrumAutomationPeer.h"

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
{
CppWinRTActivatableClassWithBasicFactory(ColorSpectrumAutomationPeer)
}

#include "ColorSpectrumAutomationPeer.g.cpp"


Expand Up @@ -6,7 +6,12 @@
#include "common.h"
#include "ColumnMajorUniformToLargestGridLayout.h"

CppWinRTActivatableClassWithDPFactory(ColumnMajorUniformToLargestGridLayout)
namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
{
CppWinRTActivatableClassWithDPFactory(ColumnMajorUniformToLargestGridLayout)
}

#include "ColumnMajorUniformToLargestGridLayout.g.cpp"

GlobalDependencyProperty ColumnMajorUniformToLargestGridLayoutProperties::s_ColumnSpacingProperty{ nullptr };
GlobalDependencyProperty ColumnMajorUniformToLargestGridLayoutProperties::s_MaxColumnsProperty{ nullptr };
Expand Down
7 changes: 6 additions & 1 deletion dev/Generated/ComboBoxHelper.properties.cpp
Expand Up @@ -6,7 +6,12 @@
#include "common.h"
#include "ComboBoxHelper.h"

CppWinRTActivatableClassWithDPFactory(ComboBoxHelper)
namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
{
CppWinRTActivatableClassWithDPFactory(ComboBoxHelper)
}

#include "ComboBoxHelper.g.cpp"

GlobalDependencyProperty ComboBoxHelperProperties::s_KeepInteriorCornersSquareProperty{ nullptr };

Expand Down
16 changes: 16 additions & 0 deletions dev/Generated/CommandBarFlyout.properties.cpp
@@ -0,0 +1,16 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

// DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
#include "pch.h"
#include "common.h"
#include "CommandBarFlyout.h"

namespace winrt::Microsoft::UI::Xaml::Controls
{
CppWinRTActivatableClassWithBasicFactory(CommandBarFlyout)
}

#include "CommandBarFlyout.g.cpp"


7 changes: 6 additions & 1 deletion dev/Generated/CommandBarFlyoutCommandBar.properties.cpp
Expand Up @@ -6,7 +6,12 @@
#include "common.h"
#include "CommandBarFlyoutCommandBar.h"

CppWinRTActivatableClassWithDPFactory(CommandBarFlyoutCommandBar)
namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
{
CppWinRTActivatableClassWithDPFactory(CommandBarFlyoutCommandBar)
}

#include "CommandBarFlyoutCommandBar.g.cpp"

GlobalDependencyProperty CommandBarFlyoutCommandBarProperties::s_FlyoutTemplateSettingsProperty{ nullptr };

Expand Down
7 changes: 6 additions & 1 deletion dev/Generated/CornerRadiusFilterConverter.properties.cpp
Expand Up @@ -6,7 +6,12 @@
#include "common.h"
#include "CornerRadiusFilterConverter.h"

CppWinRTActivatableClassWithDPFactory(CornerRadiusFilterConverter)
namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
{
CppWinRTActivatableClassWithDPFactory(CornerRadiusFilterConverter)
}

#include "CornerRadiusFilterConverter.g.cpp"

GlobalDependencyProperty CornerRadiusFilterConverterProperties::s_FilterProperty{ nullptr };
GlobalDependencyProperty CornerRadiusFilterConverterProperties::s_ScaleProperty{ nullptr };
Expand Down
Expand Up @@ -6,7 +6,12 @@
#include "common.h"
#include "CornerRadiusToThicknessConverter.h"

CppWinRTActivatableClassWithDPFactory(CornerRadiusToThicknessConverter)
namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
{
CppWinRTActivatableClassWithDPFactory(CornerRadiusToThicknessConverter)
}

#include "CornerRadiusToThicknessConverter.g.cpp"

GlobalDependencyProperty CornerRadiusToThicknessConverterProperties::s_ConversionKindProperty{ nullptr };

Expand Down

0 comments on commit 46f9da3

Please sign in to comment.