/* SPDX-License-Identifier: GPL-2.0 */ /* * console_struct.h * * Data structure describing single virtual console except for data * used by vt.c. * * Fields marked with [#] must be set by the low-level driver. * Fields marked with [!] can be changed by the low-level driver * to achieve effects such as fast scrolling by changing the origin.
*/
/** * struct vc_state -- state of a VC * @x: cursor's x-position * @y: cursor's y-position * @color: foreground & background colors * @Gx_charset: what's G0/G1 slot set to (like GRAF_MAP, LAT1_MAP) * @charset: what character set to use (0=G0 or 1=G1) * @intensity: see enum vc_intensity for values * @reverse: reversed foreground/background colors * * These members are defined separately from struct vc_data as we save & * restore them at times.
*/ struct vc_state { unsignedint x, y;
/* * Example: vc_data of a console that was scrolled 3 lines down. * * Console buffer * vc_screenbuf ---------> +----------------------+-. * | initializing W | \ * | initializing X | | * | initializing Y | > scroll-back area * | initializing Z | | * | | / * vc_visible_origin ---> ^+----------------------+-: * (changes by scroll) || Welcome to linux | \ * || | | * vc_rows --->< | login: root | | visible on console * || password: | > (vc_screenbuf_size is * vc_origin -----------> || | | vc_size_row * vc_rows) * (start when no scroll) || Last login: 12:28 | / * v+----------------------+-: * | Have a lot of fun... | \ * vc_pos -----------------|--------v | > scroll-front area * | ~ # cat_ | / * vc_scr_end -----------> +----------------------+-: * (vc_origin + | | \ EMPTY, to be filled by * vc_screenbuf_size) | | / vc_video_erase_char * +----------------------+-' * <---- 2 * vc_cols -----> * <---- vc_size_row -----> * * Note that every character in the console buffer is accompanied with an * attribute in the buffer right after the character. This is not depicted * in the figure.
*/ struct vc_data { struct tty_port port; /* Upper level data */
struct vc_state state, saved_state;
unsignedshort vc_num; /* Console number */ unsignedint vc_cols; /* [#] Console size */ unsignedint vc_rows; unsignedint vc_size_row; /* Bytes per row */ unsignedint vc_scan_lines; /* # of scan lines */ unsignedint vc_cell_height; /* CRTC character cell height */ unsignedlong vc_origin; /* [!] Start of real screen */ unsignedlong vc_scr_end; /* [!] End of real screen */ unsignedlong vc_visible_origin; /* [!] Top of visible window */ unsignedint vc_top, vc_bottom; /* Scrolling region */ conststruct consw *vc_sw; unsignedshort *vc_screenbuf; /* In-memory character/attribute buffer */ unsignedint vc_screenbuf_size; unsignedchar vc_mode; /* KD_TEXT, ... */ /* attributes for all characters on screen */ unsignedchar vc_attr; /* Current attributes */ unsignedchar vc_def_color; /* Default colors */ unsignedchar vc_ulcolor; /* Color for underline mode */ unsignedchar vc_itcolor; unsignedchar vc_halfcolor; /* Color for half intensity mode */ /* cursor */ unsignedint vc_cursor_type; unsignedshort vc_complement_mask; /* [#] Xor mask for mouse pointer */ unsignedshort vc_s_complement_mask; /* Saved mouse pointer mask */ unsignedlong vc_pos; /* Cursor address */ /* fonts */ unsignedshort vc_hi_font_mask; /* [#] Attribute set for upper 256 chars of font or 0 if not supported */ struct console_font vc_font; /* Current VC font set */ unsignedshort vc_video_erase_char; /* Background erase character */ /* VT terminal data */ unsignedint vc_state; /* Escape sequence parser state */ unsignedint vc_npar,vc_par[NPAR]; /* Parameters of current escape sequence */ /* data for manual vt switching */ struct vt_mode vt_mode; struct pid *vt_pid; int vt_newvt;
wait_queue_head_t paste_wait; /* mode flags */ unsignedint vc_disp_ctrl : 1; /* Display chars < 32? */ unsignedint vc_toggle_meta : 1; /* Toggle high bit? */ unsignedint vc_decscnm : 1; /* Screen Mode */ unsignedint vc_decom : 1; /* Origin Mode */ unsignedint vc_decawm : 1; /* Autowrap Mode */ unsignedint vc_deccm : 1; /* Cursor Visible */ unsignedint vc_decim : 1; /* Insert Mode */ /* misc */ unsignedint vc_priv : 3; unsignedint vc_need_wrap : 1; unsignedint vc_can_do_color : 1; unsignedint vc_report_mouse : 2; unsignedint vc_bracketed_paste : 1; unsignedchar vc_utf : 1; /* Unicode UTF-8 encoding */ unsignedchar vc_utf_count; int vc_utf_char;
DECLARE_BITMAP(vc_tab_stop, VC_TABSTOPS_COUNT); /* Tab stops. 256 columns. */ unsignedchar vc_palette[16*3]; /* Colour palette for VGA+ */ unsignedshort * vc_translate; unsignedint vc_bell_pitch; /* Console bell pitch */ unsignedint vc_bell_duration; /* Console bell duration */ unsignedshort vc_cur_blink_ms; /* Cursor blink duration */ struct vc_data **vc_display_fg; /* [!] Ptr to var holding fg console for this display */ struct uni_pagedict *uni_pagedict; struct uni_pagedict **uni_pagedict_loc; /* [!] Location of uni_pagedict variable for this console */
u32 **vc_uni_lines; /* unicode screen content */ /* additional information is in vt_kern.h */
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.