| 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/vt.h> |
|---|
| 10 | #include <linux/kd.h> |
|---|
| 11 | #include <linux/tty.h> |
|---|
| 12 | #include <linux/console_struct.h> |
|---|
| 13 | |
|---|
| 14 | /* |
|---|
| 15 | * Presently, a lot of graphics programs do not restore the contents of |
|---|
| 16 | * the higher font pages. Defining this flag will avoid use of them, but |
|---|
| 17 | * will lose support for PIO_FONTRESET. Note that many font operations are |
|---|
| 18 | * not likely to work with these programs anyway; they need to be |
|---|
| 19 | * fixed. The linux/Documentation directory includes a code snippet |
|---|
| 20 | * to save and restore the text font. |
|---|
| 21 | */ |
|---|
| 22 | #ifdef CONFIG_VGA_CONSOLE |
|---|
| 23 | #define BROKEN_GRAPHICS_PROGRAMS 1 |
|---|
| 24 | #endif |
|---|
| 25 | |
|---|
| 26 | extern void kd_mksound(unsigned int hz, unsigned int ticks); |
|---|
| 27 | extern int kbd_rate(struct kbd_repeat *rep); |
|---|
| 28 | |
|---|
| 29 | /* console.c */ |
|---|
| 30 | |
|---|
| 31 | int vc_allocate(unsigned int console); |
|---|
| 32 | int vc_cons_allocated(unsigned int console); |
|---|
| 33 | int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines); |
|---|
| 34 | void vc_disallocate(unsigned int console); |
|---|
| 35 | void reset_palette(struct vc_data *vc); |
|---|
| 36 | void do_blank_screen(int entering_gfx); |
|---|
| 37 | void do_unblank_screen(int leaving_gfx); |
|---|
| 38 | void unblank_screen(void); |
|---|
| 39 | void poke_blanked_console(void); |
|---|
| 40 | int con_font_op(struct vc_data *vc, struct console_font_op *op); |
|---|
| 41 | int con_set_cmap(unsigned char *cmap); |
|---|
| 42 | int con_get_cmap(unsigned char *cmap); |
|---|
| 43 | void scrollback(struct vc_data *vc, int lines); |
|---|
| 44 | void scrollfront(struct vc_data *vc, int lines); |
|---|
| 45 | void update_region(struct vc_data *vc, unsigned long start, int count); |
|---|
| 46 | void redraw_screen(struct vc_data *vc, int is_switch); |
|---|
| 47 | #define update_screen(x) redraw_screen(x, 0) |
|---|
| 48 | #define switch_screen(x) redraw_screen(x, 1) |
|---|
| 49 | |
|---|
| 50 | struct tty_struct; |
|---|
| 51 | int tioclinux(struct tty_struct *tty, unsigned long arg); |
|---|
| 52 | |
|---|
| 53 | /* consolemap.c */ |
|---|
| 54 | |
|---|
| 55 | struct unimapinit; |
|---|
| 56 | struct unipair; |
|---|
| 57 | |
|---|
| 58 | int con_set_trans_old(unsigned char * table); |
|---|
| 59 | int con_get_trans_old(unsigned char * table); |
|---|
| 60 | int con_set_trans_new(unsigned short * table); |
|---|
| 61 | int con_get_trans_new(unsigned short * table); |
|---|
| 62 | int con_clear_unimap(struct vc_data *vc, struct unimapinit *ui); |
|---|
| 63 | int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair *list); |
|---|
| 64 | int con_get_unimap(struct vc_data *vc, ushort ct, ushort *uct, struct unipair *list); |
|---|
| 65 | int con_set_default_unimap(struct vc_data *vc); |
|---|
| 66 | void con_free_unimap(struct vc_data *vc); |
|---|
| 67 | void con_protect_unimap(struct vc_data *vc, int rdonly); |
|---|
| 68 | int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc); |
|---|
| 69 | |
|---|
| 70 | /* vt.c */ |
|---|
| 71 | int vt_waitactive(int vt); |
|---|
| 72 | void change_console(struct vc_data *new_vc); |
|---|
| 73 | void reset_vc(struct vc_data *vc); |
|---|
| 74 | |
|---|
| 75 | /* |
|---|
| 76 | * vc_screen.c shares this temporary buffer with the console write code so that |
|---|
| 77 | * we can easily avoid touching user space while holding the console spinlock. |
|---|
| 78 | */ |
|---|
| 79 | |
|---|
| 80 | #define CON_BUF_SIZE (CONFIG_BASE_SMALL ? 256 : PAGE_SIZE) |
|---|
| 81 | extern char con_buf[CON_BUF_SIZE]; |
|---|
| 82 | extern struct semaphore con_buf_sem; |
|---|
| 83 | |
|---|
| 84 | #endif /* _VT_KERN_H */ |
|---|