23 #include "environment.h" 28 #include "pedigree/native/graphics/Graphics.h" 30 #include <cairo/cairo.h> 32 #define XTERM_MAX_PARAMS 16 37 #define XTERM_WIDE 132 38 #define XTERM_STANDARD 80 39 #define XTERM_MIN_WIDTH 132 49 size_t nHeight,
size_t offsetLeft,
size_t offsetTop,
class Terminal *pT,
51 class Font *pBoldFont);
60 size_t getRows()
const 62 return m_pWindows[0]->m_Height;
64 size_t getCols()
const 66 return m_pWindows[0]->m_Width;
68 size_t getStride()
const 70 return m_pWindows[0]->m_Stride;
82 size_t getModes()
const 93 void setCursorStyle(
bool bFilled)
102 void setCairo(cairo_t *pCairo, cairo_surface_t *pSurface)
105 m_pCairoSurface = pSurface;
108 void setFonts(
Font *pNormalFont,
Font *pBoldFont)
110 m_pNormalFont = pNormalFont;
111 m_pBoldFont = pBoldFont;
123 bool operator==(
const TermChar &other)
const 126 flags == other.flags && fore == other.fore &&
127 back == other.back && utf32 == other.utf32);
129 bool operator!=(
const TermChar &other)
const 132 flags == other.flags && fore == other.fore &&
133 back == other.back && utf32 == other.utf32);
143 size_t nMaxScrollback,
size_t offsetLeft,
size_t offsetTop,
144 size_t fbWidth,
Xterm *parent);
150 void resize(
size_t nRows,
size_t nCols,
bool bActive);
152 void setScrollRegion(
int start,
int end);
153 void setForeColour(uint8_t fgColour);
154 void setBackColour(uint8_t bgColour);
155 void setFlags(uint8_t flags);
158 void setMargins(
size_t left,
size_t right);
160 void setChar(uint32_t utf32,
size_t x,
size_t y);
161 TermChar getChar(
size_t x = ~0UL,
size_t y = ~0UL);
166 void setCursorRelOrigin(
size_t x,
size_t y,
DirtyRectangle &rect);
170 ssize_t getCursorX()
const;
171 ssize_t getCursorY()
const;
175 ssize_t getCursorYRelOrigin()
const;
176 void setCursorStyle(
bool bFilled)
178 m_bCursorFilled = bFilled;
181 void cursorToOrigin();
207 size_t w = ~0UL,
size_t h = ~0UL);
256 void setLineRenderMode(
bool b)
261 bool getLineRenderMode()
263 return m_bLineRender;
273 size_t m_BufferLength;
278 size_t m_Width, m_Height, m_Stride;
280 size_t m_OffsetLeft, m_OffsetTop;
282 size_t m_nMaxScrollback;
283 ssize_t m_CursorX, m_CursorY;
285 ssize_t m_ScrollStart, m_ScrollEnd;
286 ssize_t m_LeftMargin, m_RightMargin;
294 bool m_bCursorFilled;
298 Xterm *m_pParentXterm;
312 int params[XTERM_MAX_PARAMS];
320 std::string params[XTERM_MAX_PARAMS];
332 bool m_bContainedParen;
337 LineFeedNewLine = 0x1,
427 bool setFlagsForUtf32(uint32_t utf32);
450 cairo_surface_t *m_pCairoSurface;
void processKey(uint64_t key)
void write(uint32_t utf32, DirtyRectangle &rect)
Seen a '[' character.
void eraseLine(DirtyRectangle &rect)
ssize_t getCursorXRelOrigin() const
void renderAll(DirtyRectangle &rect)
Seen a '+' character.
uint32_t m_SavedX
Saved cursor position.
void insertLines(size_t n, DirtyRectangle &rect)
void eraseScreen(DirtyRectangle &rect)
Seen a ' ' character.
Seen a '/' character.
char * m_TabStops
Tab stops.
void eraseDown(DirtyRectangle &rect)
Seen a '?' character.
Seen a '.' character.
Seen a '' (ESC) character.
void insertCharacters(size_t n, DirtyRectangle &rect)
Seen a '$' character.
void eraseChars(size_t n, DirtyRectangle &rect)
void eraseUp(DirtyRectangle &rect)
void eraseEOL(DirtyRectangle &rect)
Seen a '-' character.
Seen a '>' character.
size_t m_Modes
Currently active modes.
Seen a ')' character.
size_t m_Flags
Flags for this particular sequence.
VT52: set cursor, waiting for Y.
Seen a '(' character.
Seen a '"' character.
Seen a '!' character.
Seen a '' character.
bool m_bChangingState
Are we currently interpreting a state change?
Set of parameters for the XTerm commands.
void deleteLines(size_t n, DirtyRectangle &rect)
void eraseSOL(DirtyRectangle &rect)
void checkScroll(DirtyRectangle &rect)
Seen a '\'' character.
void deleteCharacters(size_t n, DirtyRectangle &rect)
void checkWrap(DirtyRectangle &rect)
Seen a '\' character.
Seen a '_' character.
Seen a '*' character.
Seen a ']' character.
Seen a '<' character.
VT52: set cursor, waiting for X.