chiark / gitweb /
*** empty log message ***
[sympathy.git] / src / ansi.h
1 /*
2  * ansi.h:
3  *
4  * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
5  * All rights reserved.
6  *
7  */
8
9 /*
10  * $Id$
11  */
12
13 /*
14  * $Log$
15  * Revision 1.4  2008/02/07 00:43:27  james
16  * *** empty log message ***
17  *
18  * Revision 1.3  2008/02/07 00:39:13  james
19  * *** empty log message ***
20  *
21  * Revision 1.2  2008/02/06 11:30:37  james
22  * *** empty log message ***
23  *
24  * Revision 1.1  2008/02/03 23:31:25  james
25  * *** empty log message ***
26  *
27  */
28
29 #ifndef __ANSI_H__
30 #define __ANSI_H__
31
32 #define ANSI_INVAL -1
33
34 #define ANSI_ESCAPE_BUF_LEN 10
35 #define ANSI_ESCAPE_TIMEOUT     100000 /*in ms */
36
37 typedef struct
38 {
39   int in_escape;
40   struct timeval last_escape;
41   char escape_buf[ANSI_ESCAPE_BUF_LEN];
42   int escape_ptr;
43 } ANSI_Parser;
44
45 typedef struct
46 {
47   int fd;
48
49   CRT crt;
50   CRT_Pos pos;
51   CRT_Pos size;
52   int hide_cursor;
53   int attr;
54
55   ANSI_Parser parser;
56 } ANSI;
57
58
59 #endif /* __ANSI_H__ */