use my nice build system rather than custom makefiles
[apps/madtty.git] / madtty / roteprivate.h
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.
6
7     Please refer to the COPYING file for more information.
8
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.
13
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
17
18     Copyright © 2004 Bruno T. C. de Oliveira
19     Copyright © 2006 Pierre Habouzit
20  */
21
22 #ifndef btco_ROTE_vtstate_h
23 #define btco_ROTE_vtstate_h
24
25 #define ESEQ_BUF_SIZE 128  /* size of escape sequence buffer */
26 #define MAX_CUSTOM_ES_HANDLERS 32
27
28 /* Terminal private data */
29 struct RoteTermPrivate_ {
30    bool escaped;              /* whether we are currently reading an
31                                * escape sequence */
32
33    bool graphmode;            /* whether terminal is in graphical 
34                                * character mode or not */
35
36    int scrolltop, scrollbottom;  /* current scrolling region of terminal */
37    int saved_x, saved_y;         /* saved cursor position */
38
39    char esbuf[ESEQ_BUF_SIZE]; /* 0-terminated string. Does NOT include
40                                * the initial escape (\x1B) character. */
41    int esbuf_len;             /* length of buffer. The following property
42                                * is always kept: esbuf[esbuf_len] == '\0' */
43
44    int pty;                   /* file descriptor for the pty attached to
45                                * this terminal. -1 if none. */
46
47    /* custom escape sequence handler */
48    rote_es_handler_t handler;
49 };
50
51 #endif
52