Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/vt/vt.h
Show First 20 Lines • Show All 158 Lines • ▼ Show 20 Lines | #define VDF_DOWNGRADE 0x8000 /* The driver is being downgraded. */ | ||||
unsigned int vd_unit; /* (c) Device unit. */ | unsigned int vd_unit; /* (c) Device unit. */ | ||||
int vd_altbrk; /* (?) Alt break seq. state */ | int vd_altbrk; /* (?) Alt break seq. state */ | ||||
}; | }; | ||||
#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) | ||||
#define VT_LOCK(vd) mtx_lock(&(vd)->vd_lock) | |||||
#define VT_UNLOCK(vd) mtx_unlock(&(vd)->vd_lock) | |||||
#define VT_LOCK_ASSERT(vd, what) mtx_assert(&(vd)->vd_lock, what) | |||||
void vt_resume(struct vt_device *vd); | void vt_resume(struct vt_device *vd); | ||||
void vt_resume_flush_timer(struct vt_device *vd, int ms); | |||||
void vt_suspend(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 | ||||
▲ Show 20 Lines • Show All 182 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
/* | /* | ||||
* Console device madness. | * Console device madness. | ||||
* | * | ||||
* Utility macro to make early vt(4) instances work. | * Utility macro to make early vt(4) instances work. | ||||
*/ | */ | ||||
extern struct terminal vt_consterm; | |||||
extern const struct terminal_class vt_termclass; | extern const struct terminal_class vt_termclass; | ||||
void vt_upgrade(struct vt_device *vd); | void vt_upgrade(struct vt_device *vd); | ||||
#define PIXEL_WIDTH(w) ((w) / 8) | #define PIXEL_WIDTH(w) ((w) / 8) | ||||
#define PIXEL_HEIGHT(h) ((h) / 16) | #define PIXEL_HEIGHT(h) ((h) / 16) | ||||
#ifndef VT_FB_DEFAULT_WIDTH | #ifndef VT_FB_DEFAULT_WIDTH | ||||
#define VT_FB_DEFAULT_WIDTH 2048 | #define VT_FB_DEFAULT_WIDTH 2048 | ||||
▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | |||||
#ifndef SC_NO_CUTPASTE | #ifndef SC_NO_CUTPASTE | ||||
void vt_mouse_event(int type, int x, int y, int event, int cnt, int mlevel); | void vt_mouse_event(int type, int x, int y, int event, int cnt, int mlevel); | ||||
void vt_mouse_state(int show); | void vt_mouse_state(int show); | ||||
#endif | #endif | ||||
#define VT_MOUSE_SHOW 1 | #define VT_MOUSE_SHOW 1 | ||||
#define VT_MOUSE_HIDE 0 | #define VT_MOUSE_HIDE 0 | ||||
/* Utilities. */ | /* Utilities. */ | ||||
void vt_compute_drawable_area(struct vt_window *); | |||||
void vt_determine_colors(term_char_t c, int cursor, | void vt_determine_colors(term_char_t c, int cursor, | ||||
term_color_t *fg, term_color_t *bg); | term_color_t *fg, term_color_t *bg); | ||||
int vt_is_cursor_in_area(const struct vt_device *vd, | int vt_is_cursor_in_area(const struct vt_device *vd, | ||||
const term_rect_t *area); | const term_rect_t *area); | ||||
void vt_termsize(struct vt_device *, struct vt_font *, term_pos_t *); | |||||
void vt_winsize(struct vt_device *, struct vt_font *, struct winsize *); | |||||
/* Logos-on-boot. */ | |||||
#define VT_LOGOS_DRAW_BEASTIE 0 | |||||
#define VT_LOGOS_DRAW_ALT_BEASTIE 1 | |||||
#define VT_LOGOS_DRAW_ORB 2 | |||||
extern int vt_draw_logo_cpus; | |||||
extern int vt_splash_cpu; | |||||
extern int vt_splash_ncpu; | |||||
extern int vt_splash_cpu_style; | |||||
extern int vt_splash_cpu_duration; | |||||
extern const unsigned int vt_logo_sprite_height; | |||||
extern const unsigned int vt_logo_sprite_width; | |||||
void vtterm_draw_cpu_logos(struct vt_device *); | |||||
#endif /* !_DEV_VT_VT_H_ */ | #endif /* !_DEV_VT_VT_H_ */ | ||||