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