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