The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | **************************************************************************** |
| 11 | ****************************************************************************/ |
| 12 | #include <linux/wait.h> |
| 13 | #include <linux/vt.h> |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 14 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 15 | struct vt_struct; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 16 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 17 | #define NPAR 16 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 18 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 19 | struct vc_data { |
| 20 | unsigned short vc_num; |
| 21 | unsigned int vc_cols; |
| 22 | unsigned int vc_rows; |
| 23 | unsigned int vc_size_row; |
| 24 | unsigned int vc_scan_lines; |
| 25 | unsigned long vc_origin; |
| 26 | unsigned long vc_scr_end; |
| 27 | unsigned long vc_visible_origin; |
| 28 | unsigned int vc_top, vc_bottom; |
| 29 | const struct consw *vc_sw; |
| 30 | unsigned short *vc_screenbuf; |
| 31 | unsigned int vc_screenbuf_size; |
| 32 | unsigned char vc_mode; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 33 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 34 | unsigned char vc_attr; |
| 35 | unsigned char vc_def_color; |
| 36 | unsigned char vc_color; |
| 37 | unsigned char vc_s_color; |
| 38 | unsigned char vc_ulcolor; |
| 39 | unsigned char vc_halfcolor; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 40 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 41 | unsigned int vc_cursor_type; |
| 42 | unsigned short vc_complement_mask; |
| 43 | unsigned short vc_s_complement_mask; |
| 44 | unsigned int vc_x, vc_y; |
| 45 | unsigned int vc_saved_x, vc_saved_y; |
| 46 | unsigned long vc_pos; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 47 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 48 | unsigned short vc_hi_font_mask; |
| 49 | struct console_font vc_font; |
| 50 | unsigned short vc_video_erase_char; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 51 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 52 | unsigned int vc_state; |
| 53 | unsigned int vc_npar,vc_par[NPAR]; |
| 54 | struct tty_struct *vc_tty; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 55 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 56 | struct vt_mode vt_mode; |
| 57 | int vt_pid; |
| 58 | int vt_newvt; |
| 59 | wait_queue_head_t paste_wait; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 60 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 61 | unsigned int vc_charset : 1; |
| 62 | unsigned int vc_s_charset : 1; |
| 63 | unsigned int vc_disp_ctrl : 1; |
| 64 | unsigned int vc_toggle_meta : 1; |
| 65 | unsigned int vc_decscnm : 1; |
| 66 | unsigned int vc_decom : 1; |
| 67 | unsigned int vc_decawm : 1; |
| 68 | unsigned int vc_deccm : 1; |
| 69 | unsigned int vc_decim : 1; |
| 70 | unsigned int vc_deccolm : 1; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 71 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 72 | unsigned int vc_intensity : 2; |
| 73 | unsigned int vc_underline : 1; |
| 74 | unsigned int vc_blink : 1; |
| 75 | unsigned int vc_reverse : 1; |
| 76 | unsigned int vc_s_intensity : 2; |
| 77 | unsigned int vc_s_underline : 1; |
| 78 | unsigned int vc_s_blink : 1; |
| 79 | unsigned int vc_s_reverse : 1; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 80 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 81 | unsigned int vc_ques : 1; |
| 82 | unsigned int vc_need_wrap : 1; |
| 83 | unsigned int vc_can_do_color : 1; |
| 84 | unsigned int vc_report_mouse : 2; |
| 85 | unsigned int vc_kmalloced : 1; |
| 86 | unsigned char vc_utf : 1; |
| 87 | unsigned char vc_utf_count; |
| 88 | int vc_utf_char; |
| 89 | unsigned int vc_tab_stop[8]; |
| 90 | unsigned char vc_palette[16*3]; |
| 91 | unsigned short * vc_translate; |
| 92 | unsigned char vc_G0_charset; |
| 93 | unsigned char vc_G1_charset; |
| 94 | unsigned char vc_saved_G0; |
| 95 | unsigned char vc_saved_G1; |
| 96 | unsigned int vc_bell_pitch; |
| 97 | unsigned int vc_bell_duration; |
| 98 | struct vc_data **vc_display_fg; |
| 99 | unsigned long vc_uni_pagedir; |
| 100 | unsigned long *vc_uni_pagedir_loc; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 101 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 102 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 103 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 104 | struct vc { |
| 105 | struct vc_data *d; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 106 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 107 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 108 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 109 | #define CUR_DEF 0 |
| 110 | #define CUR_NONE 1 |
| 111 | #define CUR_UNDERLINE 2 |
| 112 | #define CUR_LOWER_THIRD 3 |
| 113 | #define CUR_LOWER_HALF 4 |
| 114 | #define CUR_TWO_THIRDS 5 |
| 115 | #define CUR_BLOCK 6 |
| 116 | #define CUR_HWMASK 0x0f |
| 117 | #define CUR_SWMASK 0xfff0 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 118 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 119 | #define CUR_DEFAULT CUR_UNDERLINE |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 120 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 121 | #define CON_IS_VISIBLE(conp) (*conp->vc_display_fg == conp) |