4 #include <SupportDefs.h>
13 CONSOLE_STATE_NORMAL
= 0,
14 CONSOLE_STATE_GOT_ESCAPE
,
15 CONSOLE_STATE_SEEN_BRACKET
,
16 CONSOLE_STATE_NEW_ARG
,
17 CONSOLE_STATE_PARSING_ARG
,
38 Console(ViewBuffer
*output
);
43 void SetScrollRegion(int top
, int bottom
);
54 void EraseLine(erase_line_mode mode
);
55 void EraseScreen(erase_screen_mode mode
);
57 void SaveCursor(bool save_attrs
);
58 void RestoreCursor(bool restore_attrs
);
59 void UpdateCursor(int x
, int y
);
60 void GotoXY(int new_x
, int new_y
);
62 void PutChar(const char c
);
64 void SetVT100Attributes(int32
*args
, int32 argCount
);
65 bool ProcessVT100Command(const char c
, bool seen_bracket
, int32
*args
, int32 argCount
);
67 void Write(const void *buf
, size_t len
);
70 static void ResizeCallback(int32 width
, int32 height
, void *data
);
80 int32 fX
; // current x coordinate
81 int32 fY
; // current y coordinate
82 int32 fSavedX
; // used to save x and y
85 int32 fScrollTop
; // top of the scroll region
86 int32 fScrollBottom
; // bottom of the scroll region
91 int32 fArgs
[MAX_ARGS
];