mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:47:36 +00:00
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.
This commit is contained in:
parent
6c7c6de52b
commit
75084d3b3f
2 changed files with 52 additions and 30 deletions
|
@ -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({});
|
||||
}
|
||||
|
||||
|
|
|
@ -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,20 +174,47 @@ 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&);
|
||||
|
||||
// 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 RM(bool question_param, const ParamVector&);
|
||||
void SM(bool question_param, const ParamVector&);
|
||||
void DA(const ParamVector&);
|
||||
void HVP(const ParamVector&);
|
||||
void NEL();
|
||||
void IND();
|
||||
void RI();
|
||||
void DSR(const ParamVector&);
|
||||
void ICH(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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue