summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibVT/TerminalWidget.h
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2021-05-24 09:36:41 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-24 11:27:58 +0200
commit875a2cbb7150b036af343364a8bf2d07a97dd03d (patch)
treed87934aaf9c68fcb188b5bdd541ab3cf4ef8ccf5 /Userland/Libraries/LibVT/TerminalWidget.h
parent7dfc804d7d749203974fde1687b9c9c4d6442cea (diff)
downloadserenity-875a2cbb7150b036af343364a8bf2d07a97dd03d.zip
LibVT+Kernel: Add support for setting cursor styles
This commit introduces support for 3 new escape sequences: 1. Stop blinking cursor mode 2. `DECTCEM` mode (enable/disable cursor) 3. `DECSCUSR` (set cursor style) `TerminalWidget` now supports the following cursor types: block, underline and vertical bar. Each of these can blink or be steady. `VirtualConsole` ignores these (just as we were doing before).
Diffstat (limited to 'Userland/Libraries/LibVT/TerminalWidget.h')
-rw-r--r--Userland/Libraries/LibVT/TerminalWidget.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibVT/TerminalWidget.h b/Userland/Libraries/LibVT/TerminalWidget.h
index 81455da489..8e1e2fc790 100644
--- a/Userland/Libraries/LibVT/TerminalWidget.h
+++ b/Userland/Libraries/LibVT/TerminalWidget.h
@@ -114,6 +114,7 @@ private:
virtual void terminal_did_resize(u16 columns, u16 rows) override;
virtual void terminal_history_changed() override;
virtual void emit(const u8*, size_t) override;
+ virtual void set_cursor_style(CursorStyle) override;
void set_logical_focus(bool);
@@ -173,6 +174,8 @@ private:
bool m_cursor_blink_state { true };
bool m_automatic_size_policy { false };
+ VT::CursorStyle m_cursor_style { BlinkingBlock };
+
enum class AutoScrollDirection {
None,
Up,