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.5  2008/02/07 12:16:04  james
16  * *** empty log message ***
17  *
18  * Revision 1.4  2008/02/07 00:43:27  james
19  * *** empty log message ***
20  *
21  * Revision 1.3  2008/02/07 00:39:13  james
22  * *** empty log message ***
23  *
24  * Revision 1.2  2008/02/06 11:30:37  james
25  * *** empty log message ***
26  *
27  * Revision 1.1  2008/02/03 23:31:25  james
28  * *** empty log message ***
29  *
30  */
31
32 #ifndef __ANSI_H__
33 #define __ANSI_H__
34
35 #define ANSI_INVAL -1
36
37 #define ANSI_ESCAPE_BUF_LEN 10
38 #define ANSI_ESCAPE_TIMEOUT     100000 /*in ms */
39
40 typedef struct
41 {
42   int in_escape;
43   struct timeval last_escape;
44   char escape_buf[ANSI_ESCAPE_BUF_LEN];
45   int escape_ptr;
46 } ANSI_Parser;
47
48 typedef struct
49 {
50   int fd;
51
52   CRT crt;
53   CRT_Pos pos;
54   CRT_Pos size;
55   int hide_cursor;
56   int attr;
57   int color;
58
59   ANSI_Parser parser;
60 } ANSI;
61
62
63 #endif /* __ANSI_H__ */