mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-21 19:07:34 -05:00
Move ICore/ControlSettings to TerminalControl project (#7167)
## Summary of the Pull Request Move `ICoreSettings` and `IControlSettings` from the TerminalSettings project to the TerminalCore and TerminalControl projects respectively. Also entirely removes the TerminalSettings project. The purpose of these interfaces is unchanged. `ICoreSettings` is used to instantiate a terminal. `IControlSettings` (which requires an `ICoreSettings`) is used to instantiate a UWP terminal control. ## References Closes #7140 Related Epic: #885 Related Spec: #6904 ## PR Checklist * [X] Closes #7140 * [X] CLA signed * [X] Tests ~added~/passed (no additional tests necessary) * [X] ~Documentation updated~ * [X] ~Schema updated~ ## Detailed Description of the Pull Request / Additional comments A lot of the work here was having to deal with winmd files across all of these projects. The TerminalCore project now outputs a Microsoft.Terminal.TerminalControl.winmd. Some magic happens in TerminalControl.vcxproj to get this to work properly. ## Validation Steps Performed Deployed Windows Terminal and opened a few new tabs.
This commit is contained in:
@@ -160,15 +160,11 @@ EndProject
|
|||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TerminalConnection", "src\cascadia\TerminalConnection\TerminalConnection.vcxproj", "{CA5CAD1A-C46D-4588-B1C0-40F31AE9100B}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TerminalConnection", "src\cascadia\TerminalConnection\TerminalConnection.vcxproj", "{CA5CAD1A-C46D-4588-B1C0-40F31AE9100B}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TerminalCore", "src\cascadia\TerminalCore\lib\TerminalCore-lib.vcxproj", "{CA5CAD1A-ABCD-429C-B551-8562EC954746}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TerminalCore", "src\cascadia\TerminalCore\lib\TerminalCore-lib.vcxproj", "{CA5CAD1A-ABCD-429C-B551-8562EC954746}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907} = {CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TerminalControl", "src\cascadia\TerminalControl\TerminalControl.vcxproj", "{CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TerminalControl", "src\cascadia\TerminalControl\TerminalControl.vcxproj", "{CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{CA5CAD1A-C46D-4588-B1C0-40F31AE9100B} = {CA5CAD1A-C46D-4588-B1C0-40F31AE9100B}
|
{CA5CAD1A-C46D-4588-B1C0-40F31AE9100B} = {CA5CAD1A-C46D-4588-B1C0-40F31AE9100B}
|
||||||
{CA5CAD1A-ABCD-429C-B551-8562EC954746} = {CA5CAD1A-ABCD-429C-B551-8562EC954746}
|
{CA5CAD1A-ABCD-429C-B551-8562EC954746} = {CA5CAD1A-ABCD-429C-B551-8562EC954746}
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907} = {CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}
|
|
||||||
{1CF55140-EF6A-4736-A403-957E4F7430BB} = {1CF55140-EF6A-4736-A403-957E4F7430BB}
|
{1CF55140-EF6A-4736-A403-957E4F7430BB} = {1CF55140-EF6A-4736-A403-957E4F7430BB}
|
||||||
{48D21369-3D7B-4431-9967-24E81292CF63} = {48D21369-3D7B-4431-9967-24E81292CF63}
|
{48D21369-3D7B-4431-9967-24E81292CF63} = {48D21369-3D7B-4431-9967-24E81292CF63}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
@@ -178,7 +174,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WindowsTerminal", "src\casc
|
|||||||
{CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED} = {CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED}
|
{CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED} = {CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED}
|
||||||
{CA5CAD1A-44BD-4AC7-AC72-F16E576FDD12} = {CA5CAD1A-44BD-4AC7-AC72-F16E576FDD12}
|
{CA5CAD1A-44BD-4AC7-AC72-F16E576FDD12} = {CA5CAD1A-44BD-4AC7-AC72-F16E576FDD12}
|
||||||
{CA5CAD1A-ABCD-429C-B551-8562EC954746} = {CA5CAD1A-ABCD-429C-B551-8562EC954746}
|
{CA5CAD1A-ABCD-429C-B551-8562EC954746} = {CA5CAD1A-ABCD-429C-B551-8562EC954746}
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907} = {CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}
|
|
||||||
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B} = {9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}
|
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B} = {9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
@@ -187,11 +182,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TerminalApp", "src\cascadia
|
|||||||
{CA5CAD1A-9A12-429C-B551-8562EC954746} = {CA5CAD1A-9A12-429C-B551-8562EC954746}
|
{CA5CAD1A-9A12-429C-B551-8562EC954746} = {CA5CAD1A-9A12-429C-B551-8562EC954746}
|
||||||
{CA5CAD1A-C46D-4588-B1C0-40F31AE9100B} = {CA5CAD1A-C46D-4588-B1C0-40F31AE9100B}
|
{CA5CAD1A-C46D-4588-B1C0-40F31AE9100B} = {CA5CAD1A-C46D-4588-B1C0-40F31AE9100B}
|
||||||
{CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED} = {CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED}
|
{CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED} = {CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED}
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907} = {CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}
|
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TerminalSettings", "src\cascadia\TerminalSettings\TerminalSettings.vcxproj", "{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}"
|
|
||||||
EndProject
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WindowsTerminalShellExt", "src\cascadia\ShellExtension\WindowsTerminalShellExt.vcxproj", "{F2ED628A-DB22-446F-A081-4CC845B51A2B}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WindowsTerminalShellExt", "src\cascadia\ShellExtension\WindowsTerminalShellExt.vcxproj", "{F2ED628A-DB22-446F-A081-4CC845B51A2B}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTests_TerminalCore", "src\cascadia\UnitTests_TerminalCore\UnitTests.vcxproj", "{2C2BEEF4-9333-4D05-B12A-1905CBF112F9}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTests_TerminalCore", "src\cascadia\UnitTests_TerminalCore\UnitTests.vcxproj", "{2C2BEEF4-9333-4D05-B12A-1905CBF112F9}"
|
||||||
@@ -238,7 +230,6 @@ EndProject
|
|||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TerminalAppLib", "src\cascadia\TerminalApp\lib\TerminalAppLib.vcxproj", "{CA5CAD1A-9A12-429C-B551-8562EC954746}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TerminalAppLib", "src\cascadia\TerminalApp\lib\TerminalAppLib.vcxproj", "{CA5CAD1A-9A12-429C-B551-8562EC954746}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED} = {CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED}
|
{CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED} = {CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED}
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907} = {CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}
|
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LocalTests_TerminalApp", "src\cascadia\LocalTests_TerminalApp\TerminalApp.LocalTests.vcxproj", "{CA5CAD1A-B11C-4DDB-A4FE-C3AFAE9B5506}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LocalTests_TerminalApp", "src\cascadia\LocalTests_TerminalApp\TerminalApp.LocalTests.vcxproj", "{CA5CAD1A-B11C-4DDB-A4FE-C3AFAE9B5506}"
|
||||||
@@ -1389,35 +1380,6 @@ Global
|
|||||||
{CA5CAD1A-44BD-4AC7-AC72-F16E576FDD12}.Release|x64.Build.0 = Release|x64
|
{CA5CAD1A-44BD-4AC7-AC72-F16E576FDD12}.Release|x64.Build.0 = Release|x64
|
||||||
{CA5CAD1A-44BD-4AC7-AC72-F16E576FDD12}.Release|x86.ActiveCfg = Release|Win32
|
{CA5CAD1A-44BD-4AC7-AC72-F16E576FDD12}.Release|x86.ActiveCfg = Release|Win32
|
||||||
{CA5CAD1A-44BD-4AC7-AC72-F16E576FDD12}.Release|x86.Build.0 = Release|Win32
|
{CA5CAD1A-44BD-4AC7-AC72-F16E576FDD12}.Release|x86.Build.0 = Release|Win32
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.AuditMode|Any CPU.ActiveCfg = Debug|Win32
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.AuditMode|ARM64.ActiveCfg = Release|ARM64
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.AuditMode|DotNet_x64Test.ActiveCfg = Debug|Win32
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.AuditMode|DotNet_x86Test.ActiveCfg = Debug|Win32
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.AuditMode|x64.ActiveCfg = AuditMode|x64
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.AuditMode|x64.Build.0 = AuditMode|x64
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.AuditMode|x86.ActiveCfg = Release|Win32
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Debug|ARM64.Build.0 = Debug|ARM64
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Debug|DotNet_x64Test.ActiveCfg = Debug|x64
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Debug|DotNet_x64Test.Build.0 = Debug|x64
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Debug|DotNet_x86Test.ActiveCfg = Debug|Win32
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Debug|DotNet_x86Test.Build.0 = Debug|Win32
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Debug|x86.ActiveCfg = Debug|Win32
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Debug|x86.Build.0 = Debug|Win32
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Release|Any CPU.ActiveCfg = Release|Win32
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Release|ARM64.ActiveCfg = Release|ARM64
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Release|ARM64.Build.0 = Release|ARM64
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Release|DotNet_x64Test.ActiveCfg = Release|x64
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Release|DotNet_x64Test.Build.0 = Release|x64
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Release|DotNet_x86Test.ActiveCfg = Release|Win32
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Release|DotNet_x86Test.Build.0 = Release|Win32
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Release|x64.Build.0 = Release|x64
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Release|x86.ActiveCfg = Release|Win32
|
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}.Release|x86.Build.0 = Release|Win32
|
|
||||||
{F2ED628A-DB22-446F-A081-4CC845B51A2B}.AuditMode|Any CPU.ActiveCfg = Release|Win32
|
{F2ED628A-DB22-446F-A081-4CC845B51A2B}.AuditMode|Any CPU.ActiveCfg = Release|Win32
|
||||||
{F2ED628A-DB22-446F-A081-4CC845B51A2B}.AuditMode|ARM64.ActiveCfg = Release|ARM64
|
{F2ED628A-DB22-446F-A081-4CC845B51A2B}.AuditMode|ARM64.ActiveCfg = Release|ARM64
|
||||||
{F2ED628A-DB22-446F-A081-4CC845B51A2B}.AuditMode|DotNet_x64Test.ActiveCfg = AuditMode|Win32
|
{F2ED628A-DB22-446F-A081-4CC845B51A2B}.AuditMode|DotNet_x64Test.ActiveCfg = AuditMode|Win32
|
||||||
@@ -2073,7 +2035,6 @@ Global
|
|||||||
{CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED} = {59840756-302F-44DF-AA47-441A9D673202}
|
{CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED} = {59840756-302F-44DF-AA47-441A9D673202}
|
||||||
{CA5CAD1A-1754-4A9D-93D7-857A9D17CB1B} = {59840756-302F-44DF-AA47-441A9D673202}
|
{CA5CAD1A-1754-4A9D-93D7-857A9D17CB1B} = {59840756-302F-44DF-AA47-441A9D673202}
|
||||||
{CA5CAD1A-44BD-4AC7-AC72-F16E576FDD12} = {59840756-302F-44DF-AA47-441A9D673202}
|
{CA5CAD1A-44BD-4AC7-AC72-F16E576FDD12} = {59840756-302F-44DF-AA47-441A9D673202}
|
||||||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907} = {59840756-302F-44DF-AA47-441A9D673202}
|
|
||||||
{F2ED628A-DB22-446F-A081-4CC845B51A2B} = {59840756-302F-44DF-AA47-441A9D673202}
|
{F2ED628A-DB22-446F-A081-4CC845B51A2B} = {59840756-302F-44DF-AA47-441A9D673202}
|
||||||
{2C2BEEF4-9333-4D05-B12A-1905CBF112F9} = {BDB237B6-1D1D-400F-84CC-40A58FA59C8E}
|
{2C2BEEF4-9333-4D05-B12A-1905CBF112F9} = {BDB237B6-1D1D-400F-84CC-40A58FA59C8E}
|
||||||
{EF3E32A7-5FF6-42B4-B6E2-96CD7D033F00} = {E8F24881-5E37-4362-B191-A3BA0ED7F4EB}
|
{EF3E32A7-5FF6-42B4-B6E2-96CD7D033F00} = {E8F24881-5E37-4362-B191-A3BA0ED7F4EB}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
using namespace Microsoft::Console;
|
using namespace Microsoft::Console;
|
||||||
using namespace TerminalApp;
|
using namespace TerminalApp;
|
||||||
using namespace winrt::TerminalApp;
|
using namespace winrt::TerminalApp;
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||||
using namespace WEX::Logging;
|
using namespace WEX::Logging;
|
||||||
using namespace WEX::TestExecution;
|
using namespace WEX::TestExecution;
|
||||||
using namespace WEX::Common;
|
using namespace WEX::Common;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
using namespace Microsoft::Console;
|
using namespace Microsoft::Console;
|
||||||
using namespace TerminalApp;
|
using namespace TerminalApp;
|
||||||
using namespace winrt::TerminalApp;
|
using namespace winrt::TerminalApp;
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||||
using namespace WEX::Logging;
|
using namespace WEX::Logging;
|
||||||
using namespace WEX::TestExecution;
|
using namespace WEX::TestExecution;
|
||||||
using namespace WEX::Common;
|
using namespace WEX::Common;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ using namespace WEX::Logging;
|
|||||||
using namespace WEX::TestExecution;
|
using namespace WEX::TestExecution;
|
||||||
using namespace WEX::Common;
|
using namespace WEX::Common;
|
||||||
using namespace winrt::TerminalApp;
|
using namespace winrt::TerminalApp;
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||||
|
|
||||||
namespace TerminalAppLocalTests
|
namespace TerminalAppLocalTests
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -79,7 +79,6 @@
|
|||||||
|
|
||||||
<!-- If you don't reference these projects here, the
|
<!-- If you don't reference these projects here, the
|
||||||
_ConsoleGenerateAdditionalWinmdManifests step won't gather the winmd's -->
|
_ConsoleGenerateAdditionalWinmdManifests step won't gather the winmd's -->
|
||||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalSettings\TerminalSettings.vcxproj" />
|
|
||||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalControl\TerminalControl.vcxproj" />
|
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalControl\TerminalControl.vcxproj" />
|
||||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalConnection\TerminalConnection.vcxproj" />
|
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalConnection\TerminalConnection.vcxproj" />
|
||||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalApp\TerminalApp.vcxproj" />
|
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalApp\TerminalApp.vcxproj" />
|
||||||
|
|||||||
@@ -94,7 +94,6 @@
|
|||||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalConnection\TerminalConnection.vcxproj">
|
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalConnection\TerminalConnection.vcxproj">
|
||||||
<Project>{CA5CAD1A-C46D-4588-B1C0-40F31AE9100B}</Project>
|
<Project>{CA5CAD1A-C46D-4588-B1C0-40F31AE9100B}</Project>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalSettings\TerminalSettings.vcxproj" />
|
|
||||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalControl\TerminalControl.vcxproj" />
|
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalControl\TerminalControl.vcxproj" />
|
||||||
|
|
||||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalApp\TerminalApp.vcxproj">
|
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalApp\TerminalApp.vcxproj">
|
||||||
|
|||||||
@@ -24,18 +24,18 @@ public:
|
|||||||
// Return Value:
|
// Return Value:
|
||||||
// - The ActionAndArgs bound to the given key, or nullptr if nothing is bound to it.
|
// - The ActionAndArgs bound to the given key, or nullptr if nothing is bound to it.
|
||||||
static const winrt::TerminalApp::ActionAndArgs GetActionAndArgs(const winrt::TerminalApp::implementation::AppKeyBindings& bindings,
|
static const winrt::TerminalApp::ActionAndArgs GetActionAndArgs(const winrt::TerminalApp::implementation::AppKeyBindings& bindings,
|
||||||
const winrt::Microsoft::Terminal::Settings::KeyChord& kc)
|
const winrt::Microsoft::Terminal::TerminalControl::KeyChord& kc)
|
||||||
{
|
{
|
||||||
std::wstring buffer{ L"" };
|
std::wstring buffer{ L"" };
|
||||||
if (WI_IsFlagSet(kc.Modifiers(), winrt::Microsoft::Terminal::Settings::KeyModifiers::Ctrl))
|
if (WI_IsFlagSet(kc.Modifiers(), winrt::Microsoft::Terminal::TerminalControl::KeyModifiers::Ctrl))
|
||||||
{
|
{
|
||||||
buffer += L"Ctrl+";
|
buffer += L"Ctrl+";
|
||||||
}
|
}
|
||||||
if (WI_IsFlagSet(kc.Modifiers(), winrt::Microsoft::Terminal::Settings::KeyModifiers::Shift))
|
if (WI_IsFlagSet(kc.Modifiers(), winrt::Microsoft::Terminal::TerminalControl::KeyModifiers::Shift))
|
||||||
{
|
{
|
||||||
buffer += L"Shift+";
|
buffer += L"Shift+";
|
||||||
}
|
}
|
||||||
if (WI_IsFlagSet(kc.Modifiers(), winrt::Microsoft::Terminal::Settings::KeyModifiers::Alt))
|
if (WI_IsFlagSet(kc.Modifiers(), winrt::Microsoft::Terminal::TerminalControl::KeyModifiers::Alt))
|
||||||
{
|
{
|
||||||
buffer += L"Alt+";
|
buffer += L"Alt+";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ using namespace winrt::Windows::UI::Core;
|
|||||||
using namespace winrt::Windows::Foundation::Collections;
|
using namespace winrt::Windows::Foundation::Collections;
|
||||||
using namespace winrt::Windows::System;
|
using namespace winrt::Windows::System;
|
||||||
using namespace winrt::Microsoft::Terminal;
|
using namespace winrt::Microsoft::Terminal;
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
|
||||||
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||||
using namespace winrt::Microsoft::Terminal::TerminalConnection;
|
using namespace winrt::Microsoft::Terminal::TerminalConnection;
|
||||||
using namespace ::TerminalApp;
|
using namespace ::TerminalApp;
|
||||||
|
|||||||
@@ -9,12 +9,12 @@
|
|||||||
|
|
||||||
using namespace winrt::Microsoft::Terminal;
|
using namespace winrt::Microsoft::Terminal;
|
||||||
using namespace winrt::TerminalApp;
|
using namespace winrt::TerminalApp;
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||||
|
|
||||||
namespace winrt::TerminalApp::implementation
|
namespace winrt::TerminalApp::implementation
|
||||||
{
|
{
|
||||||
void AppKeyBindings::SetKeyBinding(const TerminalApp::ActionAndArgs& actionAndArgs,
|
void AppKeyBindings::SetKeyBinding(const TerminalApp::ActionAndArgs& actionAndArgs,
|
||||||
const Settings::KeyChord& chord)
|
const KeyChord& chord)
|
||||||
{
|
{
|
||||||
_keyShortcuts[chord] = actionAndArgs;
|
_keyShortcuts[chord] = actionAndArgs;
|
||||||
}
|
}
|
||||||
@@ -25,7 +25,7 @@ namespace winrt::TerminalApp::implementation
|
|||||||
// - chord: the keystroke to remove the action for.
|
// - chord: the keystroke to remove the action for.
|
||||||
// Return Value:
|
// Return Value:
|
||||||
// - <none>
|
// - <none>
|
||||||
void AppKeyBindings::ClearKeyBinding(const Settings::KeyChord& chord)
|
void AppKeyBindings::ClearKeyBinding(const KeyChord& chord)
|
||||||
{
|
{
|
||||||
_keyShortcuts.erase(chord);
|
_keyShortcuts.erase(chord);
|
||||||
}
|
}
|
||||||
@@ -67,7 +67,7 @@ namespace winrt::TerminalApp::implementation
|
|||||||
return { nullptr };
|
return { nullptr };
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AppKeyBindings::TryKeyChord(const Settings::KeyChord& kc)
|
bool AppKeyBindings::TryKeyChord(const KeyChord& kc)
|
||||||
{
|
{
|
||||||
const auto keyIter = _keyShortcuts.find(kc);
|
const auto keyIter = _keyShortcuts.find(kc);
|
||||||
if (keyIter != _keyShortcuts.end())
|
if (keyIter != _keyShortcuts.end())
|
||||||
@@ -87,19 +87,19 @@ namespace winrt::TerminalApp::implementation
|
|||||||
// - Takes the KeyModifier flags from Terminal and maps them to the WinRT types which are used by XAML
|
// - Takes the KeyModifier flags from Terminal and maps them to the WinRT types which are used by XAML
|
||||||
// Return Value:
|
// Return Value:
|
||||||
// - a Windows::System::VirtualKeyModifiers object with the flags of which modifiers used.
|
// - a Windows::System::VirtualKeyModifiers object with the flags of which modifiers used.
|
||||||
Windows::System::VirtualKeyModifiers AppKeyBindings::ConvertVKModifiers(Settings::KeyModifiers modifiers)
|
Windows::System::VirtualKeyModifiers AppKeyBindings::ConvertVKModifiers(KeyModifiers modifiers)
|
||||||
{
|
{
|
||||||
Windows::System::VirtualKeyModifiers keyModifiers = Windows::System::VirtualKeyModifiers::None;
|
Windows::System::VirtualKeyModifiers keyModifiers = Windows::System::VirtualKeyModifiers::None;
|
||||||
|
|
||||||
if (WI_IsFlagSet(modifiers, Settings::KeyModifiers::Ctrl))
|
if (WI_IsFlagSet(modifiers, KeyModifiers::Ctrl))
|
||||||
{
|
{
|
||||||
keyModifiers |= Windows::System::VirtualKeyModifiers::Control;
|
keyModifiers |= Windows::System::VirtualKeyModifiers::Control;
|
||||||
}
|
}
|
||||||
if (WI_IsFlagSet(modifiers, Settings::KeyModifiers::Shift))
|
if (WI_IsFlagSet(modifiers, KeyModifiers::Shift))
|
||||||
{
|
{
|
||||||
keyModifiers |= Windows::System::VirtualKeyModifiers::Shift;
|
keyModifiers |= Windows::System::VirtualKeyModifiers::Shift;
|
||||||
}
|
}
|
||||||
if (WI_IsFlagSet(modifiers, Settings::KeyModifiers::Alt))
|
if (WI_IsFlagSet(modifiers, KeyModifiers::Alt))
|
||||||
{
|
{
|
||||||
// note: Menu is the Alt VK_MENU
|
// note: Menu is the Alt VK_MENU
|
||||||
keyModifiers |= Windows::System::VirtualKeyModifiers::Menu;
|
keyModifiers |= Windows::System::VirtualKeyModifiers::Menu;
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ namespace winrt::TerminalApp::implementation
|
|||||||
{
|
{
|
||||||
struct KeyChordHash
|
struct KeyChordHash
|
||||||
{
|
{
|
||||||
std::size_t operator()(const winrt::Microsoft::Terminal::Settings::KeyChord& key) const
|
std::size_t operator()(const winrt::Microsoft::Terminal::TerminalControl::KeyChord& key) const
|
||||||
{
|
{
|
||||||
std::hash<int32_t> keyHash;
|
std::hash<int32_t> keyHash;
|
||||||
std::hash<winrt::Microsoft::Terminal::Settings::KeyModifiers> modifiersHash;
|
std::hash<winrt::Microsoft::Terminal::TerminalControl::KeyModifiers> modifiersHash;
|
||||||
std::size_t hashedKey = keyHash(key.Vkey());
|
std::size_t hashedKey = keyHash(key.Vkey());
|
||||||
std::size_t hashedMods = modifiersHash(key.Modifiers());
|
std::size_t hashedMods = modifiersHash(key.Modifiers());
|
||||||
return hashedKey ^ hashedMods;
|
return hashedKey ^ hashedMods;
|
||||||
@@ -32,7 +32,7 @@ namespace winrt::TerminalApp::implementation
|
|||||||
|
|
||||||
struct KeyChordEquality
|
struct KeyChordEquality
|
||||||
{
|
{
|
||||||
bool operator()(const winrt::Microsoft::Terminal::Settings::KeyChord& lhs, const winrt::Microsoft::Terminal::Settings::KeyChord& rhs) const
|
bool operator()(const winrt::Microsoft::Terminal::TerminalControl::KeyChord& lhs, const winrt::Microsoft::Terminal::TerminalControl::KeyChord& rhs) const
|
||||||
{
|
{
|
||||||
return lhs.Modifiers() == rhs.Modifiers() && lhs.Vkey() == rhs.Vkey();
|
return lhs.Modifiers() == rhs.Modifiers() && lhs.Vkey() == rhs.Vkey();
|
||||||
}
|
}
|
||||||
@@ -42,15 +42,15 @@ namespace winrt::TerminalApp::implementation
|
|||||||
{
|
{
|
||||||
AppKeyBindings() = default;
|
AppKeyBindings() = default;
|
||||||
|
|
||||||
bool TryKeyChord(winrt::Microsoft::Terminal::Settings::KeyChord const& kc);
|
bool TryKeyChord(winrt::Microsoft::Terminal::TerminalControl::KeyChord const& kc);
|
||||||
|
|
||||||
void SetKeyBinding(TerminalApp::ActionAndArgs const& actionAndArgs,
|
void SetKeyBinding(TerminalApp::ActionAndArgs const& actionAndArgs,
|
||||||
winrt::Microsoft::Terminal::Settings::KeyChord const& chord);
|
winrt::Microsoft::Terminal::TerminalControl::KeyChord const& chord);
|
||||||
void ClearKeyBinding(winrt::Microsoft::Terminal::Settings::KeyChord const& chord);
|
void ClearKeyBinding(winrt::Microsoft::Terminal::TerminalControl::KeyChord const& chord);
|
||||||
Microsoft::Terminal::Settings::KeyChord GetKeyBindingForAction(TerminalApp::ShortcutAction const& action);
|
Microsoft::Terminal::TerminalControl::KeyChord GetKeyBindingForAction(TerminalApp::ShortcutAction const& action);
|
||||||
Microsoft::Terminal::Settings::KeyChord GetKeyBindingForActionWithArgs(TerminalApp::ActionAndArgs const& actionAndArgs);
|
Microsoft::Terminal::TerminalControl::KeyChord GetKeyBindingForActionWithArgs(TerminalApp::ActionAndArgs const& actionAndArgs);
|
||||||
|
|
||||||
static Windows::System::VirtualKeyModifiers ConvertVKModifiers(winrt::Microsoft::Terminal::Settings::KeyModifiers modifiers);
|
static Windows::System::VirtualKeyModifiers ConvertVKModifiers(winrt::Microsoft::Terminal::TerminalControl::KeyModifiers modifiers);
|
||||||
|
|
||||||
// Defined in AppKeyBindingsSerialization.cpp
|
// Defined in AppKeyBindingsSerialization.cpp
|
||||||
std::vector<::TerminalApp::SettingsLoadWarnings> LayerJson(const Json::Value& json);
|
std::vector<::TerminalApp::SettingsLoadWarnings> LayerJson(const Json::Value& json);
|
||||||
@@ -59,7 +59,7 @@ namespace winrt::TerminalApp::implementation
|
|||||||
void SetDispatch(const winrt::TerminalApp::ShortcutActionDispatch& dispatch);
|
void SetDispatch(const winrt::TerminalApp::ShortcutActionDispatch& dispatch);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unordered_map<winrt::Microsoft::Terminal::Settings::KeyChord, TerminalApp::ActionAndArgs, KeyChordHash, KeyChordEquality> _keyShortcuts;
|
std::unordered_map<winrt::Microsoft::Terminal::TerminalControl::KeyChord, TerminalApp::ActionAndArgs, KeyChordHash, KeyChordEquality> _keyShortcuts;
|
||||||
|
|
||||||
winrt::TerminalApp::ShortcutActionDispatch _dispatch{ nullptr };
|
winrt::TerminalApp::ShortcutActionDispatch _dispatch{ nullptr };
|
||||||
|
|
||||||
|
|||||||
@@ -5,15 +5,15 @@ import "../ShortcutActionDispatch.idl";
|
|||||||
|
|
||||||
namespace TerminalApp
|
namespace TerminalApp
|
||||||
{
|
{
|
||||||
[default_interface] runtimeclass AppKeyBindings : Microsoft.Terminal.Settings.IKeyBindings
|
[default_interface] runtimeclass AppKeyBindings : Microsoft.Terminal.TerminalControl.IKeyBindings
|
||||||
{
|
{
|
||||||
AppKeyBindings();
|
AppKeyBindings();
|
||||||
|
|
||||||
void SetKeyBinding(ActionAndArgs actionAndArgs, Microsoft.Terminal.Settings.KeyChord chord);
|
void SetKeyBinding(ActionAndArgs actionAndArgs, Microsoft.Terminal.TerminalControl.KeyChord chord);
|
||||||
void ClearKeyBinding(Microsoft.Terminal.Settings.KeyChord chord);
|
void ClearKeyBinding(Microsoft.Terminal.TerminalControl.KeyChord chord);
|
||||||
|
|
||||||
Microsoft.Terminal.Settings.KeyChord GetKeyBindingForAction(ShortcutAction action);
|
Microsoft.Terminal.TerminalControl.KeyChord GetKeyBindingForAction(ShortcutAction action);
|
||||||
Microsoft.Terminal.Settings.KeyChord GetKeyBindingForActionWithArgs(ActionAndArgs actionAndArgs);
|
Microsoft.Terminal.TerminalControl.KeyChord GetKeyBindingForActionWithArgs(ActionAndArgs actionAndArgs);
|
||||||
|
|
||||||
void SetDispatch(ShortcutActionDispatch dispatch);
|
void SetDispatch(ShortcutActionDispatch dispatch);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,9 +12,8 @@
|
|||||||
#include "KeyChordSerialization.h"
|
#include "KeyChordSerialization.h"
|
||||||
#include "Utils.h"
|
#include "Utils.h"
|
||||||
#include "JsonUtils.h"
|
#include "JsonUtils.h"
|
||||||
#include <winrt/Microsoft.Terminal.Settings.h>
|
|
||||||
|
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||||
using namespace winrt::TerminalApp;
|
using namespace winrt::TerminalApp;
|
||||||
|
|
||||||
static constexpr std::string_view KeysKey{ "keys" };
|
static constexpr std::string_view KeysKey{ "keys" };
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ using namespace winrt::Windows::UI::Xaml::Controls;
|
|||||||
using namespace winrt::Windows::UI::Core;
|
using namespace winrt::Windows::UI::Core;
|
||||||
using namespace winrt::Windows::System;
|
using namespace winrt::Windows::System;
|
||||||
using namespace winrt::Microsoft::Terminal;
|
using namespace winrt::Microsoft::Terminal;
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
|
||||||
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||||
using namespace ::TerminalApp;
|
using namespace ::TerminalApp;
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
#include "WslDistroGenerator.h"
|
#include "WslDistroGenerator.h"
|
||||||
#include "AzureCloudShellGenerator.h"
|
#include "AzureCloudShellGenerator.h"
|
||||||
|
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
|
||||||
using namespace ::TerminalApp;
|
using namespace ::TerminalApp;
|
||||||
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||||
using namespace winrt::TerminalApp;
|
using namespace winrt::TerminalApp;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include <winrt/Microsoft.Terminal.Settings.h>
|
|
||||||
#include "ColorScheme.h"
|
#include "ColorScheme.h"
|
||||||
#include "DefaultSettings.h"
|
#include "DefaultSettings.h"
|
||||||
#include "../../types/inc/Utils.hpp"
|
#include "../../types/inc/Utils.hpp"
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ Author(s):
|
|||||||
|
|
||||||
--*/
|
--*/
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <winrt/Microsoft.Terminal.TerminalControl.h>
|
|
||||||
#include "TerminalSettings.h"
|
#include "TerminalSettings.h"
|
||||||
#include "../../inc/conattrs.hpp"
|
#include "../../inc/conattrs.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
#include "JsonUtils.h"
|
#include "JsonUtils.h"
|
||||||
#include <LibraryResources.h>
|
#include <LibraryResources.h>
|
||||||
|
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
|
||||||
using namespace winrt::TerminalApp;
|
using namespace winrt::TerminalApp;
|
||||||
using namespace ::TerminalApp;
|
using namespace ::TerminalApp;
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
#include "CommandPalette.h"
|
#include "CommandPalette.h"
|
||||||
|
|
||||||
#include "CommandPalette.g.cpp"
|
#include "CommandPalette.g.cpp"
|
||||||
#include <winrt/Microsoft.Terminal.Settings.h>
|
|
||||||
|
|
||||||
using namespace winrt;
|
using namespace winrt;
|
||||||
using namespace winrt::TerminalApp;
|
using namespace winrt::TerminalApp;
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
#include "TerminalSettingsSerializationHelpers.h"
|
#include "TerminalSettingsSerializationHelpers.h"
|
||||||
|
|
||||||
using namespace TerminalApp;
|
using namespace TerminalApp;
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
|
||||||
using namespace winrt::TerminalApp;
|
using namespace winrt::TerminalApp;
|
||||||
using namespace winrt::Windows::UI::Xaml;
|
using namespace winrt::Windows::UI::Xaml;
|
||||||
using namespace ::Microsoft::Console;
|
using namespace ::Microsoft::Console;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "KeyChordSerialization.h"
|
#include "KeyChordSerialization.h"
|
||||||
|
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||||
|
|
||||||
static constexpr std::wstring_view CTRL_KEY{ L"ctrl" };
|
static constexpr std::wstring_view CTRL_KEY{ L"ctrl" };
|
||||||
static constexpr std::wstring_view SHIFT_KEY{ L"shift" };
|
static constexpr std::wstring_view SHIFT_KEY{ L"shift" };
|
||||||
@@ -99,7 +99,7 @@ static const std::unordered_map<std::wstring_view, int32_t> vkeyNamePairs {
|
|||||||
// - hstr: the string to parse into a keychord.
|
// - hstr: the string to parse into a keychord.
|
||||||
// Return Value:
|
// Return Value:
|
||||||
// - a newly constructed KeyChord
|
// - a newly constructed KeyChord
|
||||||
winrt::Microsoft::Terminal::Settings::KeyChord KeyChordSerialization::FromString(const winrt::hstring& hstr)
|
KeyChord KeyChordSerialization::FromString(const winrt::hstring& hstr)
|
||||||
{
|
{
|
||||||
std::wstring wstr{ hstr };
|
std::wstring wstr{ hstr };
|
||||||
|
|
||||||
@@ -201,7 +201,7 @@ winrt::Microsoft::Terminal::Settings::KeyChord KeyChordSerialization::FromString
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return winrt::Microsoft::Terminal::Settings::KeyChord{ modifiers, vkey };
|
return KeyChord{ modifiers, vkey };
|
||||||
}
|
}
|
||||||
|
|
||||||
// Function Description:
|
// Function Description:
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <winrt/Microsoft.Terminal.Settings.h>
|
#include <winrt/Microsoft.Terminal.TerminalControl.h>
|
||||||
|
|
||||||
class KeyChordSerialization final
|
class KeyChordSerialization final
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static winrt::Microsoft::Terminal::Settings::KeyChord FromString(const winrt::hstring& str);
|
static winrt::Microsoft::Terminal::TerminalControl::KeyChord FromString(const winrt::hstring& str);
|
||||||
static winrt::hstring ToString(const winrt::Microsoft::Terminal::Settings::KeyChord& chord);
|
static winrt::hstring ToString(const winrt::Microsoft::Terminal::TerminalControl::KeyChord& chord);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ using namespace winrt::Windows::UI;
|
|||||||
using namespace winrt::Windows::UI::Xaml;
|
using namespace winrt::Windows::UI::Xaml;
|
||||||
using namespace winrt::Windows::UI::Core;
|
using namespace winrt::Windows::UI::Core;
|
||||||
using namespace winrt::Windows::UI::Xaml::Media;
|
using namespace winrt::Windows::UI::Xaml::Media;
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
|
||||||
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||||
using namespace winrt::Microsoft::Terminal::TerminalConnection;
|
using namespace winrt::Microsoft::Terminal::TerminalConnection;
|
||||||
using namespace winrt::TerminalApp;
|
using namespace winrt::TerminalApp;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
using namespace TerminalApp;
|
using namespace TerminalApp;
|
||||||
using namespace winrt::TerminalApp;
|
using namespace winrt::TerminalApp;
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||||
using namespace winrt::Windows::UI::Xaml;
|
using namespace winrt::Windows::UI::Xaml;
|
||||||
using namespace ::Microsoft::Console;
|
using namespace ::Microsoft::Console;
|
||||||
|
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ private:
|
|||||||
bool _snapOnInput;
|
bool _snapOnInput;
|
||||||
bool _altGrAliasing;
|
bool _altGrAliasing;
|
||||||
uint32_t _cursorHeight;
|
uint32_t _cursorHeight;
|
||||||
winrt::Microsoft::Terminal::Settings::CursorStyle _cursorShape;
|
winrt::Microsoft::Terminal::TerminalControl::CursorStyle _cursorShape;
|
||||||
|
|
||||||
std::wstring _commandline;
|
std::wstring _commandline;
|
||||||
std::wstring _fontFace;
|
std::wstring _fontFace;
|
||||||
@@ -137,13 +137,13 @@ private:
|
|||||||
std::optional<winrt::Windows::UI::Xaml::Media::Stretch> _backgroundImageStretchMode;
|
std::optional<winrt::Windows::UI::Xaml::Media::Stretch> _backgroundImageStretchMode;
|
||||||
std::optional<std::tuple<winrt::Windows::UI::Xaml::HorizontalAlignment, winrt::Windows::UI::Xaml::VerticalAlignment>> _backgroundImageAlignment;
|
std::optional<std::tuple<winrt::Windows::UI::Xaml::HorizontalAlignment, winrt::Windows::UI::Xaml::VerticalAlignment>> _backgroundImageAlignment;
|
||||||
|
|
||||||
std::optional<::winrt::Microsoft::Terminal::Settings::ScrollbarState> _scrollbarState;
|
std::optional<::winrt::Microsoft::Terminal::TerminalControl::ScrollbarState> _scrollbarState;
|
||||||
CloseOnExitMode _closeOnExitMode;
|
CloseOnExitMode _closeOnExitMode;
|
||||||
std::wstring _padding;
|
std::wstring _padding;
|
||||||
|
|
||||||
std::optional<std::wstring> _icon;
|
std::optional<std::wstring> _icon;
|
||||||
|
|
||||||
winrt::Microsoft::Terminal::Settings::TextAntialiasingMode _antialiasingMode;
|
winrt::Microsoft::Terminal::TerminalControl::TextAntialiasingMode _antialiasingMode;
|
||||||
|
|
||||||
friend class TerminalAppLocalTests::SettingsTests;
|
friend class TerminalAppLocalTests::SettingsTests;
|
||||||
friend class TerminalAppLocalTests::ProfileTests;
|
friend class TerminalAppLocalTests::ProfileTests;
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
using namespace winrt;
|
using namespace winrt;
|
||||||
using namespace winrt::Windows::UI::Xaml;
|
using namespace winrt::Windows::UI::Xaml;
|
||||||
using namespace winrt::Windows::UI::Core;
|
using namespace winrt::Windows::UI::Core;
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
|
||||||
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||||
using namespace winrt::Windows::System;
|
using namespace winrt::Windows::System;
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,6 @@
|
|||||||
<!-- The midl compiler however, _will_ aggregate our winmd dependencies
|
<!-- The midl compiler however, _will_ aggregate our winmd dependencies
|
||||||
somehow. So make sure to only include top-level dependencies here (don't
|
somehow. So make sure to only include top-level dependencies here (don't
|
||||||
include Settings and Connection, since Control will include them for us) -->
|
include Settings and Connection, since Control will include them for us) -->
|
||||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalSettings\TerminalSettings.vcxproj" />
|
|
||||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalConnection\TerminalConnection.vcxproj" />
|
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalConnection\TerminalConnection.vcxproj" />
|
||||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalControl\TerminalControl.vcxproj" />
|
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalControl\TerminalControl.vcxproj" />
|
||||||
<!-- Reference TerminalAppLib here, so we can use it's TerminalApp.winmd as
|
<!-- Reference TerminalAppLib here, so we can use it's TerminalApp.winmd as
|
||||||
|
|||||||
@@ -1206,7 +1206,7 @@ namespace winrt::TerminalApp::implementation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
winrt::Microsoft::Terminal::TerminalControl::TermControl TerminalPage::_GetActiveControl()
|
TermControl TerminalPage::_GetActiveControl()
|
||||||
{
|
{
|
||||||
if (auto index{ _GetFocusedTabIndex() })
|
if (auto index{ _GetFocusedTabIndex() })
|
||||||
{
|
{
|
||||||
@@ -1503,21 +1503,21 @@ namespace winrt::TerminalApp::implementation
|
|||||||
// Return Value:
|
// Return Value:
|
||||||
// - a string representation of the key modifiers for the shortcut
|
// - a string representation of the key modifiers for the shortcut
|
||||||
//NOTE: This needs to be localized with https://github.com/microsoft/terminal/issues/794 if XAML framework issue not resolved before then
|
//NOTE: This needs to be localized with https://github.com/microsoft/terminal/issues/794 if XAML framework issue not resolved before then
|
||||||
static std::wstring _FormatOverrideShortcutText(Settings::KeyModifiers modifiers)
|
static std::wstring _FormatOverrideShortcutText(KeyModifiers modifiers)
|
||||||
{
|
{
|
||||||
std::wstring buffer{ L"" };
|
std::wstring buffer{ L"" };
|
||||||
|
|
||||||
if (WI_IsFlagSet(modifiers, Settings::KeyModifiers::Ctrl))
|
if (WI_IsFlagSet(modifiers, KeyModifiers::Ctrl))
|
||||||
{
|
{
|
||||||
buffer += L"Ctrl+";
|
buffer += L"Ctrl+";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (WI_IsFlagSet(modifiers, Settings::KeyModifiers::Shift))
|
if (WI_IsFlagSet(modifiers, KeyModifiers::Shift))
|
||||||
{
|
{
|
||||||
buffer += L"Shift+";
|
buffer += L"Shift+";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (WI_IsFlagSet(modifiers, Settings::KeyModifiers::Alt))
|
if (WI_IsFlagSet(modifiers, KeyModifiers::Alt))
|
||||||
{
|
{
|
||||||
buffer += L"Alt+";
|
buffer += L"Alt+";
|
||||||
}
|
}
|
||||||
@@ -1531,7 +1531,7 @@ namespace winrt::TerminalApp::implementation
|
|||||||
// Arguments:
|
// Arguments:
|
||||||
// - MenuFlyoutItem that will be displayed, and a KeyChord to map an accelerator
|
// - MenuFlyoutItem that will be displayed, and a KeyChord to map an accelerator
|
||||||
void TerminalPage::_SetAcceleratorForMenuItem(WUX::Controls::MenuFlyoutItem& menuItem,
|
void TerminalPage::_SetAcceleratorForMenuItem(WUX::Controls::MenuFlyoutItem& menuItem,
|
||||||
const winrt::Microsoft::Terminal::Settings::KeyChord& keyChord)
|
const KeyChord& keyChord)
|
||||||
{
|
{
|
||||||
#ifdef DEP_MICROSOFT_UI_XAML_708_FIXED
|
#ifdef DEP_MICROSOFT_UI_XAML_708_FIXED
|
||||||
// work around https://github.com/microsoft/microsoft-ui-xaml/issues/708 in case of VK_OEM_COMMA
|
// work around https://github.com/microsoft/microsoft-ui-xaml/issues/708 in case of VK_OEM_COMMA
|
||||||
@@ -1590,7 +1590,7 @@ namespace winrt::TerminalApp::implementation
|
|||||||
// Arguments:
|
// Arguments:
|
||||||
// - copiedData: the new string content to place on the clipboard.
|
// - copiedData: the new string content to place on the clipboard.
|
||||||
winrt::fire_and_forget TerminalPage::_CopyToClipboardHandler(const IInspectable /*sender*/,
|
winrt::fire_and_forget TerminalPage::_CopyToClipboardHandler(const IInspectable /*sender*/,
|
||||||
const winrt::Microsoft::Terminal::TerminalControl::CopyToClipboardEventArgs copiedData)
|
const CopyToClipboardEventArgs copiedData)
|
||||||
{
|
{
|
||||||
co_await winrt::resume_foreground(Dispatcher(), CoreDispatcherPriority::High);
|
co_await winrt::resume_foreground(Dispatcher(), CoreDispatcherPriority::High);
|
||||||
|
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ namespace winrt::TerminalApp::implementation
|
|||||||
void _SplitPane(const winrt::TerminalApp::SplitState splitType, const winrt::TerminalApp::SplitType splitMode = winrt::TerminalApp::SplitType::Manual, const winrt::TerminalApp::NewTerminalArgs& newTerminalArgs = nullptr);
|
void _SplitPane(const winrt::TerminalApp::SplitState splitType, const winrt::TerminalApp::SplitType splitMode = winrt::TerminalApp::SplitType::Manual, const winrt::TerminalApp::NewTerminalArgs& newTerminalArgs = nullptr);
|
||||||
void _ResizePane(const Direction& direction);
|
void _ResizePane(const Direction& direction);
|
||||||
void _ScrollPage(int delta);
|
void _ScrollPage(int delta);
|
||||||
void _SetAcceleratorForMenuItem(Windows::UI::Xaml::Controls::MenuFlyoutItem& menuItem, const winrt::Microsoft::Terminal::Settings::KeyChord& keyChord);
|
void _SetAcceleratorForMenuItem(Windows::UI::Xaml::Controls::MenuFlyoutItem& menuItem, const winrt::Microsoft::Terminal::TerminalControl::KeyChord& keyChord);
|
||||||
|
|
||||||
winrt::fire_and_forget _CopyToClipboardHandler(const IInspectable sender, const winrt::Microsoft::Terminal::TerminalControl::CopyToClipboardEventArgs copiedData);
|
winrt::fire_and_forget _CopyToClipboardHandler(const IInspectable sender, const winrt::Microsoft::Terminal::TerminalControl::CopyToClipboardEventArgs copiedData);
|
||||||
winrt::fire_and_forget _PasteFromClipboardHandler(const IInspectable sender,
|
winrt::fire_and_forget _PasteFromClipboardHandler(const IInspectable sender,
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ namespace winrt::TerminalApp::implementation
|
|||||||
GETSET_PROPERTY(bool, SnapOnInput, true);
|
GETSET_PROPERTY(bool, SnapOnInput, true);
|
||||||
GETSET_PROPERTY(bool, AltGrAliasing, true);
|
GETSET_PROPERTY(bool, AltGrAliasing, true);
|
||||||
GETSET_PROPERTY(uint32_t, CursorColor, DEFAULT_CURSOR_COLOR);
|
GETSET_PROPERTY(uint32_t, CursorColor, DEFAULT_CURSOR_COLOR);
|
||||||
GETSET_PROPERTY(Microsoft::Terminal::Settings::CursorStyle, CursorShape, Microsoft::Terminal::Settings::CursorStyle::Vintage);
|
GETSET_PROPERTY(Microsoft::Terminal::TerminalControl::CursorStyle, CursorShape, Microsoft::Terminal::TerminalControl::CursorStyle::Vintage);
|
||||||
GETSET_PROPERTY(uint32_t, CursorHeight, DEFAULT_CURSOR_HEIGHT);
|
GETSET_PROPERTY(uint32_t, CursorHeight, DEFAULT_CURSOR_HEIGHT);
|
||||||
GETSET_PROPERTY(hstring, WordDelimiters, DEFAULT_WORD_DELIMITERS);
|
GETSET_PROPERTY(hstring, WordDelimiters, DEFAULT_WORD_DELIMITERS);
|
||||||
GETSET_PROPERTY(bool, CopyOnSelect, false);
|
GETSET_PROPERTY(bool, CopyOnSelect, false);
|
||||||
@@ -78,7 +78,7 @@ namespace winrt::TerminalApp::implementation
|
|||||||
BackgroundImageVerticalAlignment,
|
BackgroundImageVerticalAlignment,
|
||||||
winrt::Windows::UI::Xaml::VerticalAlignment::Center);
|
winrt::Windows::UI::Xaml::VerticalAlignment::Center);
|
||||||
|
|
||||||
GETSET_PROPERTY(Microsoft::Terminal::Settings::IKeyBindings, KeyBindings, nullptr);
|
GETSET_PROPERTY(Microsoft::Terminal::TerminalControl::IKeyBindings, KeyBindings, nullptr);
|
||||||
|
|
||||||
GETSET_PROPERTY(hstring, Commandline);
|
GETSET_PROPERTY(hstring, Commandline);
|
||||||
GETSET_PROPERTY(hstring, StartingDirectory);
|
GETSET_PROPERTY(hstring, StartingDirectory);
|
||||||
@@ -86,9 +86,9 @@ namespace winrt::TerminalApp::implementation
|
|||||||
GETSET_PROPERTY(bool, SuppressApplicationTitle);
|
GETSET_PROPERTY(bool, SuppressApplicationTitle);
|
||||||
GETSET_PROPERTY(hstring, EnvironmentVariables);
|
GETSET_PROPERTY(hstring, EnvironmentVariables);
|
||||||
|
|
||||||
GETSET_PROPERTY(Microsoft::Terminal::Settings::ScrollbarState, ScrollState, Microsoft::Terminal::Settings::ScrollbarState::Visible);
|
GETSET_PROPERTY(Microsoft::Terminal::TerminalControl::ScrollbarState, ScrollState, Microsoft::Terminal::TerminalControl::ScrollbarState::Visible);
|
||||||
|
|
||||||
GETSET_PROPERTY(Microsoft::Terminal::Settings::TextAntialiasingMode, AntialiasingMode, Microsoft::Terminal::Settings::TextAntialiasingMode::Grayscale);
|
GETSET_PROPERTY(Microsoft::Terminal::TerminalControl::TextAntialiasingMode, AntialiasingMode, Microsoft::Terminal::TerminalControl::TextAntialiasingMode::Grayscale);
|
||||||
|
|
||||||
GETSET_PROPERTY(bool, RetroTerminalEffect, false);
|
GETSET_PROPERTY(bool, RetroTerminalEffect, false);
|
||||||
GETSET_PROPERTY(bool, ForceFullRepaintRendering, false);
|
GETSET_PROPERTY(bool, ForceFullRepaintRendering, false);
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ namespace TerminalApp
|
|||||||
// The TerminalControl will pull settings it requires from this object,
|
// The TerminalControl will pull settings it requires from this object,
|
||||||
// and pass along the Core properties to the terminal core.
|
// and pass along the Core properties to the terminal core.
|
||||||
[default_interface]
|
[default_interface]
|
||||||
runtimeclass TerminalSettings : Microsoft.Terminal.Settings.ICoreSettings,
|
runtimeclass TerminalSettings : Microsoft.Terminal.TerminalControl.ICoreSettings,
|
||||||
Microsoft.Terminal.Settings.IControlSettings
|
Microsoft.Terminal.TerminalControl.IControlSettings
|
||||||
{
|
{
|
||||||
TerminalSettings();
|
TerminalSettings();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ Abstract:
|
|||||||
#include "JsonUtils.h"
|
#include "JsonUtils.h"
|
||||||
#include "SettingsTypes.h"
|
#include "SettingsTypes.h"
|
||||||
|
|
||||||
#include <winrt/Microsoft.Terminal.Settings.h>
|
#include <winrt/Microsoft.Terminal.TerminalControl.h>
|
||||||
#include <winrt/TerminalApp.h>
|
#include <winrt/TerminalApp.h>
|
||||||
|
|
||||||
JSON_ENUM_MAPPER(::winrt::Microsoft::Terminal::Settings::CursorStyle)
|
JSON_ENUM_MAPPER(::winrt::Microsoft::Terminal::TerminalControl::CursorStyle)
|
||||||
{
|
{
|
||||||
static constexpr std::array<pair_type, 5> mappings = {
|
static constexpr std::array<pair_type, 5> mappings = {
|
||||||
pair_type{ "bar", ValueType::Bar },
|
pair_type{ "bar", ValueType::Bar },
|
||||||
@@ -42,7 +42,7 @@ JSON_ENUM_MAPPER(::winrt::Windows::UI::Xaml::Media::Stretch)
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
JSON_ENUM_MAPPER(::winrt::Microsoft::Terminal::Settings::ScrollbarState)
|
JSON_ENUM_MAPPER(::winrt::Microsoft::Terminal::TerminalControl::ScrollbarState)
|
||||||
{
|
{
|
||||||
static constexpr std::array<pair_type, 2> mappings = {
|
static constexpr std::array<pair_type, 2> mappings = {
|
||||||
pair_type{ "visible", ValueType::Visible },
|
pair_type{ "visible", ValueType::Visible },
|
||||||
@@ -68,7 +68,7 @@ JSON_ENUM_MAPPER(std::tuple<::winrt::Windows::UI::Xaml::HorizontalAlignment, ::w
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
JSON_ENUM_MAPPER(::winrt::Microsoft::Terminal::Settings::TextAntialiasingMode)
|
JSON_ENUM_MAPPER(::winrt::Microsoft::Terminal::TerminalControl::TextAntialiasingMode)
|
||||||
{
|
{
|
||||||
static constexpr std::array<pair_type, 3> mappings = {
|
static constexpr std::array<pair_type, 3> mappings = {
|
||||||
pair_type{ "grayscale", ValueType::Grayscale },
|
pair_type{ "grayscale", ValueType::Grayscale },
|
||||||
|
|||||||
@@ -302,12 +302,6 @@
|
|||||||
private=false and CopyLocalSatelliteAssemblies=false, so that we don't
|
private=false and CopyLocalSatelliteAssemblies=false, so that we don't
|
||||||
propagate them upwards (which can make referencing this project result in
|
propagate them upwards (which can make referencing this project result in
|
||||||
duplicate type definitions)-->
|
duplicate type definitions)-->
|
||||||
<Reference Include="Microsoft.Terminal.Settings">
|
|
||||||
<HintPath>$(_BinRoot)TerminalSettings\Microsoft.Terminal.Settings.winmd</HintPath>
|
|
||||||
<IsWinMDFile>true</IsWinMDFile>
|
|
||||||
<Private>false</Private>
|
|
||||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Terminal.TerminalConnection">
|
<Reference Include="Microsoft.Terminal.TerminalConnection">
|
||||||
<HintPath>$(_BinRoot)TerminalConnection\Microsoft.Terminal.TerminalConnection.winmd</HintPath>
|
<HintPath>$(_BinRoot)TerminalConnection\Microsoft.Terminal.TerminalConnection.winmd</HintPath>
|
||||||
<IsWinMDFile>true</IsWinMDFile>
|
<IsWinMDFile>true</IsWinMDFile>
|
||||||
|
|||||||
@@ -2,9 +2,8 @@
|
|||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
|
|
||||||
import "IKeyBindings.idl";
|
import "IKeyBindings.idl";
|
||||||
import "ICoreSettings.idl";
|
|
||||||
|
|
||||||
namespace Microsoft.Terminal.Settings
|
namespace Microsoft.Terminal.TerminalControl
|
||||||
{
|
{
|
||||||
enum ScrollbarState
|
enum ScrollbarState
|
||||||
{
|
{
|
||||||
@@ -24,7 +23,7 @@ namespace Microsoft.Terminal.Settings
|
|||||||
// TermControl's behavior. In these settings there is both the entirety
|
// TermControl's behavior. In these settings there is both the entirety
|
||||||
// of the Core ITerminalSettings interface, and any additional settings
|
// of the Core ITerminalSettings interface, and any additional settings
|
||||||
// for specifically the control.
|
// for specifically the control.
|
||||||
interface IControlSettings requires Microsoft.Terminal.Settings.ICoreSettings
|
interface IControlSettings requires ICoreSettings
|
||||||
{
|
{
|
||||||
String ProfileName;
|
String ProfileName;
|
||||||
|
|
||||||
@@ -37,7 +36,7 @@ namespace Microsoft.Terminal.Settings
|
|||||||
Windows.UI.Text.FontWeight FontWeight;
|
Windows.UI.Text.FontWeight FontWeight;
|
||||||
String Padding;
|
String Padding;
|
||||||
|
|
||||||
IKeyBindings KeyBindings;
|
Microsoft.Terminal.TerminalControl.IKeyBindings KeyBindings;
|
||||||
|
|
||||||
Boolean CopyOnSelect;
|
Boolean CopyOnSelect;
|
||||||
|
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import "KeyChord.idl";
|
import "KeyChord.idl";
|
||||||
|
|
||||||
namespace Microsoft.Terminal.Settings
|
namespace Microsoft.Terminal.TerminalControl
|
||||||
{
|
{
|
||||||
// [default_interface]
|
// [default_interface]
|
||||||
interface IKeyBindings
|
interface IKeyBindings
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include "KeyChord.g.cpp"
|
#include "KeyChord.g.cpp"
|
||||||
|
|
||||||
namespace winrt::Microsoft::Terminal::Settings::implementation
|
namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
||||||
{
|
{
|
||||||
KeyChord::KeyChord() noexcept :
|
KeyChord::KeyChord() noexcept :
|
||||||
_modifiers{ 0 },
|
_modifiers{ 0 },
|
||||||
@@ -15,25 +15,25 @@ namespace winrt::Microsoft::Terminal::Settings::implementation
|
|||||||
}
|
}
|
||||||
|
|
||||||
KeyChord::KeyChord(bool ctrl, bool alt, bool shift, int32_t vkey) noexcept :
|
KeyChord::KeyChord(bool ctrl, bool alt, bool shift, int32_t vkey) noexcept :
|
||||||
_modifiers{ (ctrl ? Settings::KeyModifiers::Ctrl : Settings::KeyModifiers::None) |
|
_modifiers{ (ctrl ? TerminalControl::KeyModifiers::Ctrl : TerminalControl::KeyModifiers::None) |
|
||||||
(alt ? Settings::KeyModifiers::Alt : Settings::KeyModifiers::None) |
|
(alt ? TerminalControl::KeyModifiers::Alt : TerminalControl::KeyModifiers::None) |
|
||||||
(shift ? Settings::KeyModifiers::Shift : Settings::KeyModifiers::None) },
|
(shift ? TerminalControl::KeyModifiers::Shift : TerminalControl::KeyModifiers::None) },
|
||||||
_vkey{ vkey }
|
_vkey{ vkey }
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyChord::KeyChord(Settings::KeyModifiers const& modifiers, int32_t vkey) noexcept :
|
KeyChord::KeyChord(TerminalControl::KeyModifiers const& modifiers, int32_t vkey) noexcept :
|
||||||
_modifiers{ modifiers },
|
_modifiers{ modifiers },
|
||||||
_vkey{ vkey }
|
_vkey{ vkey }
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings::KeyModifiers KeyChord::Modifiers() noexcept
|
TerminalControl::KeyModifiers KeyChord::Modifiers() noexcept
|
||||||
{
|
{
|
||||||
return _modifiers;
|
return _modifiers;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeyChord::Modifiers(Settings::KeyModifiers const& value) noexcept
|
void KeyChord::Modifiers(TerminalControl::KeyModifiers const& value) noexcept
|
||||||
{
|
{
|
||||||
_modifiers = value;
|
_modifiers = value;
|
||||||
}
|
}
|
||||||
@@ -5,26 +5,26 @@
|
|||||||
|
|
||||||
#include "KeyChord.g.h"
|
#include "KeyChord.g.h"
|
||||||
|
|
||||||
namespace winrt::Microsoft::Terminal::Settings::implementation
|
namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
||||||
{
|
{
|
||||||
struct KeyChord : KeyChordT<KeyChord>
|
struct KeyChord : KeyChordT<KeyChord>
|
||||||
{
|
{
|
||||||
KeyChord() noexcept;
|
KeyChord() noexcept;
|
||||||
KeyChord(Settings::KeyModifiers const& modifiers, int32_t vkey) noexcept;
|
KeyChord(TerminalControl::KeyModifiers const& modifiers, int32_t vkey) noexcept;
|
||||||
KeyChord(bool ctrl, bool alt, bool shift, int32_t vkey) noexcept;
|
KeyChord(bool ctrl, bool alt, bool shift, int32_t vkey) noexcept;
|
||||||
|
|
||||||
Settings::KeyModifiers Modifiers() noexcept;
|
TerminalControl::KeyModifiers Modifiers() noexcept;
|
||||||
void Modifiers(Settings::KeyModifiers const& value) noexcept;
|
void Modifiers(TerminalControl::KeyModifiers const& value) noexcept;
|
||||||
int32_t Vkey() noexcept;
|
int32_t Vkey() noexcept;
|
||||||
void Vkey(int32_t value) noexcept;
|
void Vkey(int32_t value) noexcept;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Settings::KeyModifiers _modifiers;
|
TerminalControl::KeyModifiers _modifiers;
|
||||||
int32_t _vkey;
|
int32_t _vkey;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace winrt::Microsoft::Terminal::Settings::factory_implementation
|
namespace winrt::Microsoft::Terminal::TerminalControl::factory_implementation
|
||||||
{
|
{
|
||||||
struct KeyChord : KeyChordT<KeyChord, implementation::KeyChord>
|
struct KeyChord : KeyChordT<KeyChord, implementation::KeyChord>
|
||||||
{
|
{
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
|
|
||||||
namespace Microsoft.Terminal.Settings
|
namespace Microsoft.Terminal.TerminalControl
|
||||||
{
|
{
|
||||||
[flags]
|
[flags]
|
||||||
enum KeyModifiers
|
enum KeyModifiers
|
||||||
@@ -31,14 +31,14 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
// Create a CoreTextEditingContext for since we are acting like a custom edit control
|
// Create a CoreTextEditingContext for since we are acting like a custom edit control
|
||||||
auto manager = Core::CoreTextServicesManager::GetForCurrentView();
|
auto manager = CoreTextServicesManager::GetForCurrentView();
|
||||||
_editContext = manager.CreateEditContext();
|
_editContext = manager.CreateEditContext();
|
||||||
|
|
||||||
// InputPane is manually shown inside of TermControl.
|
// InputPane is manually shown inside of TermControl.
|
||||||
_editContext.InputPaneDisplayPolicy(Core::CoreTextInputPaneDisplayPolicy::Manual);
|
_editContext.InputPaneDisplayPolicy(CoreTextInputPaneDisplayPolicy::Manual);
|
||||||
|
|
||||||
// set the input scope to Text because this control is for any text.
|
// set the input scope to Text because this control is for any text.
|
||||||
_editContext.InputScope(Core::CoreTextInputScope::Text);
|
_editContext.InputScope(CoreTextInputScope::Text);
|
||||||
|
|
||||||
_textRequestedRevoker = _editContext.TextRequested(winrt::auto_revoke, { this, &TSFInputControl::_textRequestedHandler });
|
_textRequestedRevoker = _editContext.TextRequested(winrt::auto_revoke, { this, &TSFInputControl::_textRequestedHandler });
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ using namespace winrt::Windows::UI::Core;
|
|||||||
using namespace winrt::Windows::UI::ViewManagement;
|
using namespace winrt::Windows::UI::ViewManagement;
|
||||||
using namespace winrt::Windows::UI::Input;
|
using namespace winrt::Windows::UI::Input;
|
||||||
using namespace winrt::Windows::System;
|
using namespace winrt::Windows::System;
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
|
||||||
using namespace winrt::Windows::ApplicationModel::DataTransfer;
|
using namespace winrt::Windows::ApplicationModel::DataTransfer;
|
||||||
|
|
||||||
// The minimum delay between updates to the scroll bar's values.
|
// The minimum delay between updates to the scroll bar's values.
|
||||||
@@ -56,7 +55,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
|||||||
return initialized;
|
return initialized;
|
||||||
}
|
}
|
||||||
|
|
||||||
TermControl::TermControl(Settings::IControlSettings settings, TerminalConnection::ITerminalConnection connection) :
|
TermControl::TermControl(IControlSettings settings, TerminalConnection::ITerminalConnection connection) :
|
||||||
_connection{ connection },
|
_connection{ connection },
|
||||||
_initializedTerminal{ false },
|
_initializedTerminal{ false },
|
||||||
_settings{ settings },
|
_settings{ settings },
|
||||||
@@ -237,7 +236,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
|||||||
// - newSettings: New settings values for the profile in this terminal.
|
// - newSettings: New settings values for the profile in this terminal.
|
||||||
// Return Value:
|
// Return Value:
|
||||||
// - <none>
|
// - <none>
|
||||||
winrt::fire_and_forget TermControl::UpdateSettings(Settings::IControlSettings newSettings)
|
winrt::fire_and_forget TermControl::UpdateSettings(IControlSettings newSettings)
|
||||||
{
|
{
|
||||||
_settings = newSettings;
|
_settings = newSettings;
|
||||||
auto weakThis{ get_weak() };
|
auto weakThis{ get_weak() };
|
||||||
@@ -2320,7 +2319,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
|||||||
const int32_t& fontHeight,
|
const int32_t& fontHeight,
|
||||||
const winrt::Windows::UI::Text::FontWeight& fontWeight,
|
const winrt::Windows::UI::Text::FontWeight& fontWeight,
|
||||||
const winrt::hstring& fontFace,
|
const winrt::hstring& fontFace,
|
||||||
const Microsoft::Terminal::Settings::ScrollbarState& scrollState,
|
const ScrollbarState& scrollState,
|
||||||
const winrt::hstring& padding,
|
const winrt::hstring& padding,
|
||||||
const uint32_t dpi)
|
const uint32_t dpi)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
#include "CopyToClipboardEventArgs.g.h"
|
#include "CopyToClipboardEventArgs.g.h"
|
||||||
#include "PasteFromClipboardEventArgs.g.h"
|
#include "PasteFromClipboardEventArgs.g.h"
|
||||||
#include <winrt/Microsoft.Terminal.TerminalConnection.h>
|
#include <winrt/Microsoft.Terminal.TerminalConnection.h>
|
||||||
#include <winrt/Microsoft.Terminal.Settings.h>
|
|
||||||
#include "../../renderer/base/Renderer.hpp"
|
#include "../../renderer/base/Renderer.hpp"
|
||||||
#include "../../renderer/dx/DxRenderer.hpp"
|
#include "../../renderer/dx/DxRenderer.hpp"
|
||||||
#include "../../renderer/uia/UiaRenderer.hpp"
|
#include "../../renderer/uia/UiaRenderer.hpp"
|
||||||
@@ -56,9 +55,9 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
|||||||
|
|
||||||
struct TermControl : TermControlT<TermControl>
|
struct TermControl : TermControlT<TermControl>
|
||||||
{
|
{
|
||||||
TermControl(Settings::IControlSettings settings, TerminalConnection::ITerminalConnection connection);
|
TermControl(IControlSettings settings, TerminalConnection::ITerminalConnection connection);
|
||||||
|
|
||||||
winrt::fire_and_forget UpdateSettings(Settings::IControlSettings newSettings);
|
winrt::fire_and_forget UpdateSettings(IControlSettings newSettings);
|
||||||
|
|
||||||
hstring Title();
|
hstring Title();
|
||||||
hstring GetProfileName() const;
|
hstring GetProfileName() const;
|
||||||
@@ -99,12 +98,12 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
|||||||
|
|
||||||
TerminalConnection::ConnectionState ConnectionState() const;
|
TerminalConnection::ConnectionState ConnectionState() const;
|
||||||
|
|
||||||
static Windows::Foundation::Size GetProposedDimensions(Microsoft::Terminal::Settings::IControlSettings const& settings, const uint32_t dpi);
|
static Windows::Foundation::Size GetProposedDimensions(IControlSettings const& settings, const uint32_t dpi);
|
||||||
static Windows::Foundation::Size GetProposedDimensions(const winrt::Windows::Foundation::Size& initialSizeInChars,
|
static Windows::Foundation::Size GetProposedDimensions(const winrt::Windows::Foundation::Size& initialSizeInChars,
|
||||||
const int32_t& fontSize,
|
const int32_t& fontSize,
|
||||||
const winrt::Windows::UI::Text::FontWeight& fontWeight,
|
const winrt::Windows::UI::Text::FontWeight& fontWeight,
|
||||||
const winrt::hstring& fontFace,
|
const winrt::hstring& fontFace,
|
||||||
const Microsoft::Terminal::Settings::ScrollbarState& scrollState,
|
const ScrollbarState& scrollState,
|
||||||
const winrt::hstring& padding,
|
const winrt::hstring& padding,
|
||||||
const uint32_t dpi);
|
const uint32_t dpi);
|
||||||
|
|
||||||
@@ -137,7 +136,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
|||||||
std::unique_ptr<::Microsoft::Console::Render::DxEngine> _renderEngine;
|
std::unique_ptr<::Microsoft::Console::Render::DxEngine> _renderEngine;
|
||||||
std::unique_ptr<::Microsoft::Console::Render::UiaEngine> _uiaEngine;
|
std::unique_ptr<::Microsoft::Console::Render::UiaEngine> _uiaEngine;
|
||||||
|
|
||||||
Settings::IControlSettings _settings;
|
IControlSettings _settings;
|
||||||
bool _focused;
|
bool _focused;
|
||||||
std::atomic<bool> _closing;
|
std::atomic<bool> _closing;
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
|
|
||||||
import "IMouseWheelListener.idl";
|
import "IMouseWheelListener.idl";
|
||||||
|
import "IControlSettings.idl";
|
||||||
|
|
||||||
namespace Microsoft.Terminal.TerminalControl
|
namespace Microsoft.Terminal.TerminalControl
|
||||||
{
|
{
|
||||||
@@ -32,11 +33,11 @@ namespace Microsoft.Terminal.TerminalControl
|
|||||||
|
|
||||||
[default_interface] runtimeclass TermControl : Windows.UI.Xaml.Controls.UserControl, IDirectKeyListener, IMouseWheelListener
|
[default_interface] runtimeclass TermControl : Windows.UI.Xaml.Controls.UserControl, IDirectKeyListener, IMouseWheelListener
|
||||||
{
|
{
|
||||||
TermControl(Microsoft.Terminal.Settings.IControlSettings settings, Microsoft.Terminal.TerminalConnection.ITerminalConnection connection);
|
TermControl(Microsoft.Terminal.TerminalControl.IControlSettings settings, Microsoft.Terminal.TerminalConnection.ITerminalConnection connection);
|
||||||
|
|
||||||
static Windows.Foundation.Size GetProposedDimensions(Microsoft.Terminal.Settings.IControlSettings settings, UInt32 dpi);
|
static Windows.Foundation.Size GetProposedDimensions(Microsoft.Terminal.TerminalControl.IControlSettings settings, UInt32 dpi);
|
||||||
|
|
||||||
void UpdateSettings(Microsoft.Terminal.Settings.IControlSettings newSettings);
|
void UpdateSettings(Microsoft.Terminal.TerminalControl.IControlSettings newSettings);
|
||||||
|
|
||||||
event TitleChangedEventArgs TitleChanged;
|
event TitleChangedEventArgs TitleChanged;
|
||||||
event FontSizeChangedEventArgs FontSizeChanged;
|
event FontSizeChangedEventArgs FontSizeChanged;
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
projects compile properly when they depend on this "Microsoft.winmd."
|
projects compile properly when they depend on this "Microsoft.winmd."
|
||||||
-->
|
-->
|
||||||
<CppWinRTNamespaceMergeDepth>3</CppWinRTNamespaceMergeDepth>
|
<CppWinRTNamespaceMergeDepth>3</CppWinRTNamespaceMergeDepth>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
DON'T REDIRECT OUR OUTPUT.
|
DON'T REDIRECT OUR OUTPUT.
|
||||||
Setting this will tell cppwinrt.build.post.props to copy our output from
|
Setting this will tell cppwinrt.build.post.props to copy our output from
|
||||||
@@ -28,12 +27,13 @@
|
|||||||
<NoOutputRedirection>true</NoOutputRedirection>
|
<NoOutputRedirection>true</NoOutputRedirection>
|
||||||
<XamlComponentResourceLocation>nested</XamlComponentResourceLocation>
|
<XamlComponentResourceLocation>nested</XamlComponentResourceLocation>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Import Project="..\..\..\common.openconsole.props" Condition="'$(OpenConsoleDir)'==''" />
|
<Import Project="..\..\..\common.openconsole.props" Condition="'$(OpenConsoleDir)'==''" />
|
||||||
<Import Project="$(OpenConsoleDir)src\cppwinrt.build.pre.props" />
|
<Import Project="$(OpenConsoleDir)src\cppwinrt.build.pre.props" />
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="pch.h" />
|
<ClInclude Include="pch.h" />
|
||||||
|
<ClInclude Include="KeyChord.h">
|
||||||
|
<DependentUpon>KeyChord.idl</DependentUpon>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="SearchBoxControl.h">
|
<ClInclude Include="SearchBoxControl.h">
|
||||||
<DependentUpon>SearchBoxControl.xaml</DependentUpon>
|
<DependentUpon>SearchBoxControl.xaml</DependentUpon>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -54,6 +54,9 @@
|
|||||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="init.cpp" />
|
<ClCompile Include="init.cpp" />
|
||||||
|
<ClCompile Include="KeyChord.cpp">
|
||||||
|
<DependentUpon>KeyChord.idl</DependentUpon>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="SearchBoxControl.cpp">
|
<ClCompile Include="SearchBoxControl.cpp">
|
||||||
<DependentUpon>SearchBoxControl.xaml</DependentUpon>
|
<DependentUpon>SearchBoxControl.xaml</DependentUpon>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -71,6 +74,9 @@
|
|||||||
<ClCompile Include="XamlUiaTextRange.cpp" />
|
<ClCompile Include="XamlUiaTextRange.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Midl Include="KeyChord.idl" />
|
||||||
|
<Midl Include="IKeyBindings.idl" />
|
||||||
|
<Midl Include="IControlSettings.idl" />
|
||||||
<Midl Include="SearchBoxControl.idl">
|
<Midl Include="SearchBoxControl.idl">
|
||||||
<DependentUpon>SearchBoxControl.xaml</DependentUpon>
|
<DependentUpon>SearchBoxControl.xaml</DependentUpon>
|
||||||
</Midl>
|
</Midl>
|
||||||
@@ -100,10 +106,6 @@
|
|||||||
<ProjectReference Include="..\..\renderer\uia\lib\uia.vcxproj" />
|
<ProjectReference Include="..\..\renderer\uia\lib\uia.vcxproj" />
|
||||||
<ProjectReference Include="..\..\terminal\parser\lib\parser.vcxproj" />
|
<ProjectReference Include="..\..\terminal\parser\lib\parser.vcxproj" />
|
||||||
<ProjectReference Include="$(OpenConsoleDir)src\terminal\input\lib\terminalinput.vcxproj" />
|
<ProjectReference Include="$(OpenConsoleDir)src\terminal\input\lib\terminalinput.vcxproj" />
|
||||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalSettings\TerminalSettings.vcxproj">
|
|
||||||
<Private>false</Private>
|
|
||||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalCore\lib\TerminalCore-lib.vcxproj" />
|
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalCore\lib\TerminalCore-lib.vcxproj" />
|
||||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalConnection\TerminalConnection.vcxproj">
|
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalConnection\TerminalConnection.vcxproj">
|
||||||
<Private>false</Private>
|
<Private>false</Private>
|
||||||
@@ -125,9 +127,7 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Import Project="$(OpenConsoleDir)src\cppwinrt.build.post.props" />
|
<Import Project="$(OpenConsoleDir)src\cppwinrt.build.post.props" />
|
||||||
|
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>dwrite.lib;dxgi.lib;d2d1.lib;d3d11.lib;shcore.lib;winmm.lib;pathcch.lib;propsys.lib;uiautomationcore.lib;Shlwapi.lib;ntdll.lib;user32.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>dwrite.lib;dxgi.lib;d2d1.lib;d3d11.lib;shcore.lib;winmm.lib;pathcch.lib;propsys.lib;uiautomationcore.lib;Shlwapi.lib;ntdll.lib;user32.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
@@ -136,6 +136,41 @@
|
|||||||
<AdditionalIncludeDirectories>$(OpenConsoleDir)src\cascadia\inc;$(OpenConsoleDir)src\types\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(OpenConsoleDir)src\cascadia\inc;$(OpenConsoleDir)src\types\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
|
||||||
<Import Project="$(SolutionDir)build\rules\CollectWildcardResources.targets" />
|
<Import Project="$(SolutionDir)build\rules\CollectWildcardResources.targets" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
We're linking a static library that has the same root namespace as us. Unfortunately,
|
||||||
|
if we allow a winmd that contains our namespace into the to-be-XamlCompiled reference list
|
||||||
|
the xaml compiler will become upset with us and fail to find any types defined in _this_
|
||||||
|
version of the namespace. Therefore, we have to strip them out.
|
||||||
|
Because ReferencePath is an important item group in MSBuild, we're going to make sure to
|
||||||
|
restore it the moment Xaml is done with it.
|
||||||
|
We have to use a static library with the _same_ namespace as ours because there's a weird
|
||||||
|
invariant somewhere in WinRT that every library project produce a single namespace. We're
|
||||||
|
going to let TerminalCore (static lib) contribute to our namespace, but when we do that
|
||||||
|
we get the xaml compiler complaining.
|
||||||
|
-->
|
||||||
|
<PropertyGroup>
|
||||||
|
<MarkupCompilePass1DependsOn>$(MarkupCompilePass1DependsOn);OpenConsoleStripDuplicateWinmdFromReferencesBeforePass1</MarkupCompilePass1DependsOn>
|
||||||
|
<MarkupCompilePass2DependsOn>$(MarkupCompilePass2DependsOn);OpenConsoleStripDuplicateWinmdFromReferencesBeforePass2</MarkupCompilePass2DependsOn>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Target Name="OpenConsoleStripDuplicateWinmdFromReferencesBeforePass1">
|
||||||
|
<ItemGroup>
|
||||||
|
<!-- Back up the references we're about to delete -->
|
||||||
|
<OCReferencePathToRestore Include="@(ReferencePath)" Condition="'%(Filename)' == '$(RootNamespace)'"/>
|
||||||
|
<ReferencePath Remove="@(OCReferencePathToRestore)"/>
|
||||||
|
</ItemGroup>
|
||||||
|
</Target>
|
||||||
|
<Target Name="OpenConsoleRestoreDuplicateWinmdToReferences" AfterTargets="MarkupCompilePass2">
|
||||||
|
<ItemGroup>
|
||||||
|
<!-- Put them back. -->
|
||||||
|
<ReferencePath Include="@(OCReferencePathToRestore)"/>
|
||||||
|
</ItemGroup>
|
||||||
|
</Target>
|
||||||
|
<Target Name="OpenConsoleStripDuplicateWinmdFromReferencesBeforePass2">
|
||||||
|
<ItemGroup>
|
||||||
|
<!-- Nobody else uses this item group, it's safe to never restore. -->
|
||||||
|
<WinMDReferenceToCompile Remove="@(WinMDReferenceToCompile)" Condition="'%(Filename)' == '$(RootNamespace)'"/>
|
||||||
|
</ItemGroup>
|
||||||
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -15,8 +15,6 @@
|
|||||||
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
|
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
|
||||||
<ClCompile Include="TermControlAutomationPeer.cpp" />
|
<ClCompile Include="TermControlAutomationPeer.cpp" />
|
||||||
<ClCompile Include="XamlUiaTextRange.cpp" />
|
<ClCompile Include="XamlUiaTextRange.cpp" />
|
||||||
<ClCompile Include="TermControlUiaProvider.cpp" />
|
|
||||||
<ClCompile Include="UiaTextRange.cpp" />
|
|
||||||
<ClCompile Include="SearchBoxControl.cpp" />
|
<ClCompile Include="SearchBoxControl.cpp" />
|
||||||
<ClCompile Include="init.cpp" />
|
<ClCompile Include="init.cpp" />
|
||||||
<ClCompile Include="ThrottledFunc.cpp" />
|
<ClCompile Include="ThrottledFunc.cpp" />
|
||||||
@@ -26,15 +24,15 @@
|
|||||||
<ClInclude Include="TermControl.h" />
|
<ClInclude Include="TermControl.h" />
|
||||||
<ClInclude Include="TermControlAutomationPeer.h" />
|
<ClInclude Include="TermControlAutomationPeer.h" />
|
||||||
<ClInclude Include="XamlUiaTextRange.h" />
|
<ClInclude Include="XamlUiaTextRange.h" />
|
||||||
<ClInclude Include="TermControlUiaProvider.hpp" />
|
|
||||||
<ClInclude Include="ThrottledFunc.h" />
|
<ClInclude Include="ThrottledFunc.h" />
|
||||||
<ClInclude Include="UiaTextRange.hpp" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Midl Include="TermControl.idl" />
|
<Midl Include="TermControl.idl" />
|
||||||
<Midl Include="TermControlAutomationPeer.idl" />
|
<Midl Include="TermControlAutomationPeer.idl" />
|
||||||
<Midl Include="SearchBoxControl.idl" />
|
<Midl Include="SearchBoxControl.idl" />
|
||||||
<Midl Include="TSFInputControl.idl" />
|
<Midl Include="TSFInputControl.idl" />
|
||||||
|
<Midl Include="IMouseWheelListener.idl" />
|
||||||
|
<Midl Include="IControlSettings.idl" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="TerminalControl.def" />
|
<None Include="TerminalControl.def" />
|
||||||
@@ -42,6 +40,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Page Include="SearchBoxControl.xaml" />
|
<Page Include="SearchBoxControl.xaml" />
|
||||||
|
<Page Include="TermControl.xaml" />
|
||||||
|
<Page Include="TSFInputControl.xaml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Natvis Include="$(SolutionDir)tools\ConsoleTypes.natvis" />
|
<Natvis Include="$(SolutionDir)tools\ConsoleTypes.natvis" />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
|
|
||||||
namespace Microsoft.Terminal.Settings
|
namespace Microsoft.Terminal.TerminalControl
|
||||||
{
|
{
|
||||||
enum CursorStyle
|
enum CursorStyle
|
||||||
{
|
{
|
||||||
@@ -10,9 +10,9 @@
|
|||||||
#include "../../inc/argb.h"
|
#include "../../inc/argb.h"
|
||||||
#include "../../types/inc/utils.hpp"
|
#include "../../types/inc/utils.hpp"
|
||||||
|
|
||||||
#include "winrt/Microsoft.Terminal.Settings.h"
|
#include <winrt/Microsoft.Terminal.TerminalControl.h>
|
||||||
|
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||||
using namespace Microsoft::Terminal::Core;
|
using namespace Microsoft::Terminal::Core;
|
||||||
using namespace Microsoft::Console;
|
using namespace Microsoft::Console;
|
||||||
using namespace Microsoft::Console::Render;
|
using namespace Microsoft::Console::Render;
|
||||||
@@ -84,8 +84,8 @@ void Terminal::Create(COORD viewportSize, SHORT scrollbackLines, IRenderTarget&
|
|||||||
// Arguments:
|
// Arguments:
|
||||||
// - settings: the set of CoreSettings we need to use to initialize the terminal
|
// - settings: the set of CoreSettings we need to use to initialize the terminal
|
||||||
// - renderTarget: A render target the terminal can use for paint invalidation.
|
// - renderTarget: A render target the terminal can use for paint invalidation.
|
||||||
void Terminal::CreateFromSettings(winrt::Microsoft::Terminal::Settings::ICoreSettings settings,
|
void Terminal::CreateFromSettings(ICoreSettings settings,
|
||||||
Microsoft::Console::Render::IRenderTarget& renderTarget)
|
IRenderTarget& renderTarget)
|
||||||
{
|
{
|
||||||
const COORD viewportSize{ Utils::ClampToShortMax(settings.InitialCols(), 1),
|
const COORD viewportSize{ Utils::ClampToShortMax(settings.InitialCols(), 1),
|
||||||
Utils::ClampToShortMax(settings.InitialRows(), 1) };
|
Utils::ClampToShortMax(settings.InitialRows(), 1) };
|
||||||
@@ -101,7 +101,7 @@ void Terminal::CreateFromSettings(winrt::Microsoft::Terminal::Settings::ICoreSet
|
|||||||
// CoreSettings object.
|
// CoreSettings object.
|
||||||
// Arguments:
|
// Arguments:
|
||||||
// - settings: an ICoreSettings with new settings values for us to use.
|
// - settings: an ICoreSettings with new settings values for us to use.
|
||||||
void Terminal::UpdateSettings(winrt::Microsoft::Terminal::Settings::ICoreSettings settings)
|
void Terminal::UpdateSettings(ICoreSettings settings)
|
||||||
{
|
{
|
||||||
_defaultFg = settings.DefaultForeground();
|
_defaultFg = settings.DefaultForeground();
|
||||||
_defaultBg = settings.DefaultBackground();
|
_defaultBg = settings.DefaultBackground();
|
||||||
@@ -344,7 +344,7 @@ void Terminal::UpdateSettings(winrt::Microsoft::Terminal::Settings::ICoreSetting
|
|||||||
|
|
||||||
// If the old scrolloffset was 0, then we weren't scrolled back at all
|
// If the old scrolloffset was 0, then we weren't scrolled back at all
|
||||||
// before, and shouldn't be now either.
|
// before, and shouldn't be now either.
|
||||||
_scrollOffset = originalOffsetWasZero ? 0 : ::base::ClampSub(_mutableViewport.Top(), newVisibleTop);
|
_scrollOffset = originalOffsetWasZero ? 0 : static_cast<int>(::base::ClampSub(_mutableViewport.Top(), newVisibleTop));
|
||||||
|
|
||||||
// GH#5029 - make sure to InvalidateAll here, so that we'll paint the entire visible viewport.
|
// GH#5029 - make sure to InvalidateAll here, so that we'll paint the entire visible viewport.
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
// You have to forward decl the ICoreSettings here, instead of including the header.
|
// You have to forward decl the ICoreSettings here, instead of including the header.
|
||||||
// If you include the header, there will be compilation errors with other
|
// If you include the header, there will be compilation errors with other
|
||||||
// headers that include Terminal.hpp
|
// headers that include Terminal.hpp
|
||||||
namespace winrt::Microsoft::Terminal::Settings
|
namespace winrt::Microsoft::Terminal::TerminalControl
|
||||||
{
|
{
|
||||||
struct ICoreSettings;
|
struct ICoreSettings;
|
||||||
}
|
}
|
||||||
@@ -58,10 +58,10 @@ public:
|
|||||||
SHORT scrollbackLines,
|
SHORT scrollbackLines,
|
||||||
Microsoft::Console::Render::IRenderTarget& renderTarget);
|
Microsoft::Console::Render::IRenderTarget& renderTarget);
|
||||||
|
|
||||||
void CreateFromSettings(winrt::Microsoft::Terminal::Settings::ICoreSettings settings,
|
void CreateFromSettings(winrt::Microsoft::Terminal::TerminalControl::ICoreSettings settings,
|
||||||
Microsoft::Console::Render::IRenderTarget& renderTarget);
|
Microsoft::Console::Render::IRenderTarget& renderTarget);
|
||||||
|
|
||||||
void UpdateSettings(winrt::Microsoft::Terminal::Settings::ICoreSettings settings);
|
void UpdateSettings(winrt::Microsoft::Terminal::TerminalControl::ICoreSettings settings);
|
||||||
|
|
||||||
// Write goes through the parser
|
// Write goes through the parser
|
||||||
void Write(std::wstring_view stringView);
|
void Write(std::wstring_view stringView);
|
||||||
|
|||||||
@@ -7,16 +7,22 @@
|
|||||||
<TargetName>TerminalCore</TargetName>
|
<TargetName>TerminalCore</TargetName>
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<WindowsTargetPlatformMinVersion>10.0.17763.0</WindowsTargetPlatformMinVersion>
|
<WindowsTargetPlatformMinVersion>10.0.17763.0</WindowsTargetPlatformMinVersion>
|
||||||
<RootNamespace>Microsoft.Terminal.Core</RootNamespace>
|
<RootNamespace>Microsoft.Terminal.TerminalControl</RootNamespace>
|
||||||
|
<!--
|
||||||
|
DON'T REDIRECT OUR OUTPUT.
|
||||||
|
Setting this will tell cppwinrt.build.post.props to copy our output from
|
||||||
|
the default OutDir up one level, so the wapproj will be able to find it.
|
||||||
|
-->
|
||||||
|
<NoOutputRedirection>true</NoOutputRedirection>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Imported WinRT generated files must go up here to get excluded from Audit correctly. -->
|
<!-- Imported WinRT generated files must go up here to get excluded from Audit correctly. -->
|
||||||
<PropertyGroup Condition="'$(Configuration)'=='AuditMode'">
|
<PropertyGroup Condition="'$(Configuration)'=='AuditMode'">
|
||||||
<CAExcludePath>"$(SolutionDir)\src\cascadia\TerminalSettings\Generated Files\winrt";$(SolutionDir)src\cascadia\TerminalSettings;$(CAExcludePath)</CAExcludePath>
|
<CAExcludePath>"$(SolutionDir)\src\cascadia\TerminalCore\Generated Files\winrt";$(SolutionDir)src\cascadia\TerminalCore;$(CAExcludePath)</CAExcludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Import Project="..\..\..\..\common.openconsole.props" Condition="'$(OpenConsoleDir)'==''" />
|
<Import Project="..\..\..\..\common.openconsole.props" Condition="'$(OpenConsoleDir)'==''" />
|
||||||
<Import Project="$(SolutionDir)src\common.build.pre.props" />
|
<Import Project="$(OpenConsoleDir)src\cppwinrt.build.pre.props" />
|
||||||
|
|
||||||
<!-- DONT ADD NEW FILES HERE, ADD THEM TO terminalcore-common.vcxitems -->
|
<!-- DONT ADD NEW FILES HERE, ADD THEM TO terminalcore-common.vcxitems -->
|
||||||
<Import Project="$(OpenConsoleDir)src\cascadia\TerminalCore\terminalcore-common.vcxitems" />
|
<Import Project="$(OpenConsoleDir)src\cascadia\TerminalCore\terminalcore-common.vcxitems" />
|
||||||
@@ -40,20 +46,23 @@
|
|||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Midl Include="..\ICoreSettings.idl" />
|
||||||
|
</ItemGroup>
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||||
<!-- WinRT_IncludePath is the SDK winrt path.
|
<!-- WinRT_IncludePath is the SDK winrt path.
|
||||||
cppwinrt is a sibling directory to it. This is needed for the
|
cppwinrt is a sibling directory to it. This is needed for the
|
||||||
#include <winrt/base>
|
#include <winrt/base>
|
||||||
from TerminalSettings's header to be able to be found.
|
from TerminalCore's header to be able to be found.
|
||||||
Also manually include the generated header's path, because
|
Also manually include the generated header's path, because
|
||||||
adding a project reference will confuse msbuild.
|
adding a project reference will confuse msbuild.
|
||||||
-->
|
-->
|
||||||
<AdditionalIncludeDirectories>$(WinRT_IncludePath)\..\cppwinrt\winrt;"$(OpenConsoleDir)src\cascadia\TerminalSettings\Generated Files";%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(WinRT_IncludePath)\..\cppwinrt\winrt;"$(OpenConsoleDir)src\cascadia\TerminalCore\Generated Files";%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
|
||||||
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->
|
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->
|
||||||
<Import Project="$(SolutionDir)src\common.build.post.props" />
|
<Import Project="$(OpenConsoleDir)src\cppwinrt.build.post.props" />
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
EXPORTS
|
|
||||||
DllCanUnloadNow = WINRT_CanUnloadNow PRIVATE
|
|
||||||
DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<ProjectGuid>{CA5CAD1A-d7ec-4107-b7c6-79cb77ae2907}</ProjectGuid>
|
|
||||||
<ProjectName>TerminalSettings</ProjectName>
|
|
||||||
<RootNamespace>Microsoft.Terminal.Settings</RootNamespace>
|
|
||||||
<!-- cppwinrt.build.pre.props depends on these settings: -->
|
|
||||||
<!-- build a dll, not exe (Application) -->
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<!-- sets a bunch of Windows Universal properties -->
|
|
||||||
<OpenConsoleUniversalApp>true</OpenConsoleUniversalApp>
|
|
||||||
<!--
|
|
||||||
DON'T REDIRECT OUR OUTPUT.
|
|
||||||
Setting this will tell cppwinrt.build.post.props to copy our output from
|
|
||||||
the default OutDir up one level, so the wapproj will be able to find it.
|
|
||||||
-->
|
|
||||||
<NoOutputRedirection>true</NoOutputRedirection>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="..\..\..\common.openconsole.props" Condition="'$(OpenConsoleDir)'==''" />
|
|
||||||
<Import Project="$(OpenConsoleDir)src\cppwinrt.build.pre.props" />
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="pch.h" />
|
|
||||||
<ClInclude Include="KeyChord.h">
|
|
||||||
<DependentUpon>KeyChord.idl</DependentUpon>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="pch.cpp">
|
|
||||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="KeyChord.cpp">
|
|
||||||
<DependentUpon>KeyChord.idl</DependentUpon>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Midl Include="ICoreSettings.idl" />
|
|
||||||
<Midl Include="IControlSettings.idl" />
|
|
||||||
<Midl Include="KeyChord.idl" />
|
|
||||||
<Midl Include="IKeyBindings.idl" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="packages.config" />
|
|
||||||
<None Include="TerminalSettings.def" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(OpenConsoleDir)src\cppwinrt.build.post.props" />
|
|
||||||
</Project>
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="Microsoft.Windows.CppWinRT" version="2.0.200316.3" targetFramework="native" />
|
|
||||||
</packages>
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation.
|
|
||||||
// Licensed under the MIT license.
|
|
||||||
//
|
|
||||||
// pch.h
|
|
||||||
// Header for platform projection include files
|
|
||||||
//
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
|
|
||||||
#include <LibraryIncludes.h>
|
|
||||||
// This is inexplicable, but for whatever reason, cppwinrt conflicts with the
|
|
||||||
// SDK definition of this function, so the only fix is to undef it.
|
|
||||||
// from WinBase.h
|
|
||||||
// Windows::UI::Xaml::Media::Animation::IStoryboard::GetCurrentTime
|
|
||||||
#ifdef GetCurrentTime
|
|
||||||
#undef GetCurrentTime
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <unknwn.h>
|
|
||||||
#include <wil/cppwinrt.h>
|
|
||||||
#include <winrt/Windows.Foundation.h>
|
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
// `renderer.PaintFrame()` is called, the tests will validate the expected
|
// `renderer.PaintFrame()` is called, the tests will validate the expected
|
||||||
// output, and then flush the output of the VtEngine straight to the Terminal.
|
// output, and then flush the output of the VtEngine straight to the Terminal.
|
||||||
|
|
||||||
#include "precomp.h"
|
#include "pch.h"
|
||||||
#include <wextestclass.h>
|
#include <wextestclass.h>
|
||||||
#include "../../inc/consoletaeftemplates.hpp"
|
#include "../../inc/consoletaeftemplates.hpp"
|
||||||
#include "../../types/inc/Viewport.hpp"
|
#include "../../types/inc/Viewport.hpp"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
|
|
||||||
#include "precomp.h"
|
#include "pch.h"
|
||||||
#include <WexTestClass.h>
|
#include <WexTestClass.h>
|
||||||
|
|
||||||
#include "../cascadia/TerminalCore/Terminal.hpp"
|
#include "../cascadia/TerminalCore/Terminal.hpp"
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "precomp.h"
|
#include "pch.h"
|
||||||
#include <WexTestClass.h>
|
#include <WexTestClass.h>
|
||||||
|
|
||||||
#include "DefaultSettings.h"
|
#include "DefaultSettings.h"
|
||||||
|
|
||||||
#include "winrt/Microsoft.Terminal.Settings.h"
|
#include <winrt/Microsoft.Terminal.TerminalControl.h>
|
||||||
|
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||||
|
|
||||||
namespace TerminalCoreUnitTests
|
namespace TerminalCoreUnitTests
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
|
|
||||||
#include "precomp.h"
|
#include "pch.h"
|
||||||
#include <WexTestClass.h>
|
#include <WexTestClass.h>
|
||||||
|
|
||||||
#include "../cascadia/TerminalCore/Terminal.hpp"
|
#include "../cascadia/TerminalCore/Terminal.hpp"
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
#include "../renderer/inc/DummyRenderTarget.hpp"
|
#include "../renderer/inc/DummyRenderTarget.hpp"
|
||||||
#include "consoletaeftemplates.hpp"
|
#include "consoletaeftemplates.hpp"
|
||||||
|
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||||
using namespace Microsoft::Terminal::Core;
|
using namespace Microsoft::Terminal::Core;
|
||||||
using namespace WEX::Logging;
|
using namespace WEX::Logging;
|
||||||
using namespace WEX::TestExecution;
|
using namespace WEX::TestExecution;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
|
|
||||||
#include "precomp.h"
|
#include "pch.h"
|
||||||
#include <WexTestClass.h>
|
#include <WexTestClass.h>
|
||||||
|
|
||||||
#include <argb.h>
|
#include <argb.h>
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
#include "consoletaeftemplates.hpp"
|
#include "consoletaeftemplates.hpp"
|
||||||
#include "TestUtils.h"
|
#include "TestUtils.h"
|
||||||
|
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||||
using namespace Microsoft::Terminal::Core;
|
using namespace Microsoft::Terminal::Core;
|
||||||
using namespace ::Microsoft::Console::Types;
|
using namespace ::Microsoft::Console::Types;
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* This File was generated using the VisualTAEF C++ Project Wizard.
|
* This File was generated using the VisualTAEF C++ Project Wizard.
|
||||||
* Class Name: SelectionTest
|
* Class Name: SelectionTest
|
||||||
*/
|
*/
|
||||||
#include "precomp.h"
|
#include "pch.h"
|
||||||
#include <WexTestClass.h>
|
#include <WexTestClass.h>
|
||||||
|
|
||||||
#include "../cascadia/TerminalCore/Terminal.hpp"
|
#include "../cascadia/TerminalCore/Terminal.hpp"
|
||||||
@@ -17,7 +17,7 @@ using namespace WEX::Logging;
|
|||||||
using namespace WEX::TestExecution;
|
using namespace WEX::TestExecution;
|
||||||
|
|
||||||
using namespace Microsoft::Terminal::Core;
|
using namespace Microsoft::Terminal::Core;
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||||
|
|
||||||
namespace TerminalCoreUnitTests
|
namespace TerminalCoreUnitTests
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
|
|
||||||
#include "precomp.h"
|
#include "pch.h"
|
||||||
#include <WexTestClass.h>
|
#include <WexTestClass.h>
|
||||||
|
|
||||||
#include "../cascadia/TerminalCore/Terminal.hpp"
|
#include "../cascadia/TerminalCore/Terminal.hpp"
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
#include "../renderer/inc/DummyRenderTarget.hpp"
|
#include "../renderer/inc/DummyRenderTarget.hpp"
|
||||||
#include "consoletaeftemplates.hpp"
|
#include "consoletaeftemplates.hpp"
|
||||||
|
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||||
using namespace Microsoft::Terminal::Core;
|
using namespace Microsoft::Terminal::Core;
|
||||||
|
|
||||||
using namespace WEX::Logging;
|
using namespace WEX::Logging;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
|
|
||||||
#include "precomp.h"
|
#include "pch.h"
|
||||||
#include <WexTestClass.h>
|
#include <WexTestClass.h>
|
||||||
|
|
||||||
#include "../renderer/inc/DummyRenderTarget.hpp"
|
#include "../renderer/inc/DummyRenderTarget.hpp"
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
#include "consoletaeftemplates.hpp"
|
#include "consoletaeftemplates.hpp"
|
||||||
#include "TestUtils.h"
|
#include "TestUtils.h"
|
||||||
|
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||||
using namespace Microsoft::Terminal::Core;
|
using namespace Microsoft::Terminal::Core;
|
||||||
|
|
||||||
using namespace WEX::Common;
|
using namespace WEX::Common;
|
||||||
|
|||||||
@@ -7,14 +7,15 @@
|
|||||||
<ProjectName>UnitTests_TerminalCore</ProjectName>
|
<ProjectName>UnitTests_TerminalCore</ProjectName>
|
||||||
<TargetName>Terminal.Core.Unit.Tests</TargetName>
|
<TargetName>Terminal.Core.Unit.Tests</TargetName>
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<OpenConsoleUniversalApp>false</OpenConsoleUniversalApp>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(SolutionDir)\common.openconsole.props" Condition="'$(OpenConsoleDir)'==''" />
|
<Import Project="$(SolutionDir)\common.openconsole.props" Condition="'$(OpenConsoleDir)'==''" />
|
||||||
<Import Project="$(SolutionDir)\src\common.build.pre.props" />
|
<Import Project="$(OpenConsoleDir)src\cppwinrt.build.pre.props" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="ScreenSizeLimitsTest.cpp" />
|
<ClCompile Include="ScreenSizeLimitsTest.cpp" />
|
||||||
<ClCompile Include="SelectionTest.cpp" />
|
<ClCompile Include="SelectionTest.cpp" />
|
||||||
<ClCompile Include="InputTest.cpp" />
|
<ClCompile Include="InputTest.cpp" />
|
||||||
<ClCompile Include="precomp.cpp">
|
<ClCompile Include="pch.cpp">
|
||||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="TerminalApiTest.cpp" />
|
<ClCompile Include="TerminalApiTest.cpp" />
|
||||||
@@ -83,18 +84,18 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="MockTermSettings.h" />
|
<ClInclude Include="MockTermSettings.h" />
|
||||||
<ClInclude Include="precomp.h" />
|
<ClInclude Include="pch.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalIncludeDirectories>..;$(SolutionDir)src\inc;$(SolutionDir)src\inc\test;$(WinRT_IncludePath)\..\cppwinrt\winrt;"$(OpenConsoleDir)\src\cascadia\TerminalSettings\Generated Files";$(OpenConsoleDir)\src\host;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..;$(SolutionDir)src\inc;$(SolutionDir)src\inc\test;$(WinRT_IncludePath)\..\cppwinrt\winrt;"$(OpenConsoleDir)\src\cascadia\TerminalControl\Generated Files";$(OpenConsoleDir)\src\host;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>WindowsApp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>WindowsApp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->
|
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->
|
||||||
<Import Project="$(SolutionDir)src\common.build.post.props" />
|
<Import Project="$(OpenConsoleDir)src\cppwinrt.build.post.props" />
|
||||||
<Import Project="$(SolutionDir)src\common.build.tests.props" />
|
<Import Project="$(SolutionDir)src\common.build.tests.props" />
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Copyright (c) Microsoft Corporation
|
|||||||
Licensed under the MIT license.
|
Licensed under the MIT license.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
- precomp.h
|
- pch.h
|
||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
- Contains external headers to include in the precompile phase of console build
|
- Contains external headers to include in the precompile phase of console build
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation.
|
|
||||||
// Licensed under the MIT license.
|
|
||||||
|
|
||||||
#include "precomp.h"
|
|
||||||
@@ -33,12 +33,6 @@
|
|||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalIncludeDirectories>$(OpenConsoleDir)\src\inc;$(OpenConsoleDir)\dep;$(OpenConsoleDir)\dep\Console;$(OpenConsoleDir)\dep\Win32K;$(OpenConsoleDir)\dep\gsl\include;%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(OpenConsoleDir)\src\inc;$(OpenConsoleDir)\dep;$(OpenConsoleDir)\dep\Console;$(OpenConsoleDir)\dep\Win32K;$(OpenConsoleDir)\dep\gsl\include;%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile>
|
|
||||||
<!-- Manually include the generated TerminalCore header's path, because
|
|
||||||
adding a project reference will confuse msbuild, because TerminalCore
|
|
||||||
isn't a dll, it's a lib, and cppwinrt won't include a lib's header -->
|
|
||||||
<AdditionalIncludeDirectories>"$(OpenConsoleDir)src\cascadia\TerminalCore\lib\Generated Files";%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>gdi32.lib;dwmapi.lib;Shcore.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>gdi32.lib;dwmapi.lib;Shcore.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
@@ -78,7 +72,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<!-- Even though we do have proper recursive dependencies, we want to keep some of these here
|
<!-- Even though we do have proper recursive dependencies, we want to keep some of these here
|
||||||
so that the AppX Manifest contains their activatable classes. -->
|
so that the AppX Manifest contains their activatable classes. -->
|
||||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalSettings\TerminalSettings.vcxproj" />
|
|
||||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalControl\TerminalControl.vcxproj" />
|
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalControl\TerminalControl.vcxproj" />
|
||||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalConnection\TerminalConnection.vcxproj" />
|
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalConnection\TerminalConnection.vcxproj" />
|
||||||
|
|
||||||
|
|||||||
@@ -89,12 +89,6 @@
|
|||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalIncludeDirectories>$(OpenConsoleDir)\src\inc;$(OpenConsoleDir)\dep;$(OpenConsoleDir)\dep\Console;$(OpenConsoleDir)\dep\Win32K;$(OpenConsoleDir)\dep\gsl\include;$(OpenConsoleDir)\dep\wil\include;$(SolutionDir)\oss\chromium;$(SolutionDir)\oss\fmt\include;$(SolutionDir)\oss\dynamic_bitset;$(SolutionDir)\oss\libpopcnt;%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(OpenConsoleDir)\src\inc;$(OpenConsoleDir)\dep;$(OpenConsoleDir)\dep\Console;$(OpenConsoleDir)\dep\Win32K;$(OpenConsoleDir)\dep\gsl\include;$(OpenConsoleDir)\dep\wil\include;$(SolutionDir)\oss\chromium;$(SolutionDir)\oss\fmt\include;$(SolutionDir)\oss\dynamic_bitset;$(SolutionDir)\oss\libpopcnt;%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile>
|
|
||||||
<!-- Manually include the generated TerminalCore header's path, because
|
|
||||||
adding a project reference will confuse msbuild, because TerminalCore
|
|
||||||
isn't a dll, it's a lib, and cppwinrt won't include a lib's header -->
|
|
||||||
<AdditionalIncludeDirectories>"$(OpenConsoleDir)src\cascadia\TerminalCore\lib\Generated Files";"$(OpenConsoleDir)src\cascadia\TerminalApp\lib\Generated Files";%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>gdi32.lib;dwmapi.lib;Shcore.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>gdi32.lib;dwmapi.lib;Shcore.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
@@ -149,7 +143,6 @@
|
|||||||
<None Include="PropertySheet.props" />
|
<None Include="PropertySheet.props" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalSettings\TerminalSettings.vcxproj" />
|
|
||||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalControl\TerminalControl.vcxproj" />
|
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalControl\TerminalControl.vcxproj" />
|
||||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalConnection\TerminalConnection.vcxproj" />
|
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalConnection\TerminalConnection.vcxproj" />
|
||||||
<ProjectReference Include="..\TerminalApp\TerminalApp.vcxproj">
|
<ProjectReference Include="..\TerminalApp\TerminalApp.vcxproj">
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ using namespace WEX::Logging;
|
|||||||
using namespace WEX::TestExecution;
|
using namespace WEX::TestExecution;
|
||||||
using namespace WEX::Common;
|
using namespace WEX::Common;
|
||||||
using namespace winrt::TerminalApp;
|
using namespace winrt::TerminalApp;
|
||||||
using namespace winrt::Microsoft::Terminal::Settings;
|
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||||
|
|
||||||
namespace TerminalAppUnitTests
|
namespace TerminalAppUnitTests
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
<PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<ModuleDefinitionFile>$(ProjectName).def</ModuleDefinitionFile>
|
<ModuleDefinitionFile Condition="Exists('$(ProjectName).def')">$(ProjectName).def</ModuleDefinitionFile>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -303,7 +303,7 @@ private:
|
|||||||
const CONSOLE_INFORMATION& gci = Microsoft::Console::Interactivity::ServiceLocator::LocateGlobals().getConsoleInformation();
|
const CONSOLE_INFORMATION& gci = Microsoft::Console::Interactivity::ServiceLocator::LocateGlobals().getConsoleInformation();
|
||||||
// length 80 string of text with bisecting characters at the beginning and end.
|
// length 80 string of text with bisecting characters at the beginning and end.
|
||||||
// positions of き(\x304d) are at 0, 27-28, 39-40, 67-68, 79
|
// positions of き(\x304d) are at 0, 27-28, 39-40, 67-68, 79
|
||||||
PWCHAR pwszText =
|
auto pwszText =
|
||||||
L"\x304d"
|
L"\x304d"
|
||||||
L"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
L"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||||
L"\x304d\x304d"
|
L"\x304d\x304d"
|
||||||
|
|||||||
Reference in New Issue
Block a user