1 #ifndef _VT_KERN_H 2 #define _VT_KERN_H 3 4 /* 5 * this really is an extension of the vc_cons structure in console.c, but 6 * with information needed by the vt package 7 */ 8 9 #include <linux/config.h> 10 #include <linux/vt.h> 11 #include <linux/kd.h> 12 13 /* 14 * Presently, a lot of graphics programs do not restore the contents of 15 * the higher font pages. Defining this flag will avoid use of them, but 16 * will lose support for PIO_FONTRESET. Note that many font operations are 17 * not likely to work with these programs anyway; they need to be 18 * fixed. The linux/Documentation directory includes a code snippet 19 * to save and restore the text font. 20 */ 21 #ifdef CONFIG_VGA_CONSOLE 22 #define BROKEN_GRAPHICS_PROGRAMS 1 23 #endif 24 25 extern struct vt_struct { 26 int vc_num; /* The console number */ 27 unsigned char vc_mode; /* KD_TEXT, ... */ 28 struct vt_mode vt_mode; 29 int vt_pid; 30 int vt_newvt; 31 wait_queue_head_t paste_wait; 32 } *vt_cons[MAX_NR_CONSOLES]; 33 34 extern void (*kd_mksound)(unsigned int hz, unsigned int ticks); 35 extern int (*kbd_rate)(struct kbd_repeat *rep); 36 37 /* console.c */ 38 39 struct console_font_op; 40 41 int vc_allocate(unsigned int console); 42 int vc_cons_allocated(unsigned int console); 43 int vc_resize(unsigned int lines, unsigned int cols, 44 unsigned int first, unsigned int last); 45 #define vc_resize_all(l, c) vc_resize(l, c, 0, MAX_NR_CONSOLES-1) 46 #define vc_resize_con(l, c, x) vc_resize(l, c, x, x) 47 void vc_disallocate(unsigned int console); 48 void reset_palette(int currcons); 49 void set_palette(int currcons); 50 void do_blank_screen(int gfx_mode); 51 void unblank_screen(void); 52 void poke_blanked_console(void); 53 int con_font_op(int currcons, struct console_font_op *op); 54 int con_set_cmap(unsigned char *cmap); 55 int con_get_cmap(unsigned char *cmap); 56 void scrollback(int); 57 void scrollfront(int); 58 void update_region(int currcons, unsigned long start, int count); 59 void redraw_screen(int new_console, int is_switch); 60 #define update_screen(x) redraw_screen(x, 0) 61 #define switch_screen(x) redraw_screen(x, 1) 62 63 struct tty_struct; 64 int tioclinux(struct tty_struct *tty, unsigned long arg); 65 66 /* consolemap.c */ 67 68 struct unimapinit; 69 struct unipair; 70 71 int con_set_trans_old(unsigned char * table); 72 int con_get_trans_old(unsigned char * table); 73 int con_set_trans_new(unsigned short * table); 74 int con_get_trans_new(unsigned short * table); 75 int con_clear_unimap(int currcons, struct unimapinit *ui); 76 int con_set_unimap(int currcons, ushort ct, struct unipair *list); 77 int con_get_unimap(int currcons, ushort ct, ushort *uct, struct unipair *list); 78 int con_set_default_unimap(int currcons); 79 void con_free_unimap(int currcons); 80 void con_protect_unimap(int currcons, int rdonly); 81 int con_copy_unimap(int dstcons, int srccons); 82 83 /* vt.c */ 84 85 extern unsigned int video_font_height; 86 extern unsigned int default_font_height; 87 extern unsigned int video_scan_lines; 88 89 void complete_change_console(unsigned int new_console); 90 int vt_waitactive(int vt); 91 void change_console(unsigned int); 92 void reset_vc(unsigned int new_console); 93 94 #endif /* _VT_KERN_H */ 95