0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef _LINUX_CONSOLE_STRUCT_H
0014 #define _LINUX_CONSOLE_STRUCT_H
0015
0016 #include <linux/wait.h>
0017 #include <linux/vt.h>
0018 #include <linux/workqueue.h>
0019
0020 struct uni_pagedict;
0021 struct uni_screen;
0022
0023 #define NPAR 16
0024 #define VC_TABSTOPS_COUNT 256U
0025
0026 enum vc_intensity {
0027 VCI_HALF_BRIGHT,
0028 VCI_NORMAL,
0029 VCI_BOLD,
0030 VCI_MASK = 0x3,
0031 };
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046 struct vc_state {
0047 unsigned int x, y;
0048
0049 unsigned char color;
0050
0051 unsigned char Gx_charset[2];
0052 unsigned int charset : 1;
0053
0054
0055 enum vc_intensity intensity;
0056 bool italic;
0057 bool underline;
0058 bool blink;
0059 bool reverse;
0060 };
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094 struct vc_data {
0095 struct tty_port port;
0096
0097 struct vc_state state, saved_state;
0098
0099 unsigned short vc_num;
0100 unsigned int vc_cols;
0101 unsigned int vc_rows;
0102 unsigned int vc_size_row;
0103 unsigned int vc_scan_lines;
0104 unsigned int vc_cell_height;
0105 unsigned long vc_origin;
0106 unsigned long vc_scr_end;
0107 unsigned long vc_visible_origin;
0108 unsigned int vc_top, vc_bottom;
0109 const struct consw *vc_sw;
0110 unsigned short *vc_screenbuf;
0111 unsigned int vc_screenbuf_size;
0112 unsigned char vc_mode;
0113
0114 unsigned char vc_attr;
0115 unsigned char vc_def_color;
0116 unsigned char vc_ulcolor;
0117 unsigned char vc_itcolor;
0118 unsigned char vc_halfcolor;
0119
0120 unsigned int vc_cursor_type;
0121 unsigned short vc_complement_mask;
0122 unsigned short vc_s_complement_mask;
0123 unsigned long vc_pos;
0124
0125 unsigned short vc_hi_font_mask;
0126 struct console_font vc_font;
0127 unsigned short vc_video_erase_char;
0128
0129 unsigned int vc_state;
0130 unsigned int vc_npar,vc_par[NPAR];
0131
0132 struct vt_mode vt_mode;
0133 struct pid *vt_pid;
0134 int vt_newvt;
0135 wait_queue_head_t paste_wait;
0136
0137 unsigned int vc_disp_ctrl : 1;
0138 unsigned int vc_toggle_meta : 1;
0139 unsigned int vc_decscnm : 1;
0140 unsigned int vc_decom : 1;
0141 unsigned int vc_decawm : 1;
0142 unsigned int vc_deccm : 1;
0143 unsigned int vc_decim : 1;
0144
0145 unsigned int vc_priv : 3;
0146 unsigned int vc_need_wrap : 1;
0147 unsigned int vc_can_do_color : 1;
0148 unsigned int vc_report_mouse : 2;
0149 unsigned char vc_utf : 1;
0150 unsigned char vc_utf_count;
0151 int vc_utf_char;
0152 DECLARE_BITMAP(vc_tab_stop, VC_TABSTOPS_COUNT);
0153 unsigned char vc_palette[16*3];
0154 unsigned short * vc_translate;
0155 unsigned int vc_resize_user;
0156 unsigned int vc_bell_pitch;
0157 unsigned int vc_bell_duration;
0158 unsigned short vc_cur_blink_ms;
0159 struct vc_data **vc_display_fg;
0160 struct uni_pagedict *uni_pagedict;
0161 struct uni_pagedict **uni_pagedict_loc;
0162 struct uni_screen *vc_uni_screen;
0163
0164 };
0165
0166 struct vc {
0167 struct vc_data *d;
0168 struct work_struct SAK_work;
0169
0170
0171
0172 };
0173
0174 extern struct vc vc_cons [MAX_NR_CONSOLES];
0175 extern void vc_SAK(struct work_struct *work);
0176
0177 #define CUR_MAKE(size, change, set) ((size) | ((change) << 8) | \
0178 ((set) << 16))
0179 #define CUR_SIZE(c) ((c) & 0x00000f)
0180 # define CUR_DEF 0
0181 # define CUR_NONE 1
0182 # define CUR_UNDERLINE 2
0183 # define CUR_LOWER_THIRD 3
0184 # define CUR_LOWER_HALF 4
0185 # define CUR_TWO_THIRDS 5
0186 # define CUR_BLOCK 6
0187 #define CUR_SW 0x000010
0188 #define CUR_ALWAYS_BG 0x000020
0189 #define CUR_INVERT_FG_BG 0x000040
0190 #define CUR_FG 0x000700
0191 #define CUR_BG 0x007000
0192 #define CUR_CHANGE(c) ((c) & 0x00ff00)
0193 #define CUR_SET(c) (((c) & 0xff0000) >> 8)
0194
0195 bool con_is_visible(const struct vc_data *vc);
0196
0197 #endif