terminal/src/cascadia/ut_app
Dustin L. Howett 295fa38295
Introduce MS.Term.Core.Color to replace W.U.Color for Core/Control/TSM (#9658)
This pull request introduces Microsoft.Terminal.Core.Color as an
alternative to both Windows.UI.Color and uint32_t/COLORREF in the
TerminalCore, ...Control, ...SettingsModel and ...SettingsEditor layers.

M.T.C.Color is trivially convertible to/from til::color and therefore
to/from COLORREF, W.U.Color, and any other color representation we might
need².

I've replaced almost every use of W.U.Color and uint32_t-as-color in the
above layers, with minor exception¹.

The need for this work is twofold.

First: We cannot bear a dependency from TerminalCore (which should,
on paper, be Windows 7 compatible) on Windows.UI or any other WinRT
namespace.

This work removes one big dependency on Windows.UI, but it does not go
all the way.

Second: TerminalCore chose to communicate mostly in packed uint32s
(COLORREF), which was inherently lossy and dangerous.

¹ The UI layers (TerminalControl, TerminalApp) still use
Windows.UI.Color as they are intimately connected to the UWP XAML UI.

² In the future, we might even be able to *use* the alpha channel...

## PR Checklist
* [x] I ran into the need for this when I introduced cursor inversion
* [X] Fixes a longstanding itch

## Validation Steps Performed
Built and ran all tests for the impacted layers, even the local ones!
2021-03-30 20:15:49 +00:00
..
ColorHelperTests.cpp Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
DynamicProfileTests.cpp Add Serializer to CascadiaSettings (#8018) 2020-11-17 00:37:19 +00:00
JsonTests.cpp Rename Microsoft.Terminal.TerminalControl to .Control; Split into dll & lib (#9472) 2021-03-17 20:47:24 +00:00
JsonUtilsTests.cpp Rework JsonUtils' optional handling to let Converters see null (#8175) 2020-11-09 15:13:02 -08:00
precomp.cpp Refactor TerminalApp and Add Tests for Xaml Content (#1164) 2019-07-15 14:27:56 -05:00
precomp.h Introduce MS.Term.Core.Color to replace W.U.Color for Core/Control/TSM (#9658) 2021-03-30 20:15:49 +00:00
TerminalApp.Unit.Tests.AppxManifest.xml ci: run spell check in CI, fix remaining issues (#4799) 2020-03-25 11:02:53 -07:00
TerminalApp.Unit.Tests.manifest constexprs have to go into the headers or other usages can't find them. Imagine that. 2019-09-04 10:59:18 -07:00
TerminalApp.UnitTests.vcxproj Update to Microsoft.UI.Xaml 2.5 "stable" (#8500) 2020-12-04 23:49:45 +00:00
TestDynamicProfileGenerator.h Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00