diff options
author | Benjamin Barenblat <bbarenblat@gmail.com> | 2021-12-26 14:17:19 -0500 |
---|---|---|
committer | Benjamin Barenblat <bbarenblat@gmail.com> | 2021-12-26 14:55:35 -0500 |
commit | b819388acc4faa46e296f4e1f173b2cf2be8799f (patch) | |
tree | 5d70c7c64f978055ec4e0ecba38bf7cd85af5a7f /goldfishterm/simple.h | |
parent | 4e2e8f87f9ee7d22d1d1dfcf581694cc9d912afc (diff) |
Hide cursor during redraws
Diffstat (limited to 'goldfishterm/simple.h')
-rw-r--r-- | goldfishterm/simple.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/goldfishterm/simple.h b/goldfishterm/simple.h index 3f5cc9f..48a7789 100644 --- a/goldfishterm/simple.h +++ b/goldfishterm/simple.h @@ -26,6 +26,13 @@ namespace goldfishterm { +// The type of cursor in use. +enum class CursorVisibility { + kInvisible, + kNormal, + kVeryVisible, +}; + // Looks up escape sequences for the terminal described in the TERM environment // variable, and allows sending those escape sequences to standard output. // @@ -58,6 +65,9 @@ class SimpleTerminalOutput final { // Moves the cursor down one line. void CursorDown() { Emit(StringCapability::kCursorDown); } + // Sets the cursor visibility. + void SetCursorVisibility(CursorVisibility); + private: void Emit(StringCapability, std::vector<goldfishterm_internal::StringCapabilityParameter> = {}); |