27#define VT_UNDERLINE 0x04
29#define VT_REVERSE 0x10
30#define VT_INVISIBLE 0x20
51 void (*
cursor)(
int row,
int col,
int visible);
151void vt_input(
const char *buf,
size_t size);
int vt_fb_probe(void)
Sets up the virtual terminals on the framebuffer, if there is one the terminals can draw on,...
struct vt_display vt_fb_display
int vt_vga_probe(void)
Says whether VGA text mode can be used.
struct vt_display vt_vga_display
int vt_keymap(int table, int keycode)
Says what a key is, for KDGKBENT: programs that read key codes (K_MEDIUMRAW) use it to know what each...
void vt_scancode(int scancode)
Takes a scancode from the keyboard, and sends what the key means to the foreground terminal,...
void vt_keyboard_reset(void)
Forgets a prefix or a sequence that a change of mode cut in the middle.
static uint64_t * table(paddr_t paddr)
Returns a page table, through the direct map.
A device driver: its operations, any of which may be NULL.
The cursor's state, saved by DECSC.
A display that virtual terminals are shown on.
void(*) cursor(int row, int col, int visible)
moves a hardware cursor; NULL if the cursor is drawn (VT_CURSOR)
void(*) draw(int row, int col, struct vt_cell cell)
draws a cell
A virtual terminal: its screen, its emulator's state, and its tty.
struct waitq read_queue write_queue
struct vt_cursor saved saved_alt
void vt_term_write(struct vt *vt, const char *buf, size_t size)
Takes what programs write to a terminal, and changes its screen.
void vt_term_reset(struct vt *vt)
Resets a terminal (RIS, ESC c): the defaults, the tab stops every 8 columns, the main screen cleared,...
int vt_term_init(struct vt *vt, int rows, int cols)
Sets a terminal's screens up, the main one and the alternate one, both cleared, and resets it.
void vt_input(const char *buf, size_t size)
Gives what keys sent to the foreground terminal, as input.
uint8_t vt_vga_attr(struct vt_cell cell)
Returns the VGA text mode attribute of a cell (its colours, in VGA's order), for the VGA display and ...
uint32_t vt_palette(uint8_t color)
Returns one of the 256 colours of xterm's palette: the 16 colours, a 6 x 6 x 6 cube,...
struct vt * vt_foreground(void)
Returns the terminal in the foreground.
void vt_switch(int id)
Switches to another terminal, for Alt+Fn and VT_ACTIVATE.
void vt_keypress(void)
Undoes, at a key press, the modes that a process which is gone had set on the foreground terminal: ot...