1
2
3
4
5
6
7
8
9
10
11
12
13 #ifndef _LINUX_CONSOLE_STRUCT_H
14 #define _LINUX_CONSOLE_STRUCT_H
15
16 #include <linux/wait.h>
17 #include <linux/vt.h>
18 #include <linux/workqueue.h>
19
20 struct uni_pagedir;
21 struct uni_screen;
22
23 #define NPAR 16
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57 struct vc_data {
58 struct tty_port port;
59
60 unsigned short vc_num;
61 unsigned int vc_cols;
62 unsigned int vc_rows;
63 unsigned int vc_size_row;
64 unsigned int vc_scan_lines;
65 unsigned long vc_origin;
66 unsigned long vc_scr_end;
67 unsigned long vc_visible_origin;
68 unsigned int vc_top, vc_bottom;
69 const struct consw *vc_sw;
70 unsigned short *vc_screenbuf;
71 unsigned int vc_screenbuf_size;
72 unsigned char vc_mode;
73
74 unsigned char vc_attr;
75 unsigned char vc_def_color;
76 unsigned char vc_color;
77 unsigned char vc_s_color;
78 unsigned char vc_ulcolor;
79 unsigned char vc_itcolor;
80 unsigned char vc_halfcolor;
81
82 unsigned int vc_cursor_type;
83 unsigned short vc_complement_mask;
84 unsigned short vc_s_complement_mask;
85 unsigned int vc_x, vc_y;
86 unsigned int vc_saved_x, vc_saved_y;
87 unsigned long vc_pos;
88
89 unsigned short vc_hi_font_mask;
90 struct console_font vc_font;
91 unsigned short vc_video_erase_char;
92
93 unsigned int vc_state;
94 unsigned int vc_npar,vc_par[NPAR];
95
96 struct vt_mode vt_mode;
97 struct pid *vt_pid;
98 int vt_newvt;
99 wait_queue_head_t paste_wait;
100
101 unsigned int vc_charset : 1;
102 unsigned int vc_s_charset : 1;
103 unsigned int vc_disp_ctrl : 1;
104 unsigned int vc_toggle_meta : 1;
105 unsigned int vc_decscnm : 1;
106 unsigned int vc_decom : 1;
107 unsigned int vc_decawm : 1;
108 unsigned int vc_deccm : 1;
109 unsigned int vc_decim : 1;
110
111 unsigned int vc_intensity : 2;
112 unsigned int vc_italic:1;
113 unsigned int vc_underline : 1;
114 unsigned int vc_blink : 1;
115 unsigned int vc_reverse : 1;
116 unsigned int vc_s_intensity : 2;
117 unsigned int vc_s_italic:1;
118 unsigned int vc_s_underline : 1;
119 unsigned int vc_s_blink : 1;
120 unsigned int vc_s_reverse : 1;
121
122 unsigned int vc_priv : 3;
123 unsigned int vc_need_wrap : 1;
124 unsigned int vc_can_do_color : 1;
125 unsigned int vc_report_mouse : 2;
126 unsigned char vc_utf : 1;
127 unsigned char vc_utf_count;
128 int vc_utf_char;
129 unsigned int vc_tab_stop[8];
130 unsigned char vc_palette[16*3];
131 unsigned short * vc_translate;
132 unsigned char vc_G0_charset;
133 unsigned char vc_G1_charset;
134 unsigned char vc_saved_G0;
135 unsigned char vc_saved_G1;
136 unsigned int vc_resize_user;
137 unsigned int vc_bell_pitch;
138 unsigned int vc_bell_duration;
139 unsigned short vc_cur_blink_ms;
140 struct vc_data **vc_display_fg;
141 struct uni_pagedir *vc_uni_pagedir;
142 struct uni_pagedir **vc_uni_pagedir_loc;
143 struct uni_screen *vc_uni_screen;
144
145 };
146
147 struct vc {
148 struct vc_data *d;
149 struct work_struct SAK_work;
150
151
152
153
154 };
155
156 extern struct vc vc_cons [MAX_NR_CONSOLES];
157 extern void vc_SAK(struct work_struct *work);
158
159 #define CUR_DEF 0
160 #define CUR_NONE 1
161 #define CUR_UNDERLINE 2
162 #define CUR_LOWER_THIRD 3
163 #define CUR_LOWER_HALF 4
164 #define CUR_TWO_THIRDS 5
165 #define CUR_BLOCK 6
166 #define CUR_HWMASK 0x0f
167 #define CUR_SWMASK 0xfff0
168
169 #define CUR_DEFAULT CUR_UNDERLINE
170
171 bool con_is_visible(const struct vc_data *vc);
172
173 #endif