5 * this really is an extension of the vc_cons structure in console.c, but
6 * with information needed by the vt package
9 #include <linux/config.h>
12 #include <linux/tty.h>
13 #include <linux/console_struct.h>
17 * Presently, a lot of graphics programs do not restore the contents of
18 * the higher font pages. Defining this flag will avoid use of them, but
19 * will lose support for PIO_FONTRESET. Note that many font operations are
20 * not likely to work with these programs anyway; they need to be
21 * fixed. The linux/Documentation directory includes a code snippet
22 * to save and restore the text font.
24 #ifdef CONFIG_VGA_CONSOLE
25 #define BROKEN_GRAPHICS_PROGRAMS 1
28 extern struct vt_struct
{
29 int vc_num
; /* The console number */
30 unsigned char vc_mode
; /* KD_TEXT, ... */
31 struct vt_mode vt_mode
;
34 wait_queue_head_t paste_wait
;
35 } *vt_cons
[MAX_NR_CONSOLES
];
37 extern void kd_mksound(unsigned int hz
, unsigned int ticks
);
38 extern int kbd_rate(struct kbd_repeat
*rep
);
42 int vc_allocate(unsigned int console
);
43 int vc_cons_allocated(unsigned int console
);
44 int vc_resize(int currcons
, unsigned int cols
, unsigned int lines
);
45 void vc_disallocate(unsigned int console
);
46 void reset_palette(int currcons
);
47 void set_palette(int currcons
);
48 void do_blank_screen(int entering_gfx
);
49 void do_unblank_screen(int leaving_gfx
);
50 void unblank_screen(void);
51 void poke_blanked_console(void);
52 int con_font_op(int currcons
, struct console_font_op
*op
);
53 int con_font_set(int currcons
, struct console_font_op
*op
);
54 int con_font_get(int currcons
, struct console_font_op
*op
);
55 int con_font_default(int currcons
, struct console_font_op
*op
);
56 int con_font_copy(int currcons
, struct console_font_op
*op
);
57 int con_set_cmap(unsigned char __user
*cmap
);
58 int con_get_cmap(unsigned char __user
*cmap
);
60 void scrollfront(int);
61 void update_region(int currcons
, unsigned long start
, int count
);
62 void redraw_screen(int new_console
, int is_switch
);
63 #define update_screen(x) redraw_screen(x, 0)
64 #define switch_screen(x) redraw_screen(x, 1)
67 int tioclinux(struct tty_struct
*tty
, unsigned long arg
);
74 int con_set_trans_old(unsigned char __user
* table
);
75 int con_get_trans_old(unsigned char __user
* table
);
76 int con_set_trans_new(unsigned short __user
* table
);
77 int con_get_trans_new(unsigned short __user
* table
);
78 int con_clear_unimap(int currcons
, struct unimapinit
*ui
);
79 int con_set_unimap(int currcons
, ushort ct
, struct unipair __user
*list
);
80 int con_get_unimap(int currcons
, ushort ct
, ushort __user
*uct
, struct unipair __user
*list
);
81 int con_set_default_unimap(int currcons
);
82 void con_free_unimap(int currcons
);
83 void con_protect_unimap(int currcons
, int rdonly
);
84 int con_copy_unimap(int dstcons
, int srccons
);
87 void complete_change_console(unsigned int new_console
);
88 int vt_waitactive(int vt
);
89 void change_console(unsigned int);
90 void reset_vc(unsigned int new_console
);
93 * vc_screen.c shares this temporary buffer with the console write code so that
94 * we can easily avoid touching user space while holding the console spinlock.
96 #define CON_BUF_SIZE PAGE_SIZE
97 extern char con_buf
[CON_BUF_SIZE
];
98 extern struct semaphore con_buf_sem
;
100 #endif /* _VT_KERN_H */