terminal/src/cascadia/TerminalCore
James Holderness 7b7dea009c
Consolidate the interfaces for setting VT input modes (#11384)
Instead of having a separate method for setting each mouse and keyboard
mode, this PR consolidates them all into a single method which takes a
mode parameter, and stores the modes in a `til::enumset` rather than
having a separate `bool` for each mode.

This enables us to get rid of a lot of boilerplate code, and makes the
code easier to extend when we want to introduce additional modes in the
future. It'll also makes it easier to read back the state of the various
modes when implementing the `DECRQM` query.

Most of the complication is in the `TerminalInput` class, which had to
be adjusted to work with an `enumset` in place of all the `bool` fields.
For the rest, it was largely a matter of replacing calls to all the old
mode setting methods with the new `SetInputMode` method, and deleting a
bunch of unused code.

One thing worth mentioning is that the `AdaptDispatch` implementation
used to have a `_ShouldPassThroughInputModeChange` method that was
called after every mode change. This code has now been moved up into the
`SetInputMode` implementation in `ConhostInternalGetSet` so it's just
handled in one place. Keeping this out of the dispatch class will also
be beneficial for sharing the implementation with `TerminalDispatch`.

## Validation

The updated interface necessitated some adjustments to the tests in
`AdapterTest` and `MouseInputTest`, but the essential structure of the
tests remains unchanged, and everything still passes.

I've also tested the keyboard and mouse modes in Vttest and confirmed
they still work at least as well as they did before (both conhost and
Windows Terminal), and I tested the alternate scroll mode manually
(conhost only).

Simplifying the `ConGetSet` and `ITerminalApi` is also part of the plan
to de-duplicate the `AdaptDispatch` and `TerminalDispatch`
implementation (#3849).
2021-10-26 21:12:22 +00:00
..
lib Upgrade Windows SDK to 19041 (#10118) 2021-05-20 16:04:25 +00:00
ColorFix.cpp Implement the Delta E algorithm to improve color perception (#11095) 2021-10-07 22:43:17 +00:00
ColorFix.hpp Implement the Delta E algorithm to improve color perception (#11095) 2021-10-07 22:43:17 +00:00
ControlKeyStates.hpp Only access ControlInteractivity through the projection (#10051) 2021-07-19 11:59:30 -05:00
ICoreAppearance.idl Implement the Delta E algorithm to improve color perception (#11095) 2021-10-07 22:43:17 +00:00
ICoreSettings.idl Add a setting to disable URL detection (#10022) 2021-05-17 04:20:09 +00:00
ITerminalApi.hpp Consolidate the interfaces for setting VT input modes (#11384) 2021-10-26 21:12:22 +00:00
ITerminalInput.hpp Split TermControl into a Core, Interactivity, and Control layer (#9820) 2021-04-27 15:50:45 +00:00
packages.config Upgrade to C++/WinRT 2.0.210825.3 (#11188) 2021-09-10 21:33:13 +00:00
pch.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
pch.h Introduce MS.Term.Core.Color to replace W.U.Color for Core/Control/TSM (#9658) 2021-03-30 20:15:49 +00:00
Terminal.cpp Implement the Delta E algorithm to improve color perception (#11095) 2021-10-07 22:43:17 +00:00
Terminal.hpp Consolidate the interfaces for setting VT input modes (#11384) 2021-10-26 21:12:22 +00:00
TerminalApi.cpp Consolidate the interfaces for setting VT input modes (#11384) 2021-10-26 21:12:22 +00:00
terminalcore-common.vcxitems Implement the Delta E algorithm to improve color perception (#11095) 2021-10-07 22:43:17 +00:00
TerminalDispatch.cpp Consolidate the interfaces for setting VT input modes (#11384) 2021-10-26 21:12:22 +00:00
TerminalDispatch.hpp Initial Implementation for tab stops in TerminalDispatch (#9597) 2021-04-16 16:26:28 +00:00
TerminalDispatchGraphics.cpp Add support for XTPUSHSGR / XTPOPSGR (#1978) 2021-02-17 18:31:52 -08:00
terminalrenderdata.cpp Implement the Delta E algorithm to improve color perception (#11095) 2021-10-07 22:43:17 +00:00
TerminalSelection.cpp Implement Keyboard Selection (#10824) 2021-09-23 12:24:32 -07:00