diff options
Diffstat (limited to 'tui.jai')
| -rw-r--r-- | tui.jai | 24 |
1 files changed, 20 insertions, 4 deletions
@@ -12,6 +12,16 @@ Drawings :: struct { TeeB :: "\x76"; TeeT :: "\x77"; LineV :: "\x78"; + + Blank :: "\x5F"; + Diamond :: "\x60"; + Checkerboard :: "\x61"; + PlusMinus :: "\x67"; + LessThanOrEqual :: "\x79"; + GreaterThanOrEqual :: "\x7A"; + Pi :: "\x7B"; + NotEqual :: "\x7C"; + CenteredDot :: "\x7E"; } Commands :: struct { @@ -21,6 +31,11 @@ Commands :: struct { EnterDrawingMode :: "\e(0"; EnterNormalMode :: "\e(B"; ClearScreen :: "\e[2J"; + ClearLine :: "\e[2K"; + + RefreshWindow :: "\e[7t"; // TODO Not yet tested. + + SetUTF8 :: "\e%G"; // TODO TEST ME PLEASE // Cursor Visibility ShowCursor :: "\e[?25h"; @@ -44,21 +59,22 @@ Commands :: struct { CursorNormalMode :: "\e[?1l"; // Query State - QueryCursorPos :: "\e[6n"; // Emits the cursor position as: ESC [ <r> ; <c> R Where <r> = row and <c> = column. + QueryCursorPosition :: "\e[6n"; // Emits the cursor position as: "ESC [ <r> ; <c> R" Where <r> = row and <c> = column. QueryDeviceAttributes :: "\e[0c"; + QueryWindowSizeInChars :: "\e[18t"; // Emits the window size as: "ESC [ 8 <r> ; <c> t" Where <r> = row and <c> = column. + } start :: () { - write_string(Commands.EnterAlternateBuffer); + write_strings(Commands.EnterAlternateBuffer, Commands.SetUTF8, Commands.HideCursor); } stop :: () { - write_string(Commands.EnterMainBuffer); + write_strings(Commands.EnterMainBuffer, Commands.ShowCursor); } draw_box :: (x: int, y: int, width: int, height: int, to_standard_error := false) { - write_string(Commands.HideCursor); write_strings( // Commands.EnterNormalMode, Commands.EnterDrawingMode, |
