Mercurial > hg > xemacs-beta
comparison src/console-tty.h @ 398:74fd4e045ea6 r21-2-29
Import from CVS: tag r21-2-29
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:13:30 +0200 |
parents | 1f50e6fe4f3f |
children | 697ef44129c6 |
comparison
equal
deleted
inserted
replaced
397:f4aeb21a5bad | 398:74fd4e045ea6 |
---|---|
27 Therefore, all stuff for both input and output is lumped into | 27 Therefore, all stuff for both input and output is lumped into |
28 the console structure. If it ever becomes meaningful to | 28 the console structure. If it ever becomes meaningful to |
29 have more than one device on a TTY console, the output stuff | 29 have more than one device on a TTY console, the output stuff |
30 will have to get separated out. */ | 30 will have to get separated out. */ |
31 | 31 |
32 #ifndef _XEMACS_CONSOLE_TTY_H_ | 32 #ifndef INCLUDED_console_tty_h_ |
33 #define _XEMACS_CONSOLE_TTY_H_ | 33 #define INCLUDED_console_tty_h_ |
34 | 34 |
35 #include "console.h" | 35 #include "console.h" |
36 #include "syssignal.h" /* Always include before systty.h */ | 36 #include "syssignal.h" /* Always include before systty.h */ |
37 #include "systty.h" | 37 #include "systty.h" |
38 | 38 |
39 DECLARE_CONSOLE_TYPE (tty); | 39 DECLARE_CONSOLE_TYPE (tty); |
40 | 40 |
41 struct tty_console | 41 struct tty_console |
42 { | 42 { |
43 int infd, outfd; | 43 int infd, outfd; |
44 #ifdef HAVE_GPM | |
45 int mouse_fd; | |
46 #endif | |
47 Lisp_Object instream, outstream; | 44 Lisp_Object instream, outstream; |
48 Lisp_Object terminal_type; | 45 Lisp_Object terminal_type; |
49 Lisp_Object controlling_process; | 46 Lisp_Object controlling_process; |
50 char *term_entry_buffer; | 47 char *term_entry_buffer; |
51 | 48 |
94 /* cursor motion entries - each entry is commented with the terminfo | 91 /* cursor motion entries - each entry is commented with the terminfo |
95 and the termcap entry */ | 92 and the termcap entry */ |
96 struct | 93 struct |
97 { | 94 { |
98 /* local cursor movement */ | 95 /* local cursor movement */ |
99 CONST char *up; /* cuu1, up */ | 96 const char *up; /* cuu1, up */ |
100 CONST char *down; /* cud1, do */ | 97 const char *down; /* cud1, do */ |
101 CONST char *left; /* cub1, le */ | 98 const char *left; /* cub1, le */ |
102 CONST char *right; /* cuf1, nd */ | 99 const char *right; /* cuf1, nd */ |
103 CONST char *home; /* home, ho */ | 100 const char *home; /* home, ho */ |
104 CONST char *low_left; /* ll, ll */ | 101 const char *low_left; /* ll, ll */ |
105 CONST char *car_return; /* cr, cr */ | 102 const char *car_return; /* cr, cr */ |
106 | 103 |
107 /* parameterized local cursor movement */ | 104 /* parameterized local cursor movement */ |
108 CONST char *multi_up; /* cuu, UP */ | 105 const char *multi_up; /* cuu, UP */ |
109 CONST char *multi_down; /* cud, DO */ | 106 const char *multi_down; /* cud, DO */ |
110 CONST char *multi_left; /* cub, LE */ | 107 const char *multi_left; /* cub, LE */ |
111 CONST char *multi_right; /* cuf, RI */ | 108 const char *multi_right; /* cuf, RI */ |
112 | 109 |
113 /* absolute cursor motion */ | 110 /* absolute cursor motion */ |
114 CONST char *abs; /* cup, cm */ | 111 const char *abs; /* cup, cm */ |
115 CONST char *hor_abs; /* hpa, ch */ | 112 const char *hor_abs; /* hpa, ch */ |
116 CONST char *ver_abs; /* vpa, cv */ | 113 const char *ver_abs; /* vpa, cv */ |
117 | 114 |
118 /* scrolling */ | 115 /* scrolling */ |
119 CONST char *scroll_forw; /* ind, sf */ | 116 const char *scroll_forw; /* ind, sf */ |
120 CONST char *scroll_back; /* ri, sr */ | 117 const char *scroll_back; /* ri, sr */ |
121 CONST char *multi_scroll_forw; /* indn, SF */ | 118 const char *multi_scroll_forw; /* indn, SF */ |
122 CONST char *multi_scroll_back; /* rin, SR */ | 119 const char *multi_scroll_back; /* rin, SR */ |
123 CONST char *set_scroll_region; /* csr, cs */ | 120 const char *set_scroll_region; /* csr, cs */ |
124 } cm; | 121 } cm; |
125 | 122 |
126 /* screen editing entries - each entry is commented with the | 123 /* screen editing entries - each entry is commented with the |
127 terminfo and the termcap entry */ | 124 terminfo and the termcap entry */ |
128 struct | 125 struct |
129 { | 126 { |
130 /* adding to the screen */ | 127 /* adding to the screen */ |
131 CONST char *ins_line; /* il1, al */ | 128 const char *ins_line; /* il1, al */ |
132 CONST char *multi_ins_line; /* il, AL */ | 129 const char *multi_ins_line; /* il, AL */ |
133 CONST char *repeat; /* rep, rp */ | 130 const char *repeat; /* rep, rp */ |
134 CONST char *begin_ins_mode; /* smir, im */ | 131 const char *begin_ins_mode; /* smir, im */ |
135 CONST char *end_ins_mode; /* rmir, ei */ | 132 const char *end_ins_mode; /* rmir, ei */ |
136 CONST char *ins_char; /* ich1, ic */ | 133 const char *ins_char; /* ich1, ic */ |
137 CONST char *multi_ins_char; /* ich, IC */ | 134 const char *multi_ins_char; /* ich, IC */ |
138 CONST char *insert_pad; /* ip, ip */ | 135 const char *insert_pad; /* ip, ip */ |
139 | 136 |
140 /* deleting from the screen */ | 137 /* deleting from the screen */ |
141 CONST char *clr_frame; /* clear, cl */ | 138 const char *clr_frame; /* clear, cl */ |
142 CONST char *clr_from_cursor; /* ed, cd */ | 139 const char *clr_from_cursor; /* ed, cd */ |
143 CONST char *clr_to_eol; /* el, ce */ | 140 const char *clr_to_eol; /* el, ce */ |
144 CONST char *del_line; /* dl1, dl */ | 141 const char *del_line; /* dl1, dl */ |
145 CONST char *multi_del_line; /* dl, DL */ | 142 const char *multi_del_line; /* dl, DL */ |
146 CONST char *del_char; /* dch1, dc */ | 143 const char *del_char; /* dch1, dc */ |
147 CONST char *multi_del_char; /* dch, DC */ | 144 const char *multi_del_char; /* dch, DC */ |
148 CONST char *begin_del_mode; /* smdc, dm */ | 145 const char *begin_del_mode; /* smdc, dm */ |
149 CONST char *end_del_mode; /* rmdc, ed */ | 146 const char *end_del_mode; /* rmdc, ed */ |
150 CONST char *erase_at_cursor; /* ech, ec */ | 147 const char *erase_at_cursor; /* ech, ec */ |
151 } se; | 148 } se; |
152 | 149 |
153 /* screen display entries - each entry is commented with the | 150 /* screen display entries - each entry is commented with the |
154 terminfo and termcap entry */ | 151 terminfo and termcap entry */ |
155 struct | 152 struct |
156 { | 153 { |
157 CONST char *begin_standout; /* smso, so */ | 154 const char *begin_standout; /* smso, so */ |
158 CONST char *end_standout; /* rmso, se */ | 155 const char *end_standout; /* rmso, se */ |
159 CONST char *begin_underline; /* smul, us */ | 156 const char *begin_underline; /* smul, us */ |
160 CONST char *end_underline; /* rmul, ue */ | 157 const char *end_underline; /* rmul, ue */ |
161 CONST char *begin_alternate; /* smacs, as */ | 158 const char *begin_alternate; /* smacs, as */ |
162 CONST char *end_alternate; /* rmacs, ae */ | 159 const char *end_alternate; /* rmacs, ae */ |
163 | 160 |
164 CONST char *turn_on_reverse; /* rev, mr */ | 161 const char *turn_on_reverse; /* rev, mr */ |
165 CONST char *turn_on_blinking; /* blink, mb */ | 162 const char *turn_on_blinking; /* blink, mb */ |
166 CONST char *turn_on_bold; /* bold, md */ | 163 const char *turn_on_bold; /* bold, md */ |
167 CONST char *turn_on_dim; /* dim, mh */ | 164 const char *turn_on_dim; /* dim, mh */ |
168 CONST char *turn_off_attributes; /* sgr0, me */ | 165 const char *turn_off_attributes; /* sgr0, me */ |
169 | 166 |
170 CONST char *visual_bell; /* flash, vb */ | 167 const char *visual_bell; /* flash, vb */ |
171 CONST char *audio_bell; /* bel, bl */ | 168 const char *audio_bell; /* bel, bl */ |
172 | 169 |
173 CONST char *cursor_visible; /* cvvis, vs */ | 170 const char *cursor_visible; /* cvvis, vs */ |
174 CONST char *cursor_normal; /* cnorm, ve */ | 171 const char *cursor_normal; /* cnorm, ve */ |
175 CONST char *init_motion; /* smcup, ti */ | 172 const char *init_motion; /* smcup, ti */ |
176 CONST char *end_motion; /* rmcup, te */ | 173 const char *end_motion; /* rmcup, te */ |
177 CONST char *keypad_on; /* smkx, ks */ | 174 const char *keypad_on; /* smkx, ks */ |
178 CONST char *keypad_off; /* rmkx, ke */ | 175 const char *keypad_off; /* rmkx, ke */ |
179 | 176 |
180 CONST char *orig_pair; /* op, op */ | 177 const char *orig_pair; /* op, op */ |
181 } sd; | 178 } sd; |
182 | 179 |
183 /* costs of various operations */ | 180 /* costs of various operations */ |
184 struct | 181 struct |
185 { | 182 { |
201 /* Is this TTY our controlling terminal? */ | 198 /* Is this TTY our controlling terminal? */ |
202 unsigned int controlling_terminal :1; | 199 unsigned int controlling_terminal :1; |
203 unsigned int is_stdio :1; | 200 unsigned int is_stdio :1; |
204 }; | 201 }; |
205 | 202 |
206 #ifdef HAVE_GPM | |
207 #define CONSOLE_TTY_MOUSE_FD(c) (CONSOLE_TTY_DATA (c)->mouse_fd) | |
208 #endif | |
209 #define CONSOLE_TTY_DATA(c) CONSOLE_TYPE_DATA (c, tty) | 203 #define CONSOLE_TTY_DATA(c) CONSOLE_TYPE_DATA (c, tty) |
210 #define CONSOLE_TTY_CURSOR_X(c) (CONSOLE_TTY_DATA (c)->cursor_x) | 204 #define CONSOLE_TTY_CURSOR_X(c) (CONSOLE_TTY_DATA (c)->cursor_x) |
211 #define CONSOLE_TTY_CURSOR_Y(c) (CONSOLE_TTY_DATA (c)->cursor_y) | 205 #define CONSOLE_TTY_CURSOR_Y(c) (CONSOLE_TTY_DATA (c)->cursor_y) |
212 #define CONSOLE_TTY_REAL_CURSOR_X(c) (CONSOLE_TTY_DATA (c)->real_cursor_x) | 206 #define CONSOLE_TTY_REAL_CURSOR_X(c) (CONSOLE_TTY_DATA (c)->real_cursor_x) |
213 #define CONSOLE_TTY_REAL_CURSOR_Y(c) (CONSOLE_TTY_DATA (c)->real_cursor_y) | 207 #define CONSOLE_TTY_REAL_CURSOR_Y(c) (CONSOLE_TTY_DATA (c)->real_cursor_y) |
293 Error_behavior errb); | 287 Error_behavior errb); |
294 Lisp_Object tty_canonicalize_device_connection (Lisp_Object connection, | 288 Lisp_Object tty_canonicalize_device_connection (Lisp_Object connection, |
295 Error_behavior errb); | 289 Error_behavior errb); |
296 struct console * tty_find_console_from_fd (int fd); | 290 struct console * tty_find_console_from_fd (int fd); |
297 | 291 |
298 #endif /* _XEMACS_CONSOLE_TTY_H_ */ | 292 #endif /* INCLUDED_console_tty_h_ */ |