Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/vt/vt.h
Show First 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Per-device datastructure. | * Per-device datastructure. | ||||
*/ | */ | ||||
#ifndef SC_NO_CUTPASTE | #ifndef SC_NO_CUTPASTE | ||||
struct vt_mouse_cursor; | struct vt_mouse_cursor; | ||||
#endif | #endif | ||||
struct vt_pastebuf { | |||||
term_char_t *vpb_buf; /* Copy-paste buffer. */ | |||||
unsigned int vpb_bufsz; /* Buffer size. */ | |||||
unsigned int vpb_len; /* Length of a last selection. */ | |||||
}; | |||||
struct vt_device { | struct vt_device { | ||||
struct vt_window *vd_windows[VT_MAXWINDOWS]; /* (c) Windows. */ | struct vt_window *vd_windows[VT_MAXWINDOWS]; /* (c) Windows. */ | ||||
struct vt_window *vd_curwindow; /* (d) Current window. */ | struct vt_window *vd_curwindow; /* (d) Current window. */ | ||||
struct vt_window *vd_savedwindow;/* (?) Saved for suspend. */ | struct vt_window *vd_savedwindow;/* (?) Saved for suspend. */ | ||||
struct vt_window *vd_markedwin; /* (?) Copy/paste buf owner. */ | struct vt_pastebuf vd_pastebuf; /* (?) Copy/paste buf. */ | ||||
const struct vt_driver *vd_driver; /* (c) Graphics driver. */ | const struct vt_driver *vd_driver; /* (c) Graphics driver. */ | ||||
void *vd_softc; /* (u) Driver data. */ | void *vd_softc; /* (u) Driver data. */ | ||||
#ifndef SC_NO_CUTPASTE | #ifndef SC_NO_CUTPASTE | ||||
struct vt_mouse_cursor *vd_mcursor; /* (?) Cursor bitmap. */ | struct vt_mouse_cursor *vd_mcursor; /* (?) Cursor bitmap. */ | ||||
term_color_t vd_mcursor_fg; /* (?) Cursor fg color. */ | term_color_t vd_mcursor_fg; /* (?) Cursor fg color. */ | ||||
term_color_t vd_mcursor_bg; /* (?) Cursor bg color. */ | term_color_t vd_mcursor_bg; /* (?) Cursor bg color. */ | ||||
vt_axis_t vd_mx_drawn; /* (?) Mouse X and Y */ | vt_axis_t vd_mx_drawn; /* (?) Mouse X and Y */ | ||||
vt_axis_t vd_my_drawn; /* as of last redraw. */ | vt_axis_t vd_my_drawn; /* as of last redraw. */ | ||||
Show All 16 Lines | |||||
#define VDF_DEAD 0x10 /* Early probing found nothing. */ | #define VDF_DEAD 0x10 /* Early probing found nothing. */ | ||||
#define VDF_INITIALIZED 0x20 /* vtterm_cnprobe already done. */ | #define VDF_INITIALIZED 0x20 /* vtterm_cnprobe already done. */ | ||||
#define VDF_MOUSECURSOR 0x40 /* Mouse cursor visible. */ | #define VDF_MOUSECURSOR 0x40 /* Mouse cursor visible. */ | ||||
#define VDF_QUIET_BELL 0x80 /* Disable bell. */ | #define VDF_QUIET_BELL 0x80 /* Disable bell. */ | ||||
int vd_keyboard; /* (G) Keyboard index. */ | int vd_keyboard; /* (G) Keyboard index. */ | ||||
unsigned int vd_kbstate; /* (?) Device unit. */ | unsigned int vd_kbstate; /* (?) Device unit. */ | ||||
unsigned int vd_unit; /* (c) Device unit. */ | unsigned int vd_unit; /* (c) Device unit. */ | ||||
}; | }; | ||||
#define VD_PASTEBUF(vd) ((vd)->vd_pastebuf.vpb_buf) | |||||
#define VD_PASTEBUFSZ(vd) ((vd)->vd_pastebuf.vpb_bufsz) | |||||
#define VD_PASTEBUFLEN(vd) ((vd)->vd_pastebuf.vpb_len) | |||||
/* | /* | ||||
* Per-window terminal screen buffer. | * Per-window terminal screen buffer. | ||||
* | * | ||||
* Because redrawing is performed asynchronously, the buffer keeps track | * Because redrawing is performed asynchronously, the buffer keeps track | ||||
* of a rectangle that needs to be redrawn (vb_dirtyrect). Because this | * of a rectangle that needs to be redrawn (vb_dirtyrect). Because this | ||||
* approach seemed to cause suboptimal performance (when the top left | * approach seemed to cause suboptimal performance (when the top left | ||||
* and the bottom right of the screen are modified), it also uses a set | * and the bottom right of the screen are modified), it also uses a set | ||||
▲ Show 20 Lines • Show All 252 Lines • Show Last 20 Lines |