ttx 0.1.0
|
Classes | |
struct | Capability |
Represents a Termcap capability. More... | |
struct | Cell |
Represents a on-screen terminal cell. More... | |
struct | Cursor |
Represents the current cursor position of the terminal. More... | |
struct | CursorPositionReport |
Cursor position report. More... | |
struct | Hyperlink |
Represents a hyperlink specified via OSC 6. More... | |
class | IdMap |
A two-way map between a numberic id and a value. More... | |
struct | Key |
struct | KittyKeyReport |
Kitty key protocol status report. More... | |
struct | ModeQueryReply |
Terminal DEC request query mode reply. More... | |
struct | MultiCellInfo |
Shared information for cells linked via text sizing protocol (OSC 66) or double width characters. More... | |
struct | OperatingStatusReport |
Operating status report. More... | |
struct | OSC52 |
Represents an OSC 52 sequence, which allows for modifying or querying the clipboard. More... | |
struct | OSC66 |
Represents text annotated using the text sizing protocol. More... | |
struct | OSC7 |
Represents a application current working directory report. More... | |
struct | OSC8 |
Represents a terminal hyperlink escape sequence. More... | |
struct | PrimaryDeviceAttributes |
Terminal primary device attributes. More... | |
struct | Row |
Represents a on-screen terminal row of cells. More... | |
class | RowGroup |
Represents a group of terminal rows. More... | |
struct | SavedCursor |
Represents the saved cursor state, which is used for save/restore cursor operations. More... | |
class | Screen |
Represents the visible contents of the terminal (with no scroll back) More... | |
class | ScrollBack |
Represents the terminal scroll back. More... | |
struct | ScrollRegion |
Represents the scrolling region for a terminal. More... | |
struct | Selection |
Represents the visual selection of a terminal. More... | |
struct | SelectionPoint |
Represents a coordinate of a visual selection. More... | |
struct | StatusStringResponse |
Request status string response. More... | |
struct | Terminfo |
Represents a terminfo entry. More... | |
struct | TerminfoString |
Terminal response string (for XTGETTCAP) More... | |
Enumerations | |
enum class | AnsiMode { None = 0 } |
ANSI terminal modes. More... | |
enum class | DecMode { None = 0 , CursorKeysMode = 1 , Select80Or132ColumnMode = 3 , ReverseVideo = 5 , OriginMode = 6 , AutoWrap = 7 , X10Mouse = 9 , CursorEnable = 25 , Allow80Or132ColumnMode = 40 , HorizontalMargins , VT200Mouse = 1000 , CellMotionMouseTracking = 1002 , AllMotionMouseTracking = 1003 , FocusEvent = 1004 , UTF8Mouse = 1005 , SGRMouse = 1006 , AlternateScroll = 1007 , URXVTMouse = 1015 , SGRPixelMouse = 1016 , AlternateScreenBuffer = 1049 , BrackedPaste = 2004 , SynchronizedOutput = 2026 , GraphemeClustering = 2027 , ThemeDetection = 2031 , InBandSizeReports = 2048 } |
DEC private modes. More... | |
enum class | ModeSupport { Unknown = 0 , Set = 1 , Unset = 2 , AlwaysSet = 3 , AlwaysUnset = 4 } |
enum class | SelectionType : u8 { Clipboard , Selection , _0 , _1 , _2 , _3 , _4 , _5 , _6 , _7 , Max } |
Represents the type of selection being modifed by an OSC 52 sequence. More... | |
enum class | AutoWrapMode { Disabled , Enabled } |
Whether or not auto-wrap (DEC mode 7) is enabled. More... | |
enum class | OriginMode { Disabled , Enabled } |
Whether or not origin mode (DEC mode 6) is enabled. More... | |
Functions | |
auto | get_ttx_terminfo () -> Terminfo const & |
auto | lookup_terminfo_string (di::StringView hex_name) -> TerminfoString |
constexpr auto | tag_invoke (di::Tag< di::reflect >, di::InPlaceType< AnsiMode >) |
constexpr auto | tag_invoke (di::Tag< di::reflect >, di::InPlaceType< DecMode >) |
constexpr auto | tag_invoke (di::Tag< di::reflect >, di::InPlaceType< ModeSupport >) |
constexpr auto | tag_invoke (di::Tag< di::reflect >, di::InPlaceType< SelectionType >) |
Variables | |
constexpr auto | narrow_multi_cell_info = MultiCellInfo { 1, 1 } |
constexpr auto | wide_multi_cell_info = MultiCellInfo { 1, 2 } |
constexpr auto | ttx_names |
constexpr auto | ttx_capabilities |
constexpr auto | ttx_terminfo |
constexpr auto | selection_mapping |
constexpr auto | keys |
|
strong |
|
strong |
|
strong |
DEC private modes.
Unless otherwise specified, these modes are documented by xterm here.
Enumerator | |
---|---|
None | |
CursorKeysMode | Enable application cursor keys mode. This controls whether the arrow keys are reported using CSI or SS3 sequences when there are no modifiers. |
Select80Or132ColumnMode | Override the terminal column size to 80 or 132 columns. |
ReverseVideo | Reverse video mode. In ttx, this mode is equivalent to toggling the "inverted" graphics rendition on every cell. |
OriginMode | Cursor origin mode. This controls the interpretation of absolute cursor positions when setting the cursor. When origin mode is enabled, these positions are relative to the top-left scroll margin. Additionally, the cursor cannot move outside of the scroll region. |
AutoWrap | Auto-wrap mode. This controls whether excess text on a line overwrites the last cell or causes a soft line break and moves the cursor to the next line. Its a soft break because resizing the terminal can reflow lines created in this way. |
X10Mouse | X10 (legacy) mouse mode. This mode corresponds to both the X10 mosue reporting mode and X10 mouse event encoding protocol. |
CursorEnable | Cursor enable (toggle cursor visibility) |
Allow80Or132ColumnMode | Allow selecting 80 or 132 column mode. |
HorizontalMargins | Enable setting horizontal margins. This mode appears to be needed as the escape sequence used for horizontal margins (CSI s) originally was used for saving the cursor. Applications should use ESC 7 for that purpose today. |
VT200Mouse | VT 200 mouse events - presses only. |
CellMotionMouseTracking | Cell motion mouse tracking - motion when held only. |
AllMotionMouseTracking | All motion mouse tracking - all mouse events. |
FocusEvent | Focus event mode (enable/disable) |
UTF8Mouse | UTF-8 mouse encoding. |
SGRMouse | SGR mouse encoding. This is the most commonly used mouse encoding. |
AlternateScroll | Translate scrolling into up/down presses. This mode is useful for applications like less which support scrolling but have no reason to process other mouse events. |
URXVTMouse | URXVT mouse encoding. |
SGRPixelMouse | SGR mouse pixel encoding. |
AlternateScreenBuffer | Use alternate screen buffer. xterm specifies additionally modes for the alternate screen buffer, but they aren't needed. This mode additionally saves and restores the cursor which gives it better behavior. |
BrackedPaste | |
SynchronizedOutput | Synchronize screen render with application. This prevents screen tearing by allowing applications to control when the terminal actually renders the screen. Typically, this is enabled at the start of drawing the screen and enabled once drawing is finished. This is specified here. |
GraphemeClustering | Perform grapheme clustering on inputs. Older terminals naively computed the width of individual text by simply summing the result of the For terminals which support this mode, combining characters (within a grapheme cluster, regardless of width) will not advance the cursor. Additionally, variation selector 16 forces a grapheme to have width 2. This behavior is specified here. Depending on the terminal, this mode will either be hard-wired to 1 (contour, wezterm), or configurable (ghostty, foot). Additionally, terminals like kitty do not report supporting this mode but do support grapheme clustering by default. |
ThemeDetection | Enable automatic reports of users dark/light theme preference. This allows an application to subscribe to updates when the user changes their theme preference. The terminal will send special device status report messages whenever this changes. This is specified here. |
InBandSizeReports | Enable automatic reports of the current terminal size. This lets applications bypass the SIGWINCH mechanism and instead directly get size reports whenver the size changes. This is specified here. |
|
strong |
Enumerator | |
---|---|
Unknown | Terminal doesn't know this mode. |
Set | Mode is currently set. |
Unset | Mode is currently unset. |
AlwaysSet | Mode is set, and cannot be modified. |
AlwaysUnset | Mode is unset, and cannot be modified. |
|
strong |
|
strong |
Represents the type of selection being modifed by an OSC 52 sequence.
Enumerator | |
---|---|
Clipboard | Standard user clipboard (default) |
Selection | Primary selection clipboard. |
_0 | Numbered buffers, never forwarded to the outer terminal. |
_1 | |
_2 | |
_3 | |
_4 | |
_5 | |
_6 | |
_7 | |
Max |
auto ttx::terminal::get_ttx_terminfo | ( | ) | -> Terminfo const& |
auto ttx::terminal::lookup_terminfo_string | ( | di::StringView | hex_name | ) | -> TerminfoString |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
inlineconstexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
inlineconstexpr |