diff options
author | Andreas Kling <kling@serenityos.org> | 2021-02-20 16:07:13 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-20 17:04:46 +0100 |
commit | 75084d3b3fd024db893c1db0b001ca02195d3e84 (patch) | |
tree | 2903ddd442424f9afd2953b5bd80922c165b65a4 /Userland/Libraries/LibVT | |
parent | 6c7c6de52b8a8481a95d58b96af8d6cb94574782 (diff) | |
download | serenity-75084d3b3fd024db893c1db0b001ca02195d3e84.zip |
LibVT: Move control function doc comments to Terminal.h header
Putting the little documentation comment about what each VTxxx control
function does in the header allows them to be picked up by IDE's.
Diffstat (limited to 'Userland/Libraries/LibVT')
-rw-r--r-- | Userland/Libraries/LibVT/Terminal.cpp | 14 | ||||
-rw-r--r-- | Userland/Libraries/LibVT/Terminal.h | 56 |
2 files changed, 46 insertions, 24 deletions
diff --git a/Userland/Libraries/LibVT/Terminal.cpp b/Userland/Libraries/LibVT/Terminal.cpp index c4ee16f6d5..7434c16161 100644 --- a/Userland/Libraries/LibVT/Terminal.cpp +++ b/Userland/Libraries/LibVT/Terminal.cpp @@ -104,19 +104,16 @@ void Terminal::alter_mode(bool should_set, bool question_param, const ParamVecto void Terminal::RM(bool question_param, const ParamVector& params) { - // RM – Reset Mode alter_mode(true, question_param, params); } void Terminal::SM(bool question_param, const ParamVector& params) { - // SM – Set Mode alter_mode(false, question_param, params); } void Terminal::SGR(const ParamVector& params) { - // SGR – Select Graphic Rendition if (params.is_empty()) { m_current_attribute.reset(); return; @@ -250,7 +247,6 @@ void Terminal::escape$t(const ParamVector& params) void Terminal::DECSTBM(const ParamVector& params) { - // DECSTBM – Set Top and Bottom Margins ("Scrolling Region") unsigned top = 1; unsigned bottom = m_rows; if (params.size() >= 1) @@ -280,7 +276,6 @@ void Terminal::CUP(const ParamVector& params) void Terminal::HVP(const ParamVector& params) { - // HVP – Horizontal and Vertical Position unsigned row = 1; unsigned col = 1; if (params.size() >= 1) @@ -292,7 +287,6 @@ void Terminal::HVP(const ParamVector& params) void Terminal::CUU(const ParamVector& params) { - // CUU – Cursor Up int num = 1; if (params.size() >= 1) num = params[0]; @@ -306,7 +300,6 @@ void Terminal::CUU(const ParamVector& params) void Terminal::CUD(const ParamVector& params) { - // CUD – Cursor Down int num = 1; if (params.size() >= 1) num = params[0]; @@ -320,7 +313,6 @@ void Terminal::CUD(const ParamVector& params) void Terminal::CUF(const ParamVector& params) { - // CUF – Cursor Forward int num = 1; if (params.size() >= 1) num = params[0]; @@ -334,7 +326,6 @@ void Terminal::CUF(const ParamVector& params) void Terminal::CUB(const ParamVector& params) { - // CUB – Cursor Backward int num = 1; if (params.size() >= 1) num = params[0]; @@ -421,7 +412,6 @@ void Terminal::EL(const ParamVector& params) void Terminal::ED(const ParamVector& params) { - // ED - Erase in Display int mode = 0; if (params.size() >= 1) mode = params[0]; @@ -498,7 +488,6 @@ void Terminal::escape$L(const ParamVector& params) void Terminal::DA(const ParamVector&) { - // DA - Device Attributes emit_string("\033[?1;0c"); } @@ -770,19 +759,16 @@ void Terminal::put_character_at(unsigned row, unsigned column, u32 code_point) void Terminal::NEL() { - // NEL - Next Line newline(); } void Terminal::IND() { - // IND - Index (move down) CUD({}); } void Terminal::RI() { - // RI - Reverse Index (move up) CUU({}); } diff --git a/Userland/Libraries/LibVT/Terminal.h b/Userland/Libraries/LibVT/Terminal.h index f08687497f..1093ab566a 100644 --- a/Userland/Libraries/LibVT/Terminal.h +++ b/Userland/Libraries/LibVT/Terminal.h @@ -144,19 +144,28 @@ private: void alter_mode(bool should_set, bool question_param, const ParamVector&); + // CUU – Cursor Up void CUU(const ParamVector&); + + // CUD – Cursor Down void CUD(const ParamVector&); + + // CUF – Cursor Forward void CUF(const ParamVector&); + + // CUB – Cursor Backward void CUB(const ParamVector&); + + // CUP - Cursor Position void CUP(const ParamVector&); + + // ED - Erase in Display void ED(const ParamVector&); + + // EL - Erase in Line void EL(const ParamVector&); - void escape$M(const ParamVector&); - void escape$P(const ParamVector&); - void escape$G(const ParamVector&); - void escape$X(const ParamVector&); - void escape$b(const ParamVector&); - void escape$d(const ParamVector&); + + // SGR – Select Graphic Rendition void SGR(const ParamVector&); // Save Current Cursor Position @@ -165,21 +174,48 @@ private: // Restore Saved Cursor Position void SCORC(const ParamVector&); - void escape$t(const ParamVector&); + // DECSTBM – Set Top and Bottom Margins ("Scrolling Region") void DECSTBM(const ParamVector&); - void escape$S(const ParamVector&); - void escape$T(const ParamVector&); - void escape$L(const ParamVector&); + + // RM – Reset Mode void RM(bool question_param, const ParamVector&); + + // SM – Set Mode void SM(bool question_param, const ParamVector&); + + // DA - Device Attributes void DA(const ParamVector&); + + // HVP – Horizontal and Vertical Position void HVP(const ParamVector&); + + // NEL - Next Line void NEL(); + + // IND - Index (move down) void IND(); + + // RI - Reverse Index (move up) void RI(); + + // DSR - Device Status Reports void DSR(const ParamVector&); + + // ICH - Insert Character void ICH(const ParamVector&); + // FIXME: Find the right names for these. + void escape$t(const ParamVector&); + void escape$S(const ParamVector&); + void escape$T(const ParamVector&); + void escape$L(const ParamVector&); + void escape$M(const ParamVector&); + void escape$P(const ParamVector&); + void escape$G(const ParamVector&); + void escape$X(const ParamVector&); + void escape$b(const ParamVector&); + void escape$d(const ParamVector&); + TerminalClient& m_client; size_t m_history_start = 0; |