root/include/linux/console.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  *  linux/include/linux/console.h
   3  *
   4  *  Copyright (C) 1993        Hamish Macdonald
   5  *
   6  * This file is subject to the terms and conditions of the GNU General Public
   7  * License.  See the file README.legal in the main directory of this archive
   8  * for more details.
   9  *
  10  * Changed:
  11  * 10-Mar-94: Arno Griffioen: Conversion for vt100 emulator port from PC LINUX
  12  */
  13 
  14 #ifndef _LINUX_CONSOLE_H_
  15 #define _LINUX_CONSOLE_H_ 1
  16 
  17 #define NPAR 16
  18 
  19 struct vc_data {
  20         unsigned long   vc_screenbuf_size;
  21         unsigned short  vc_num;                 /* Console number */
  22         unsigned short  vc_video_erase_char;    /* Background erase character */
  23         unsigned char   vc_attr;                /* Current attributes */
  24         unsigned char   vc_def_color;           /* Default colors */
  25         unsigned char   vc_color;               /* Foreground & background */
  26         unsigned char   vc_s_color;             /* Saved foreground & background */
  27         unsigned char   vc_ulcolor;             /* Colour for underline mode */
  28         unsigned char   vc_halfcolor;           /* Colour for half intensity mode */
  29         unsigned long   vc_origin;              /* Used for EGA/VGA fast scroll */
  30         unsigned long   vc_scr_end;             /* Used for EGA/VGA fast scroll */
  31         unsigned short  *vc_pos;
  32         unsigned long   vc_x,vc_y;
  33         unsigned long   vc_top,vc_bottom;
  34         unsigned long   vc_rows,vc_cols;
  35         unsigned long   vc_size_row;
  36         unsigned long   vc_state;
  37         unsigned long   vc_npar,vc_par[NPAR];
  38         unsigned short  *vc_video_mem_start;
  39         unsigned long   vc_video_mem_end;       /* End of video RAM (sort of)   */
  40         unsigned long   vc_saved_x;
  41         unsigned long   vc_saved_y;
  42         /* mode flags */
  43         unsigned long   vc_charset      : 1;    /* Character set G0 / G1 */
  44         unsigned long   vc_s_charset    : 1;    /* Saved character set */
  45         unsigned long   vc_disp_ctrl    : 1;    /* Display chars < 32? */
  46         unsigned long   vc_toggle_meta  : 1;    /* Toggle high bit? */
  47         unsigned long   vc_decscnm      : 1;    /* Screen Mode */
  48         unsigned long   vc_decom        : 1;    /* Origin Mode */
  49         unsigned long   vc_decawm       : 1;    /* Autowrap Mode */
  50         unsigned long   vc_deccm        : 1;    /* Cursor Visible */
  51         unsigned long   vc_decim        : 1;    /* Insert Mode */
  52         unsigned long   vc_deccolm      : 1;    /* 80/132 Column Mode */
  53         /* attribute flags */
  54         unsigned long   vc_intensity    : 2;    /* 0=half-bright, 1=normal, 2=bold */
  55         unsigned long   vc_underline    : 1;
  56         unsigned long   vc_blink        : 1;
  57         unsigned long   vc_reverse      : 1;
  58         unsigned long   vc_s_intensity  : 2;    /* saved rendition */
  59         unsigned long   vc_s_underline  : 1;
  60         unsigned long   vc_s_blink      : 1;
  61         unsigned long   vc_s_reverse    : 1;
  62         /* misc */
  63         unsigned long   vc_ques         : 1;
  64         unsigned long   vc_need_wrap    : 1;
  65         unsigned long   vc_can_do_color : 1;
  66         unsigned long   vc_has_scrolled : 1;    /* Info for unblank_screen */
  67         unsigned long   vc_kmalloced    : 1;    /* kfree_s() needed */
  68         unsigned long   vc_report_mouse : 2;
  69         unsigned char   vc_utf          : 1;    /* Unicode UTF-8 encoding */
  70         unsigned char   vc_utf_count;
  71         unsigned long   vc_utf_char;
  72         unsigned long   vc_tab_stop[5];         /* Tab stops. 160 columns. */
  73         unsigned short  *vc_translate;
  74         unsigned char   vc_G0_charset;
  75         unsigned char   vc_G1_charset;
  76         unsigned char   vc_saved_G0;
  77         unsigned char   vc_saved_G1;
  78         unsigned int    vc_bell_pitch;          /* Console bell pitch */
  79         unsigned int    vc_bell_duration;       /* Console bell duration */
  80         struct consw    *vc_sw;
  81         /* additional information is in vt_kern.h */
  82 };
  83 
  84 /*
  85  * this is what the terminal answers to a ESC-Z or csi0c query.
  86  */
  87 #define VT100ID "\033[?1;2c"
  88 #define VT102ID "\033[?6c"
  89 
  90 /* DPC: 1994-04-13 !!! con_putcs is new entry !!! */
  91 
  92 struct consw {
  93     unsigned long (*con_startup)(unsigned long, char **);
  94     void   (*con_init)(struct vc_data *);
  95     int    (*con_deinit)(struct vc_data *);
  96     int    (*con_clear)(struct vc_data *, int, int, int, int);
  97     int    (*con_putc)(struct vc_data *, int, int, int);
  98     int    (*con_putcs)(struct vc_data *, const char *, int, int, int);
  99     int    (*con_cursor)(struct vc_data *, int);
 100     int    (*con_scroll)(struct vc_data *, int, int, int, int);
 101     int    (*con_bmove)(struct vc_data *, int, int, int, int, int, int);
 102     int    (*con_switch)(struct vc_data *);
 103     int    (*con_blank)(int);
 104     int    (*con_get_font)(struct vc_data *, int *, int *, char *);
 105     int    (*con_set_font)(struct vc_data *, int, int, char *);
 106 };
 107 
 108 extern struct consw *conswitchp;
 109 
 110 /* flag bits */
 111 #define CON_INITED  (1)
 112 
 113 /* scroll */
 114 #define SM_UP       (1)
 115 #define SM_DOWN     (2)
 116 #define SM_LEFT     (3)
 117 #define SM_RIGHT    (4)
 118 
 119 /* cursor */
 120 #define CM_DRAW     (1)
 121 #define CM_ERASE    (2)
 122 #define CM_MOVE     (3)
 123 
 124 #endif /* linux/console.h */

/* [previous][next][first][last][top][bottom][index][help] */