root/drivers/char/console_struct.h

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

INCLUDED FROM


   1 /*
   2  * console_struct.h
   3  *
   4  * Data structure and defines shared between console.c, vga.c and tga.c
   5  */
   6 
   7 #define NPAR 16
   8 
   9 struct vc_data {
  10         unsigned long   vc_screenbuf_size;
  11         unsigned short  vc_video_erase_char;    /* Background erase character */
  12         unsigned char   vc_attr;                /* Current attributes */
  13         unsigned char   vc_def_color;           /* Default colors */
  14         unsigned char   vc_color;               /* Foreground & background */
  15         unsigned char   vc_s_color;             /* Saved foreground & background */
  16         unsigned char   vc_ulcolor;             /* Colour for underline mode */
  17         unsigned char   vc_halfcolor;           /* Colour for half intensity mode */
  18         unsigned long   vc_origin;              /* Used for EGA/VGA fast scroll */
  19         unsigned long   vc_scr_end;             /* Used for EGA/VGA fast scroll */
  20         unsigned long   vc_pos;
  21         unsigned long   vc_x,vc_y;
  22         unsigned long   vc_top,vc_bottom;
  23         unsigned long   vc_state;
  24         unsigned long   vc_npar,vc_par[NPAR];
  25         unsigned long   vc_video_mem_start;     /* Start of video RAM           */
  26         unsigned long   vc_video_mem_end;       /* End of video RAM (sort of)   */
  27         unsigned long   vc_saved_x;
  28         unsigned long   vc_saved_y;
  29         /* mode flags */
  30         unsigned long   vc_charset      : 1;    /* Character set G0 / G1 */
  31         unsigned long   vc_s_charset    : 1;    /* Saved character set */
  32         unsigned long   vc_disp_ctrl    : 1;    /* Display chars < 32? */
  33         unsigned long   vc_toggle_meta  : 1;    /* Toggle high bit? */
  34         unsigned long   vc_decscnm      : 1;    /* Screen Mode */
  35         unsigned long   vc_decom        : 1;    /* Origin Mode */
  36         unsigned long   vc_decawm       : 1;    /* Autowrap Mode */
  37         unsigned long   vc_deccm        : 1;    /* Cursor Visible */
  38         unsigned long   vc_decim        : 1;    /* Insert Mode */
  39         unsigned long   vc_deccolm      : 1;    /* 80/132 Column Mode */
  40         /* attribute flags */
  41         unsigned long   vc_intensity    : 2;    /* 0=half-bright, 1=normal, 2=bold */
  42         unsigned long   vc_underline    : 1;
  43         unsigned long   vc_blink        : 1;
  44         unsigned long   vc_reverse      : 1;
  45         unsigned long   vc_s_intensity  : 2;    /* saved rendition */
  46         unsigned long   vc_s_underline  : 1;
  47         unsigned long   vc_s_blink      : 1;
  48         unsigned long   vc_s_reverse    : 1;
  49         /* misc */
  50         unsigned long   vc_ques         : 1;
  51         unsigned long   vc_need_wrap    : 1;
  52         unsigned long   vc_has_scrolled : 1;    /* Info for unblank_screen */
  53         unsigned long   vc_kmalloced    : 1;    /* kfree_s() needed */
  54         unsigned long   vc_report_mouse : 2;
  55         unsigned char   vc_utf          : 1;    /* Unicode UTF-8 encoding */
  56         unsigned char   vc_utf_count;
  57                  long   vc_utf_char;
  58         unsigned long   vc_tab_stop[5];         /* Tab stops. 160 columns. */
  59         unsigned char   vc_palette[16*3];       /* Colour palette for VGA+ */
  60         unsigned short * vc_translate;
  61         unsigned char   vc_G0_charset;
  62         unsigned char   vc_G1_charset;
  63         unsigned char   vc_saved_G0;
  64         unsigned char   vc_saved_G1;
  65         unsigned int    vc_bell_pitch;          /* Console bell pitch */
  66         unsigned int    vc_bell_duration;       /* Console bell duration */
  67         /* additional information is in vt_kern.h */
  68 };
  69 
  70 struct vc {
  71         struct vc_data *d;
  72 
  73         /* might add  scrmem, vt_struct, kbd  at some time,
  74            to have everything in one place - the disadvantage
  75            would be that vc_cons etc can no longer be static */
  76 };
  77 
  78 extern struct vc vc_cons [MAX_NR_CONSOLES];
  79 
  80 #define screenbuf_size  (vc_cons[currcons].d->vc_screenbuf_size)
  81 #define origin          (vc_cons[currcons].d->vc_origin)
  82 #define scr_end (vc_cons[currcons].d->vc_scr_end)
  83 #define pos             (vc_cons[currcons].d->vc_pos)
  84 #define top             (vc_cons[currcons].d->vc_top)
  85 #define bottom          (vc_cons[currcons].d->vc_bottom)
  86 #define x               (vc_cons[currcons].d->vc_x)
  87 #define y               (vc_cons[currcons].d->vc_y)
  88 #define vc_state        (vc_cons[currcons].d->vc_state)
  89 #define npar            (vc_cons[currcons].d->vc_npar)
  90 #define par             (vc_cons[currcons].d->vc_par)
  91 #define ques            (vc_cons[currcons].d->vc_ques)
  92 #define attr            (vc_cons[currcons].d->vc_attr)
  93 #define saved_x (vc_cons[currcons].d->vc_saved_x)
  94 #define saved_y (vc_cons[currcons].d->vc_saved_y)
  95 #define translate       (vc_cons[currcons].d->vc_translate)
  96 #define G0_charset      (vc_cons[currcons].d->vc_G0_charset)
  97 #define G1_charset      (vc_cons[currcons].d->vc_G1_charset)
  98 #define saved_G0        (vc_cons[currcons].d->vc_saved_G0)
  99 #define saved_G1        (vc_cons[currcons].d->vc_saved_G1)
 100 #define utf             (vc_cons[currcons].d->vc_utf)
 101 #define utf_count       (vc_cons[currcons].d->vc_utf_count)
 102 #define utf_char        (vc_cons[currcons].d->vc_utf_char)
 103 #define video_mem_start (vc_cons[currcons].d->vc_video_mem_start)
 104 #define video_mem_end   (vc_cons[currcons].d->vc_video_mem_end)
 105 #define video_erase_char (vc_cons[currcons].d->vc_video_erase_char)
 106 #define disp_ctrl       (vc_cons[currcons].d->vc_disp_ctrl)
 107 #define toggle_meta     (vc_cons[currcons].d->vc_toggle_meta)
 108 #define decscnm (vc_cons[currcons].d->vc_decscnm)
 109 #define decom           (vc_cons[currcons].d->vc_decom)
 110 #define decawm          (vc_cons[currcons].d->vc_decawm)
 111 #define deccm           (vc_cons[currcons].d->vc_deccm)
 112 #define decim           (vc_cons[currcons].d->vc_decim)
 113 #define deccolm (vc_cons[currcons].d->vc_deccolm)
 114 #define need_wrap       (vc_cons[currcons].d->vc_need_wrap)
 115 #define has_scrolled    (vc_cons[currcons].d->vc_has_scrolled)
 116 #define kmalloced       (vc_cons[currcons].d->vc_kmalloced)
 117 #define report_mouse    (vc_cons[currcons].d->vc_report_mouse)
 118 #define color           (vc_cons[currcons].d->vc_color)
 119 #define s_color (vc_cons[currcons].d->vc_s_color)
 120 #define def_color       (vc_cons[currcons].d->vc_def_color)
 121 #define         foreground      (color & 0x0f)
 122 #define         background      (color & 0xf0)
 123 #define charset (vc_cons[currcons].d->vc_charset)
 124 #define s_charset       (vc_cons[currcons].d->vc_s_charset)
 125 #define intensity       (vc_cons[currcons].d->vc_intensity)
 126 #define underline       (vc_cons[currcons].d->vc_underline)
 127 #define blink           (vc_cons[currcons].d->vc_blink)
 128 #define reverse         (vc_cons[currcons].d->vc_reverse)
 129 #define s_intensity     (vc_cons[currcons].d->vc_s_intensity)
 130 #define s_underline     (vc_cons[currcons].d->vc_s_underline)
 131 #define s_blink         (vc_cons[currcons].d->vc_s_blink)
 132 #define s_reverse       (vc_cons[currcons].d->vc_s_reverse)
 133 #define ulcolor         (vc_cons[currcons].d->vc_ulcolor)
 134 #define halfcolor       (vc_cons[currcons].d->vc_halfcolor)
 135 #define tab_stop        (vc_cons[currcons].d->vc_tab_stop)
 136 #define palette         (vc_cons[currcons].d->vc_palette)
 137 #define bell_pitch      (vc_cons[currcons].d->vc_bell_pitch)
 138 #define bell_duration   (vc_cons[currcons].d->vc_bell_duration)
 139 
 140 #define vcmode          (vt_cons[currcons]->vc_mode)
 141 #define structsize      (sizeof(struct vc_data) + sizeof(struct vt_struct))

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