-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1485 from contour-terminal/refactor/terminal-state
Refactoring Terminal's internal state storage
- Loading branch information
Showing
23 changed files
with
1,064 additions
and
645 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
#pragma once | ||
|
||
#include <vtbackend/Charset.h> | ||
#include <vtbackend/GraphicsAttributes.h> | ||
#include <vtbackend/Hyperlink.h> | ||
#include <vtbackend/primitives.h> | ||
|
||
namespace vtbackend | ||
{ | ||
|
||
/// Terminal cursor data structure. | ||
/// | ||
/// NB: Take care what to store here, as DECSC/DECRC will save/restore this struct. | ||
struct Cursor | ||
{ | ||
CellLocation position { LineOffset(0), ColumnOffset(0) }; | ||
bool autoWrap = true; // false; | ||
bool originMode = false; | ||
bool wrapPending = false; | ||
GraphicsAttributes graphicsRendition {}; | ||
CharsetMapping charsets {}; | ||
HyperlinkId hyperlink {}; | ||
// TODO: selective erase attribute | ||
// TODO: SS2/SS3 states | ||
// TODO: CharacterSet for GL and GR | ||
}; | ||
|
||
} // namespace vtbackend |
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
Oops, something went wrong.