1 #ifndef btco_ROTE_vtstate_h
2 #define btco_ROTE_vtstate_h
4 #define ESEQ_BUF_SIZE 128 /* size of escape sequence buffer */
5 #define MAX_CUSTOM_ES_HANDLERS 32
7 /* Terminal private data */
8 struct RoteTermPrivate_ {
9 bool escaped; /* whether we are currently reading an
12 bool graphmode; /* whether terminal is in graphical
13 * character mode or not */
15 int scrolltop, scrollbottom; /* current scrolling region of terminal */
16 int saved_x, saved_y; /* saved cursor position */
18 char esbuf[ESEQ_BUF_SIZE]; /* 0-terminated string. Does NOT include
19 * the initial escape (\x1B) character. */
20 int esbuf_len; /* length of buffer. The following property
21 * is always kept: esbuf[esbuf_len] == '\0' */
23 int pty; /* file descriptor for the pty attached to
24 * this terminal. -1 if none. */
26 /* custom escape sequence handler */
27 rote_es_handler_t handler;