ALSA: ASoC: Sort Kconfig and Makefile entries for codecs
[zen-stable.git] / include / linux / console_struct.h
blobb03f80a078bee4f8d822dd90fc73545def4adcce
1 /*
2 * console_struct.h
4 * Data structure describing single virtual console except for data
5 * used by vt.c.
7 * Fields marked with [#] must be set by the low-level driver.
8 * Fields marked with [!] can be changed by the low-level driver
9 * to achieve effects such as fast scrolling by changing the origin.
12 #ifndef _LINUX_CONSOLE_STRUCT_H
13 #define _LINUX_CONSOLE_STRUCT_H
15 #include <linux/wait.h>
16 #include <linux/vt.h>
17 #include <linux/workqueue.h>
19 struct vt_struct;
21 #define NPAR 16
23 struct vc_data {
24 unsigned short vc_num; /* Console number */
25 unsigned int vc_cols; /* [#] Console size */
26 unsigned int vc_rows;
27 unsigned int vc_size_row; /* Bytes per row */
28 unsigned int vc_scan_lines; /* # of scan lines */
29 unsigned long vc_origin; /* [!] Start of real screen */
30 unsigned long vc_scr_end; /* [!] End of real screen */
31 unsigned long vc_visible_origin; /* [!] Top of visible window */
32 unsigned int vc_top, vc_bottom; /* Scrolling region */
33 const struct consw *vc_sw;
34 unsigned short *vc_screenbuf; /* In-memory character/attribute buffer */
35 unsigned int vc_screenbuf_size;
36 unsigned char vc_mode; /* KD_TEXT, ... */
37 /* attributes for all characters on screen */
38 unsigned char vc_attr; /* Current attributes */
39 unsigned char vc_def_color; /* Default colors */
40 unsigned char vc_color; /* Foreground & background */
41 unsigned char vc_s_color; /* Saved foreground & background */
42 unsigned char vc_ulcolor; /* Color for underline mode */
43 unsigned char vc_itcolor;
44 unsigned char vc_halfcolor; /* Color for half intensity mode */
45 /* cursor */
46 unsigned int vc_cursor_type;
47 unsigned short vc_complement_mask; /* [#] Xor mask for mouse pointer */
48 unsigned short vc_s_complement_mask; /* Saved mouse pointer mask */
49 unsigned int vc_x, vc_y; /* Cursor position */
50 unsigned int vc_saved_x, vc_saved_y;
51 unsigned long vc_pos; /* Cursor address */
52 /* fonts */
53 unsigned short vc_hi_font_mask; /* [#] Attribute set for upper 256 chars of font or 0 if not supported */
54 struct console_font vc_font; /* Current VC font set */
55 unsigned short vc_video_erase_char; /* Background erase character */
56 unsigned short vc_scrl_erase_char; /* Erase character for scroll */
57 /* VT terminal data */
58 unsigned int vc_state; /* Escape sequence parser state */
59 unsigned int vc_npar,vc_par[NPAR]; /* Parameters of current escape sequence */
60 struct tty_struct *vc_tty; /* TTY we are attached to */
61 /* data for manual vt switching */
62 struct vt_mode vt_mode;
63 struct pid *vt_pid;
64 int vt_newvt;
65 wait_queue_head_t paste_wait;
66 /* mode flags */
67 unsigned int vc_charset : 1; /* Character set G0 / G1 */
68 unsigned int vc_s_charset : 1; /* Saved character set */
69 unsigned int vc_disp_ctrl : 1; /* Display chars < 32? */
70 unsigned int vc_toggle_meta : 1; /* Toggle high bit? */
71 unsigned int vc_decscnm : 1; /* Screen Mode */
72 unsigned int vc_decom : 1; /* Origin Mode */
73 unsigned int vc_decawm : 1; /* Autowrap Mode */
74 unsigned int vc_deccm : 1; /* Cursor Visible */
75 unsigned int vc_decim : 1; /* Insert Mode */
76 unsigned int vc_deccolm : 1; /* 80/132 Column Mode */
77 /* attribute flags */
78 unsigned int vc_intensity : 2; /* 0=half-bright, 1=normal, 2=bold */
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; /* saved rendition */
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 /* misc */
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 int vc_kmalloced : 1;
94 unsigned char vc_utf : 1; /* Unicode UTF-8 encoding */
95 unsigned char vc_utf_count;
96 int vc_utf_char;
97 unsigned int vc_tab_stop[8]; /* Tab stops. 256 columns. */
98 unsigned char vc_palette[16*3]; /* Colour palette for VGA+ */
99 unsigned short * vc_translate;
100 unsigned char vc_G0_charset;
101 unsigned char vc_G1_charset;
102 unsigned char vc_saved_G0;
103 unsigned char vc_saved_G1;
104 unsigned int vc_resize_user; /* resize request from user */
105 unsigned int vc_bell_pitch; /* Console bell pitch */
106 unsigned int vc_bell_duration; /* Console bell duration */
107 struct vc_data **vc_display_fg; /* [!] Ptr to var holding fg console for this display */
108 unsigned long vc_uni_pagedir;
109 unsigned long *vc_uni_pagedir_loc; /* [!] Location of uni_pagedir variable for this console */
110 /* additional information is in vt_kern.h */
113 struct vc {
114 struct vc_data *d;
115 struct work_struct SAK_work;
117 /* might add scrmem, vt_struct, kbd at some time,
118 to have everything in one place - the disadvantage
119 would be that vc_cons etc can no longer be static */
122 extern struct vc vc_cons [MAX_NR_CONSOLES];
123 extern void vc_SAK(struct work_struct *work);
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
135 #define CUR_DEFAULT CUR_UNDERLINE
137 #define CON_IS_VISIBLE(conp) (*conp->vc_display_fg == conp)
139 #endif /* _LINUX_CONSOLE_STRUCT_H */