terminal/src/types/sources.inc
Dan Thompson 72cbe59078
Add support for XTPUSHSGR / XTPOPSGR (#1978)
Implement the `XTPUSHSGR` and `XTPOPSGR` control sequences (see #1796).

This change adds a new pair of methods to `ITermDispatch`:
`PushGraphicsRendition` and `PopGraphicsRendition`, and then plumbs the
change through `AdaptDispatch`, `TerminalDispatch`, `ITerminalApi` and
`TerminalApi`.

The stack logic is encapsulated in the `SgrStack` class, to allow it to
be reused between the two APIs (`AdaptDispatch` and `TerminalDispatch`).

Like xterm, only ten levels of nesting are supported.

The stack is implemented as a "ring stack": if you push when the stack
is full, the bottom of the stack will be dropped to make room.

Partial pushes (see the description of `XTPUSHSGR` in Issue #1796) are
implemented per xterm spec.

## Validation Steps Performed
Tests added, plus manual verification of the feature.

Closes #1796
2021-02-17 18:31:52 -08:00

56 lines
1.4 KiB
C++

!include ..\..\project.inc
# -------------------------------------
# Windows Console
# - Console Types Library
# -------------------------------------
# This module encapsulates types and helpers that are common
# across the entire console project
# -------------------------------------
# Preprocessor Settings
# -------------------------------------
C_DEFINES = $(C_DEFINES) -DBUILD_ONECORE_INTERACTIVITY
# -------------------------------------
# Build System Settings
# -------------------------------------
# Code in the OneCore depot automatically excludes default Win32 libraries.
# -------------------------------------
# Sources, Headers, and Libraries
# -------------------------------------
PRECOMPILED_CXX = 1
PRECOMPILED_INCLUDE = ..\precomp.h
SOURCES= \
..\CodepointWidthDetector.cpp \
..\IInputEvent.cpp \
..\FocusEvent.cpp \
..\GlyphWidth.cpp \
..\KeyEvent.cpp \
..\MenuEvent.cpp \
..\ModifierKeyState.cpp \
..\MouseEvent.cpp \
..\Viewport.cpp \
..\WindowBufferSizeEvent.cpp \
..\convert.cpp \
..\colorTable.cpp \
..\Utf16Parser.cpp \
..\utils.cpp \
..\ThemeUtils.cpp \
..\ScreenInfoUiaProviderBase.cpp \
..\sgrStack.cpp \
..\UiaTextRangeBase.cpp \
..\UiaTracing.cpp \
..\TermControlUiaProvider.cpp \
..\TermControlUiaTextRange.cpp \
INCLUDES= \
$(INCLUDES); \
..; \