TTY之struct consw

/**
 * struct consw - callbacks for consoles
 *
 * @con_set_palette: sets the palette of the console to @table (optional)
 * @con_scrolldelta: the contents of the console should be scrolled by @lines.
 *       Invoked by user. (optional)
 */
struct consw {
 struct module *owner;
 const char *(*con_startup)(void);
 void (*con_init)(struct vc_data *, int);
 void (*con_deinit)(struct vc_data *);
 void (*con_clear)(struct vc_data *, int, int, int, int);
 void (*con_putc)(struct vc_data *, int, int, int);
 void (*con_putcs)(struct vc_data *, const unsigned short *, int, int, int);
 void (*con_cursor)(struct vc_data *, int);
 int (*con_scroll)(struct vc_data *, int, int, int, int);
 int (*con_switch)(struct vc_data *);
 int (*con_blank)(struct vc_data *, int, int);
 int (*con_font_set)(struct vc_data *, struct console_font *, unsigned);
 int (*con_font_get)(struct vc_data *, struct console_font *);
 int (*con_font_default)(struct vc_data *, struct console_font *, char *);
 int (*con_font_copy)(struct vc_data *, int);
 int     (*con_resize)(struct vc_data *, unsigned int, unsigned int,
          unsigned int);
 void (*con_set_palette)(struct vc_data *,
   const unsigned char *table);
 void (*con_scrolldelta)(struct vc_data *, int lines);
 int (*con_set_origin)(struct vc_data *);
 void (*con_save_screen)(struct vc_data *);
 u8 (*con_build_attr)(struct vc_data *, u8, u8, u8, u8, u8, u8);
 void (*con_invert_region)(struct vc_data *, u16 *, int);
 u16    *(*con_screen_pos)(struct vc_data *, int);
 unsigned long (*con_getxy)(struct vc_data *, unsigned long, int *, int *);
 /*
  * Prepare the console for the debugger.  This includes, but is not
  * limited to, unblanking the console, loading an appropriate
  * palette, and allowing debugger generated output.
  */
 int (*con_debug_enter)(struct vc_data *);
 /*
  * Restore the console to its pre-debug state as closely as possible.
  */
 int (*con_debug_leave)(struct vc_data *);
};
 
 
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值