Let the configure script generate rote{,w}.h
[librote.git] / roteprivate.h
blob3ca4b244941b1a9caba278e995c4366ed743d48f
1 /*
2 LICENSE INFORMATION:
3 This program is free software; you can redistribute it and/or
4 modify it under the terms of the GNU Lesser General Public
5 License (LGPL) as published by the Free Software Foundation.
7 Please refer to the COPYING file for more information.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 Copyright (c) 2004 Bruno T. C. de Oliveira
22 #ifndef btco_ROTE_vtstate_h
23 #define btco_ROTE_vtstate_h
25 #define ESEQ_BUF_SIZE 128 /* size of escape sequence buffer */
26 #define MAX_CUSTOM_ES_HANDLERS 32
28 /* Terminal private data */
29 struct RoteTermPrivate_ {
30 bool escaped; /* whether we are currently reading an
31 * escape sequence */
33 bool graphmode; /* whether terminal is in graphical
34 * character mode or not */
36 int scrolltop, scrollbottom; /* current scrolling region of terminal */
37 int saved_x, saved_y; /* saved cursor position */
39 #ifdef USE_UTF8
40 unsigned char utf8_buffer[6]; /* the buffer for the utf8 sequence */
41 size_t utf8_index; /* the byte index of the utf8 buffer */
42 size_t utf8_length; /* the byte length of the utf8 buffer */
43 #endif
45 char esbuf[ESEQ_BUF_SIZE]; /* 0-terminated string. Does NOT include
46 * the initial escape (\x1B) character. */
47 int esbuf_len; /* length of buffer. The following property
48 * is always kept: esbuf[esbuf_len] == '\0' */
50 int pty; /* file descriptor for the pty attached to
51 * this terminal. -1 if none. */
53 /* custom escape sequence handler */
54 rote_es_handler_t handler;
57 static inline void clear_cell(RoteCell *cell){
58 #ifdef USE_UTF8
59 cell->empty = true;
60 cell->fcount = 1;
61 cell->findex = 0;
62 #endif
63 cell->ch = 0x20; /* a space */
64 cell->attr = 0x70; /* white text, black background */
67 #endif