chiark / gitweb /
*** empty log message ***
[sympathy.git] / src / vt102.h
1 /*
2  * vt102.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/06 11:30:37  james
16  * *** empty log message ***
17  *
18  * Revision 1.3  2008/02/04 20:23:55  james
19  * *** empty log message ***
20  *
21  * Revision 1.2  2008/02/04 02:05:06  james
22  * *** empty log message ***
23  *
24  * Revision 1.1  2008/02/03 23:36:41  james
25  * *** empty log message ***
26  *
27  */
28
29 #ifndef __VT102_H__
30 #define __VT102_H__
31
32 #define VT102_CSI_LEN 128
33
34 #define VT102_ROWS              24
35 #define VT102_COLS              80
36 #define VT102_STATUS_ROW        24
37
38 #define VT102_NMODES            32
39
40 typedef struct
41 {
42   int in_escape;
43   int in_csi;
44   int csi_ptr;
45   char csi_buf[VT102_CSI_LEN];
46 } VT102_parser;
47
48 typedef struct
49 {
50   CRT_Pos top_margin, bottom_margin;
51   CRT_Pos screen_start, screen_end;
52   VT102_parser parser;
53   int attr;
54   CRT crt;
55   CRT_Pos pos;
56
57   uint8_t modes[VT102_NMODES];
58   uint8_t private_modes[VT102_NMODES];
59 } VT102;
60
61 #define VT102_PRIVATE_MODE_CURSOR_MODE          1
62 #define VT102_PRIVATE_MODE_VT52                 2
63 #define VT102_PRIVATE_MODE_132COLS              3
64 #define VT102_PRIVATE_MODE_SMOOTH_SCROLL        4
65 #define VT102_PRIVATE_MODE_REVERSE_SCREEN       5
66 #define VT102_PRIVATE_MODE_ORIGIN_MODE          6
67 #define VT102_PRIVATE_MODE_AUTO_WRAP            7
68 #define VT102_PRIVATE_MODE_AUTO_REPEAT          8
69
70 #define VT102_MODE_KEYBOARD_DISABLE             2
71 #define VT102_MODE_INSERT                       4
72 #define VT102_PRIVATE_MODE_LOCAL_ECHO_OFF       12
73 #define VT102_MODE_NEWLINE_MODE                 20
74
75 #endif /* __VT102_H__ */