-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for querying the DECCTR color table report (#17708)
This PR introduces the framework for the `DECRQTSR` sequence which is used to query terminal state reports. But for now I've just implemented the `DECCTR` color table report, which provides a way for applications to query the terminal's color scheme. ## References and Relevant Issues This is the counterpart to the the `DECRSTS` sequence, which is used to restore a color table report. That was implemented in PR #13139, but it only became practical to report the color table once conpty passthrough was added in PR #17510. ## Detailed Description of the Pull Request / Additional comments This sequence has the option of reporting the colors as either HLS or RGB, but in both cases the resolution is lower than 24 bits, so the colors won't necessarily round-trip exactly when saving and restoring. The HLS model in particular can accumulate rounding errors over time. ## Validation Steps Performed I've added a basic unit test that confirms the colors are reported as expected for both color models. The color values in these tests were obtained from color reports on a real VT525 terminal. ## PR Checklist - [x] Tests added/passed
- Loading branch information
Showing
9 changed files
with
290 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters