00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef _LINUX_CONSOLE_H_
00015 #define _LINUX_CONSOLE_H_ 1
00016
00017 struct vc_data;
00018 struct console_font_op;
00019
00020
00021
00022
00023 #define VT100ID "\033[?1;2c"
00024 #define VT102ID "\033[?6c"
00025
00026 struct consw {
00027 const char *(*con_startup)(void);
00028 void (*con_init)(struct vc_data *, int);
00029 void (*con_deinit)(struct vc_data *);
00030 void (*con_clear)(struct vc_data *, int, int, int, int);
00031 void (*con_putc)(struct vc_data *, int, int, int);
00032 void (*con_putcs)(struct vc_data *, const unsigned short *, int, int, int);
00033 void (*con_cursor)(struct vc_data *, int);
00034 int (*con_scroll)(struct vc_data *, int, int, int, int);
00035 void (*con_bmove)(struct vc_data *, int, int, int, int, int, int);
00036 int (*con_switch)(struct vc_data *);
00037 int (*con_blank)(struct vc_data *, int);
00038 int (*con_font_op)(struct vc_data *, struct console_font_op *);
00039 int (*con_set_palette)(struct vc_data *, unsigned char *);
00040 int (*con_scrolldelta)(struct vc_data *, int);
00041 int (*con_set_origin)(struct vc_data *);
00042 void (*con_save_screen)(struct vc_data *);
00043 u8 (*con_build_attr)(struct vc_data *, u8, u8, u8, u8, u8);
00044 void (*con_invert_region)(struct vc_data *, u16 *, int);
00045 u16 *(*con_screen_pos)(struct vc_data *, int);
00046 unsigned long (*con_getxy)(struct vc_data *, unsigned long, int *, int *);
00047 };
00048
00049 extern struct consw *conswitchp;
00050
00051 extern struct consw dummy_con;
00052 extern struct consw fb_con;
00053 extern struct consw vga_con;
00054 extern struct consw newport_con;
00055 extern struct consw prom_con;
00056
00057 void take_over_console(struct consw *sw, int first, int last, int deflt);
00058 void give_up_console(struct consw *sw);
00059
00060
00061 #define SM_UP (1)
00062 #define SM_DOWN (2)
00063
00064
00065 #define CM_DRAW (1)
00066 #define CM_ERASE (2)
00067 #define CM_MOVE (3)
00068
00069
00070
00071
00072 struct console_cmdline
00073 {
00074 char name[8];
00075 int index;
00076 char *options;
00077 };
00078 #define MAX_CMDLINECONSOLES 8
00079 extern struct console_cmdline console_list[MAX_CMDLINECONSOLES];
00080
00081
00082
00083
00084
00085
00086 #define CON_PRINTBUFFER (1)
00087 #define CON_CONSDEV (2)
00088 #define CON_ENABLED (4)
00089
00090 struct console
00091 {
00092 char name[8];
00093 void (*write)(struct console *, const char *, unsigned);
00094 int (*read)(struct console *, const char *, unsigned);
00095 kdev_t (*device)(struct console *);
00096 int (*wait_key)(struct console *);
00097 void (*unblank)(void);
00098 int (*setup)(struct console *, char *);
00099 short flags;
00100 short index;
00101 int cflag;
00102 struct console *next;
00103 };
00104
00105 extern void register_console(struct console *);
00106 extern int unregister_console(struct console *);
00107 extern struct console *console_drivers;
00108
00109
00110 #define VESA_NO_BLANKING 0
00111 #define VESA_VSYNC_SUSPEND 1
00112 #define VESA_HSYNC_SUSPEND 2
00113 #define VESA_POWERDOWN 3
00114
00115 #endif