Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/vt/vt.h
Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | |||||
#define VT_SYSCTL_INT(_name, _default, _descr) \ | #define VT_SYSCTL_INT(_name, _default, _descr) \ | ||||
static int vt_##_name = _default; \ | static int vt_##_name = _default; \ | ||||
SYSCTL_INT(_kern_vt, OID_AUTO, _name, CTLFLAG_RWTUN, &vt_##_name, _default,\ | SYSCTL_INT(_kern_vt, OID_AUTO, _name, CTLFLAG_RWTUN, &vt_##_name, _default,\ | ||||
_descr); | _descr); | ||||
struct vt_driver; | struct vt_driver; | ||||
void vt_allocate(struct vt_driver *, void *); | void vt_allocate(struct vt_driver *, void *); | ||||
void vt_resume(void); | |||||
void vt_suspend(void); | |||||
typedef unsigned int vt_axis_t; | typedef unsigned int vt_axis_t; | ||||
/* | /* | ||||
* List of locks | * List of locks | ||||
* (d) locked by vd_lock | * (d) locked by vd_lock | ||||
* (b) locked by vb_lock | * (b) locked by vb_lock | ||||
* (G) locked by Giant | * (G) locked by Giant | ||||
▲ Show 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | #define VDF_QUIET_BELL 0x80 /* Disable bell. */ | ||||
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_PASTEBUF(vd) ((vd)->vd_pastebuf.vpb_buf) | ||||
#define VD_PASTEBUFSZ(vd) ((vd)->vd_pastebuf.vpb_bufsz) | #define VD_PASTEBUFSZ(vd) ((vd)->vd_pastebuf.vpb_bufsz) | ||||
#define VD_PASTEBUFLEN(vd) ((vd)->vd_pastebuf.vpb_len) | #define VD_PASTEBUFLEN(vd) ((vd)->vd_pastebuf.vpb_len) | ||||
void vt_resume(struct vt_device *vd); | |||||
void vt_suspend(struct vt_device *vd); | |||||
/* | /* | ||||
* 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 | ||||
* of bitmasks to keep track of the rows and columns (mod 64) that have | * of bitmasks to keep track of the rows and columns (mod 64) that have | ||||
▲ Show 20 Lines • Show All 131 Lines • ▼ Show 20 Lines | typedef void vd_bitblt_bmp_t(struct vt_device *vd, const struct vt_window *vw, | ||||
unsigned int width, unsigned int height, | unsigned int width, unsigned int height, | ||||
unsigned int x, unsigned int y, term_color_t fg, term_color_t bg); | unsigned int x, unsigned int y, term_color_t fg, term_color_t bg); | ||||
typedef int vd_fb_ioctl_t(struct vt_device *, u_long, caddr_t, struct thread *); | typedef int vd_fb_ioctl_t(struct vt_device *, u_long, caddr_t, struct thread *); | ||||
typedef int vd_fb_mmap_t(struct vt_device *, vm_ooffset_t, vm_paddr_t *, int, | typedef int vd_fb_mmap_t(struct vt_device *, vm_ooffset_t, vm_paddr_t *, int, | ||||
vm_memattr_t *); | vm_memattr_t *); | ||||
typedef void vd_drawrect_t(struct vt_device *, int, int, int, int, int, | typedef void vd_drawrect_t(struct vt_device *, int, int, int, int, int, | ||||
term_color_t); | term_color_t); | ||||
typedef void vd_setpixel_t(struct vt_device *, int, int, term_color_t); | typedef void vd_setpixel_t(struct vt_device *, int, int, term_color_t); | ||||
typedef void vd_suspend_t(struct vt_device *); | |||||
typedef void vd_resume_t(struct vt_device *); | |||||
struct vt_driver { | struct vt_driver { | ||||
char vd_name[16]; | char vd_name[16]; | ||||
/* Console attachment. */ | /* Console attachment. */ | ||||
vd_probe_t *vd_probe; | vd_probe_t *vd_probe; | ||||
vd_init_t *vd_init; | vd_init_t *vd_init; | ||||
/* Drawing. */ | /* Drawing. */ | ||||
vd_blank_t *vd_blank; | vd_blank_t *vd_blank; | ||||
vd_drawrect_t *vd_drawrect; | vd_drawrect_t *vd_drawrect; | ||||
vd_setpixel_t *vd_setpixel; | vd_setpixel_t *vd_setpixel; | ||||
vd_bitblt_text_t *vd_bitblt_text; | vd_bitblt_text_t *vd_bitblt_text; | ||||
vd_bitblt_bmp_t *vd_bitblt_bmp; | vd_bitblt_bmp_t *vd_bitblt_bmp; | ||||
/* Framebuffer ioctls, if present. */ | /* Framebuffer ioctls, if present. */ | ||||
vd_fb_ioctl_t *vd_fb_ioctl; | vd_fb_ioctl_t *vd_fb_ioctl; | ||||
/* Framebuffer mmap, if present. */ | /* Framebuffer mmap, if present. */ | ||||
vd_fb_mmap_t *vd_fb_mmap; | vd_fb_mmap_t *vd_fb_mmap; | ||||
/* Update display setting on vt switch. */ | /* Update display setting on vt switch. */ | ||||
vd_postswitch_t *vd_postswitch; | vd_postswitch_t *vd_postswitch; | ||||
/* Suspend/resume handlers. */ | |||||
vd_suspend_t *vd_suspend; | |||||
vd_resume_t *vd_resume; | |||||
/* Priority to know which one can override */ | /* Priority to know which one can override */ | ||||
int vd_priority; | int vd_priority; | ||||
#define VD_PRIORITY_DUMB 10 | #define VD_PRIORITY_DUMB 10 | ||||
#define VD_PRIORITY_GENERIC 100 | #define VD_PRIORITY_GENERIC 100 | ||||
#define VD_PRIORITY_SPECIFIC 1000 | #define VD_PRIORITY_SPECIFIC 1000 | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |