vt.h revision 259680
1228753Smm/*- 2228753Smm * Copyright (c) 2009, 2013 The FreeBSD Foundation 3228753Smm * All rights reserved. 4228753Smm * 5228753Smm * This software was developed by Ed Schouten under sponsorship from the 6228753Smm * FreeBSD Foundation. 7228753Smm * 8228753Smm * Portions of this software were developed by Oleksandr Rybalko 9228753Smm * under sponsorship from the FreeBSD Foundation. 10228753Smm * 11228753Smm * Redistribution and use in source and binary forms, with or without 12228753Smm * modification, are permitted provided that the following conditions 13228753Smm * are met: 14228753Smm * 1. Redistributions of source code must retain the above copyright 15228753Smm * notice, this list of conditions and the following disclaimer. 16228753Smm * 2. Redistributions in binary form must reproduce the above copyright 17228753Smm * notice, this list of conditions and the following disclaimer in the 18228753Smm * documentation and/or other materials provided with the distribution. 19228753Smm * 20228753Smm * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 21228753Smm * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22228753Smm * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23228753Smm * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 24228753Smm * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25228753Smm * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26228753Smm * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27228763Smm * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28228753Smm * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29228753Smm * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30228753Smm * SUCH DAMAGE. 31228753Smm * 32228753Smm * $FreeBSD: head/sys/dev/vt/vt.h 259680 2013-12-21 13:58:55Z emaste $ 33228753Smm */ 34228753Smm 35228753Smm#ifndef _DEV_VT_VT_H_ 36228753Smm#define _DEV_VT_VT_H_ 37228753Smm 38228753Smm#include <sys/param.h> 39228753Smm#include <sys/_lock.h> 40228753Smm#include <sys/_mutex.h> 41228753Smm#include <sys/callout.h> 42228753Smm#include <sys/condvar.h> 43228753Smm#include <sys/consio.h> 44228753Smm#include <sys/kbio.h> 45228753Smm#include <sys/mouse.h> 46228753Smm#include <sys/terminal.h> 47228753Smm#include <sys/sysctl.h> 48228753Smm 49228753Smm#include "opt_syscons.h" 50228753Smm#include "opt_splash.h" 51228753Smm 52228753Smm#ifdef DEV_SC 53228753Smm#error "Build with both syscons and vt is not supported. Please enable only \ 54228753Smmone 'device sc' or 'device vt'" 55228753Smm#endif 56228753Smm 57228753Smm#ifndef VT_MAXWINDOWS 58228753Smm#ifdef MAXCONS 59228753Smm#define VT_MAXWINDOWS MAXCONS 60228753Smm#else 61228753Smm#define VT_MAXWINDOWS 12 62228753Smm#endif 63228753Smm#endif 64228753Smm 65228753Smm#ifndef VT_ALT_TO_ESC_HACK 66228753Smm#define VT_ALT_TO_ESC_HACK 1 67228753Smm#endif 68228753Smm 69228753Smm#define VT_CONSWINDOW 0 70228753Smm 71228753Smm#if defined(SC_TWOBUTTON_MOUSE) || defined(VT_TWOBUTTON_MOUSE) 72228753Smm#define VT_MOUSE_PASTEBUTTON MOUSE_BUTTON3DOWN /* right button */ 73228753Smm#define VT_MOUSE_EXTENDBUTTON MOUSE_BUTTON2DOWN /* not really used */ 74228753Smm#else 75228753Smm#define VT_MOUSE_PASTEBUTTON MOUSE_BUTTON2DOWN /* middle button */ 76228753Smm#define VT_MOUSE_EXTENDBUTTON MOUSE_BUTTON3DOWN /* right button */ 77228753Smm#endif /* defined(SC_TWOBUTTON_MOUSE) || defined(VT_TWOBUTTON_MOUSE) */ 78228753Smm 79228753Smm#define SC_DRIVER_NAME "vt" 80228753Smm#define DPRINTF(_l, ...) if (vt_debug > (_l)) printf( __VA_ARGS__ ) 81228753Smm#define ISSIGVALID(sig) ((sig) > 0 && (sig) < NSIG) 82228753Smm 83228753Smm#define VT_SYSCTL_INT(_name, _default, _descr) \ 84228753Smmstatic int vt_##_name = _default; \ 85228753SmmSYSCTL_INT(_kern_vt, OID_AUTO, _name, CTLFLAG_RW, &vt_##_name, _default,\ 86228753Smm _descr); \ 87228753SmmTUNABLE_INT("kern.vt." #_name, &vt_##_name); 88228753Smm 89228753Smmstruct vt_driver; 90228753Smm 91228753Smmvoid vt_allocate(struct vt_driver *, void *); 92228753Smmvoid vt_resume(void); 93228753Smmvoid vt_suspend(void); 94228753Smm 95228753Smmtypedef unsigned int vt_axis_t; 96228753Smm 97228753Smm/* 98228753Smm * List of locks 99228753Smm * (d) locked by vd_lock 100228753Smm * (b) locked by vb_lock 101228753Smm * (G) locked by Giant 102228753Smm * (u) unlocked, locked by higher levels 103228753Smm * (c) const until freeing 104228753Smm * (?) yet to be determined 105228753Smm */ 106228753Smm 107228753Smm/* 108228753Smm * Per-device datastructure. 109228753Smm */ 110228753Smm 111228753Smmstruct vt_device { 112228753Smm struct vt_window *vd_windows[VT_MAXWINDOWS]; /* (c) Windows. */ 113228753Smm struct vt_window *vd_curwindow; /* (d) Current window. */ 114228753Smm struct vt_window *vd_savedwindow;/* (?) Saved for suspend. */ 115228753Smm struct vt_window *vd_markedwin; /* (?) Copy/paste buf owner. */ 116228753Smm const struct vt_driver *vd_driver; /* (c) Graphics driver. */ 117228753Smm void *vd_softc; /* (u) Driver data. */ 118228753Smm uint16_t vd_mx; /* (?) Mouse X. */ 119228753Smm uint16_t vd_my; /* (?) Mouse Y. */ 120228753Smm vt_axis_t vd_mdirtyx; /* (?) Screen width. */ 121228753Smm vt_axis_t vd_mdirtyy; /* (?) Screen height. */ 122228753Smm uint32_t vd_mstate; /* (?) Mouse state. */ 123228753Smm term_pos_t vd_offset; /* (?) Pixel offset. */ 124228753Smm vt_axis_t vd_width; /* (?) Screen width. */ 125228753Smm vt_axis_t vd_height; /* (?) Screen height. */ 126228753Smm struct mtx vd_lock; /* Per-device lock. */ 127228753Smm struct cv vd_winswitch; /* (d) Window switch notify. */ 128228753Smm struct callout vd_timer; /* (d) Display timer. */ 129228753Smm int vd_flags; /* (d) Device flags. */ 130228753Smm#define VDF_TEXTMODE 0x01 /* Do text mode rendering. */ 131228753Smm#define VDF_SPLASH 0x02 /* Splash screen active. */ 132228753Smm#define VDF_ASYNC 0x04 /* vt_timer() running. */ 133228753Smm#define VDF_INVALID 0x08 /* Entire screen should be re-rendered. */ 134228753Smm#define VDF_DEAD 0x10 /* Early probing found nothing. */ 135228753Smm#define VDF_INITIALIZED 0x20 /* vtterm_cnprobe already done. */ 136228753Smm#define VDF_MOUSECURSOR 0x40 /* Mouse cursor visible. */ 137228753Smm int vd_keyboard; /* (G) Keyboard index. */ 138228753Smm unsigned int vd_kbstate; /* (?) Device unit. */ 139228753Smm unsigned int vd_unit; /* (c) Device unit. */ 140228753Smm}; 141228753Smm 142228753Smm/* 143228753Smm * Per-window terminal screen buffer. 144228753Smm * 145228753Smm * Because redrawing is performed asynchronously, the buffer keeps track 146228753Smm * of a rectangle that needs to be redrawn (vb_dirtyrect). Because this 147228753Smm * approach seemed to cause suboptimal performance (when the top left 148228753Smm * and the bottom right of the screen are modified), it also uses a set 149228753Smm * of bitmasks to keep track of the rows and columns (mod 64) that have 150228753Smm * been modified. 151228753Smm */ 152228753Smm 153228753Smmstruct vt_bufmask { 154228753Smm uint64_t vbm_row, vbm_col; 155228753Smm#define VBM_DIRTY UINT64_MAX 156228753Smm}; 157228753Smm 158228753Smmstruct vt_buf { 159228753Smm struct mtx vb_lock; /* Buffer lock. */ 160228753Smm term_pos_t vb_scr_size; /* (b) Screen dimensions. */ 161228753Smm int vb_flags; /* (b) Flags. */ 162228753Smm#define VBF_CURSOR 0x1 /* Cursor visible. */ 163228753Smm#define VBF_STATIC 0x2 /* Buffer is statically allocated. */ 164228753Smm#define VBF_MTX_INIT 0x4 /* Mutex initialized. */ 165228753Smm#define VBF_SCROLL 0x8 /* scroll locked mode. */ 166228753Smm#define VBF_HISTORY_FULL 0x10 /* All rows filled. */ 167228753Smm int vb_history_size; 168228753Smm#define VBF_DEFAULT_HISTORY_SIZE 500 169228753Smm int vb_roffset; /* (b) History rows offset. */ 170228753Smm int vb_curroffset; /* (b) Saved rows offset. */ 171228753Smm term_pos_t vb_cursor; /* (u) Cursor position. */ 172228753Smm term_pos_t vb_mark_start; /* (b) Copy region start. */ 173228753Smm term_pos_t vb_mark_end; /* (b) Copy region end. */ 174228753Smm int vb_mark_last; /* Last mouse event. */ 175228753Smm term_rect_t vb_dirtyrect; /* (b) Dirty rectangle. */ 176228753Smm struct vt_bufmask vb_dirtymask; /* (b) Dirty bitmasks. */ 177228753Smm term_char_t *vb_buffer; /* (u) Data buffer. */ 178228753Smm term_char_t **vb_rows; /* (u) Array of rows */ 179228753Smm}; 180228753Smm 181228753Smmvoid vtbuf_copy(struct vt_buf *, const term_rect_t *, const term_pos_t *); 182228753Smmvoid vtbuf_fill_locked(struct vt_buf *, const term_rect_t *, term_char_t); 183228753Smmvoid vtbuf_init_early(struct vt_buf *); 184228753Smmvoid vtbuf_init(struct vt_buf *, const term_pos_t *); 185228753Smmvoid vtbuf_grow(struct vt_buf *, const term_pos_t *, int); 186228753Smmvoid vtbuf_putchar(struct vt_buf *, const term_pos_t *, term_char_t); 187228753Smmvoid vtbuf_cursor_position(struct vt_buf *, const term_pos_t *); 188228753Smmvoid vtbuf_scroll_mode(struct vt_buf *vb, int yes); 189228753Smmvoid vtbuf_undirty(struct vt_buf *, term_rect_t *, struct vt_bufmask *); 190228753Smmvoid vtbuf_sethistory_size(struct vt_buf *, int); 191228753Smmint vtbuf_iscursor(struct vt_buf *vb, int row, int col); 192228753Smmvoid vtbuf_cursor_visibility(struct vt_buf *, int); 193228753Smm#ifndef SC_NO_CUTPASTE 194228753Smmvoid vtbuf_mouse_cursor_position(struct vt_buf *vb, int col, int row); 195228753Smmint vtbuf_set_mark(struct vt_buf *vb, int type, int col, int row); 196228753Smmint vtbuf_get_marked_len(struct vt_buf *vb); 197228753Smmvoid vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int sz); 198228753Smm#endif 199228753Smm 200228753Smm#define VTB_MARK_NONE 0 201228753Smm#define VTB_MARK_END 1 202228753Smm#define VTB_MARK_START 2 203228753Smm#define VTB_MARK_WORD 3 204228753Smm#define VTB_MARK_ROW 4 205228753Smm#define VTB_MARK_EXTEND 5 206228753Smm#define VTB_MARK_MOVE 6 207228753Smm 208228753Smm#define VTBUF_SLCK_ENABLE(vb) vtbuf_scroll_mode((vb), 1) 209228753Smm#define VTBUF_SLCK_DISABLE(vb) vtbuf_scroll_mode((vb), 0) 210228753Smm 211228753Smm#define VTBUF_MAX_HEIGHT(vb) \ 212228753Smm ((vb)->vb_history_size) 213228753Smm#define VTBUF_GET_ROW(vb, r) \ 214228753Smm ((vb)->vb_rows[((vb)->vb_roffset + (r)) % VTBUF_MAX_HEIGHT(vb)]) 215228753Smm#define VTBUF_GET_FIELD(vb, r, c) \ 216228753Smm ((vb)->vb_rows[((vb)->vb_roffset + (r)) % VTBUF_MAX_HEIGHT(vb)][(c)]) 217228753Smm#define VTBUF_FIELD(vb, r, c) \ 218228753Smm ((vb)->vb_rows[((vb)->vb_curroffset + (r)) % VTBUF_MAX_HEIGHT(vb)][(c)]) 219228753Smm#define VTBUF_ISCURSOR(vb, r, c) \ 220228753Smm vtbuf_iscursor((vb), (r), (c)) 221228753Smm#define VTBUF_DIRTYROW(mask, row) \ 222228753Smm ((mask)->vbm_row & ((uint64_t)1 << ((row) % 64))) 223228753Smm#define VTBUF_DIRTYCOL(mask, col) \ 224228753Smm ((mask)->vbm_col & ((uint64_t)1 << ((col) % 64))) 225228753Smm#define VTBUF_SPACE_CHAR (' ' | TC_WHITE << 26 | TC_BLACK << 29) 226228753Smm 227228753Smm#define VHS_SET 0 228228753Smm#define VHS_CUR 1 229228753Smm#define VHS_END 2 230228753Smmint vthistory_seek(struct vt_buf *, int offset, int whence); 231228753Smmvoid vthistory_addlines(struct vt_buf *vb, int offset); 232228753Smmvoid vthistory_getpos(const struct vt_buf *, unsigned int *offset); 233228753Smm 234228753Smm/* 235228753Smm * Per-window datastructure. 236228753Smm */ 237228753Smm 238228753Smmstruct vt_window { 239228753Smm struct vt_device *vw_device; /* (c) Device. */ 240228753Smm struct terminal *vw_terminal; /* (c) Terminal. */ 241228753Smm struct vt_buf vw_buf; /* (u) Screen buffer. */ 242228753Smm struct vt_font *vw_font; /* (d) Graphical font. */ 243228753Smm unsigned int vw_number; /* (c) Window number. */ 244228753Smm int vw_kbdmode; /* (?) Keyboard mode. */ 245228753Smm char *vw_kbdsq; /* Escape sequence queue*/ 246228753Smm unsigned int vw_flags; /* (d) Per-window flags. */ 247228753Smm int vw_mouse_level;/* Mouse op mode. */ 248228753Smm#define VWF_BUSY 0x1 /* Busy reconfiguring device. */ 249228753Smm#define VWF_OPENED 0x2 /* TTY in use. */ 250228753Smm#define VWF_SCROLL 0x4 /* Keys influence scrollback. */ 251228753Smm#define VWF_CONSOLE 0x8 /* Kernel message console window. */ 252228753Smm#define VWF_VTYLOCK 0x10 /* Prevent window switch. */ 253228753Smm#define VWF_MOUSE_HIDE 0x20 /* Disable mouse events processing. */ 254228753Smm#define VWF_SWWAIT_REL 0x10000 /* Program wait for VT acquire is done. */ 255228753Smm#define VWF_SWWAIT_ACQ 0x20000 /* Program wait for VT release is done. */ 256228753Smm pid_t vw_pid; /* Terminal holding process */ 257228753Smm struct proc *vw_proc; 258228753Smm struct vt_mode vw_smode; /* switch mode */ 259228753Smm struct callout vw_proc_dead_timer; 260228753Smm struct vt_window *vw_switch_to; 261228753Smm}; 262228753Smm 263228753Smm#define VT_AUTO 0 /* switching is automatic */ 264228753Smm#define VT_PROCESS 1 /* switching controlled by prog */ 265228753Smm#define VT_KERNEL 255 /* switching controlled in kernel */ 266228753Smm 267228753Smm#define IS_VT_PROC_MODE(vw) ((vw)->vw_smode.mode == VT_PROCESS) 268228753Smm 269228753Smm/* 270228753Smm * Per-device driver routines. 271228753Smm * 272228753Smm * vd_bitbltchr is used when the driver operates in graphics mode, while 273228753Smm * vd_putchar is used when the driver operates in text mode 274228753Smm * (VDF_TEXTMODE). 275228753Smm */ 276228753Smm 277228753Smmtypedef int vd_init_t(struct vt_device *vd); 278228753Smmtypedef void vd_postswitch_t(struct vt_device *vd); 279228753Smmtypedef void vd_blank_t(struct vt_device *vd, term_color_t color); 280228753Smmtypedef void vd_bitbltchr_t(struct vt_device *vd, const uint8_t *src, 281228753Smm const uint8_t *mask, int bpl, vt_axis_t top, vt_axis_t left, 282228753Smm unsigned int width, unsigned int height, term_color_t fg, term_color_t bg); 283228753Smmtypedef void vd_putchar_t(struct vt_device *vd, term_char_t, 284228753Smm vt_axis_t top, vt_axis_t left, term_color_t fg, term_color_t bg); 285228753Smm 286228753Smmstruct vt_driver { 287228753Smm /* Console attachment. */ 288228753Smm vd_init_t *vd_init; 289228753Smm 290228753Smm /* Drawing. */ 291228753Smm vd_blank_t *vd_blank; 292228753Smm vd_bitbltchr_t *vd_bitbltchr; 293228753Smm 294228753Smm /* Text mode operation. */ 295228753Smm vd_putchar_t *vd_putchar; 296228753Smm 297228753Smm /* Update display setting on vt switch. */ 298228753Smm vd_postswitch_t *vd_postswitch; 299228753Smm 300228753Smm /* Priority to know which one can override */ 301228753Smm int vd_priority; 302228753Smm#define VD_PRIORITY_DUMB 10 303228753Smm#define VD_PRIORITY_GENERIC 100 304228753Smm#define VD_PRIORITY_SPECIFIC 1000 305228753Smm}; 306228753Smm 307228753Smm/* 308228753Smm * Console device madness. 309228753Smm * 310228753Smm * Utility macro to make early vt(4) instances work. 311228753Smm */ 312228753Smm 313228753Smmextern const struct terminal_class vt_termclass; 314228753Smmvoid vt_upgrade(struct vt_device *vd); 315228753Smm 316228753Smm#define PIXEL_WIDTH(w) ((w) / 8) 317228753Smm#define PIXEL_HEIGHT(h) ((h) / 16) 318228753Smm 319228753Smm#ifndef VT_FB_DEFAULT_WIDTH 320228753Smm#define VT_FB_DEFAULT_WIDTH 640 321228753Smm#endif 322228753Smm#ifndef VT_FB_DEFAULT_HEIGHT 323228753Smm#define VT_FB_DEFAULT_HEIGHT 480 324228753Smm#endif 325228753Smm 326228753Smm#define VT_CONSDEV_DECLARE(driver, width, height, softc) \ 327228753Smmstatic struct terminal driver ## _consterm; \ 328228753Smmstatic struct vt_window driver ## _conswindow; \ 329228753Smmstatic struct vt_device driver ## _consdev = { \ 330228753Smm .vd_driver = &driver, \ 331228753Smm .vd_softc = (softc), \ 332228753Smm .vd_flags = VDF_INVALID, \ 333228753Smm .vd_windows = { [VT_CONSWINDOW] = &driver ## _conswindow, }, \ 334228753Smm .vd_curwindow = &driver ## _conswindow, \ 335228753Smm .vd_markedwin = NULL, \ 336228753Smm .vd_kbstate = 0, \ 337228753Smm}; \ 338228753Smmstatic term_char_t driver ## _constextbuf[(width) * \ 339228753Smm (VBF_DEFAULT_HISTORY_SIZE)]; \ 340228753Smmstatic term_char_t *driver ## _constextbufrows[ \ 341228753Smm VBF_DEFAULT_HISTORY_SIZE]; \ 342228753Smmstatic struct vt_window driver ## _conswindow = { \ 343228753Smm .vw_number = VT_CONSWINDOW, \ 344228753Smm .vw_flags = VWF_CONSOLE, \ 345228753Smm .vw_buf = { \ 346228753Smm .vb_buffer = driver ## _constextbuf, \ 347228753Smm .vb_rows = driver ## _constextbufrows, \ 348228753Smm .vb_history_size = VBF_DEFAULT_HISTORY_SIZE, \ 349228753Smm .vb_curroffset = 0, \ 350228753Smm .vb_roffset = 0, \ 351228753Smm .vb_flags = VBF_STATIC, \ 352228753Smm .vb_mark_start = { \ 353228753Smm .tp_row = 0, \ 354228753Smm .tp_col = 0, \ 355228753Smm }, \ 356228753Smm .vb_mark_end = { \ 357228753Smm .tp_row = 0, \ 358228753Smm .tp_col = 0, \ 359228753Smm }, \ 360228753Smm .vb_scr_size = { \ 361228753Smm .tp_row = height, \ 362228753Smm .tp_col = width, \ 363228753Smm }, \ 364228753Smm }, \ 365228753Smm .vw_device = &driver ## _consdev, \ 366228753Smm .vw_terminal = &driver ## _consterm, \ 367228753Smm .vw_kbdmode = K_XLATE, \ 368228753Smm}; \ 369228753SmmTERMINAL_DECLARE_EARLY(driver ## _consterm, vt_termclass, \ 370228753Smm &driver ## _conswindow); \ 371228753SmmSYSINIT(vt_early_cons, SI_SUB_INT_CONFIG_HOOKS, SI_ORDER_ANY, \ 372228753Smm vt_upgrade, &driver ## _consdev) 373228753Smm 374228753Smm/* 375228753Smm * Fonts. 376228753Smm * 377228753Smm * Remapping tables are used to map Unicode points to glyphs. They need 378228753Smm * to be sorted, because vtfont_lookup() performs a binary search. Each 379228753Smm * font has two remapping tables, for normal and bold. When a character 380228753Smm * is not present in bold, it uses a normal glyph. When no glyph is 381228753Smm * available, it uses glyph 0, which is normally equal to U+FFFD. 382228753Smm */ 383228753Smm 384228753Smmstruct vt_font_map { 385228753Smm uint32_t vfm_src; 386228753Smm uint16_t vfm_dst; 387228753Smm uint16_t vfm_len; 388228753Smm}; 389228753Smm 390228753Smmstruct vt_font { 391228753Smm struct vt_font_map *vf_map[VFNT_MAPS]; 392228753Smm uint8_t *vf_bytes; 393228753Smm unsigned int vf_height, vf_width; 394228753Smm unsigned int vf_map_count[VFNT_MAPS]; 395228753Smm unsigned int vf_refcount; 396228753Smm}; 397228753Smm 398228753Smm#ifndef SC_NO_CUTPASTE 399228753Smmstruct mouse_cursor { 400228753Smm uint8_t map[64 * 64 / 8]; 401228753Smm uint8_t mask[64 * 64 / 8]; 402228753Smm uint8_t w; 403228753Smm uint8_t h; 404228753Smm}; 405228753Smm#endif 406228753Smm 407228753Smmconst uint8_t *vtfont_lookup(const struct vt_font *vf, term_char_t c); 408228753Smmstruct vt_font *vtfont_ref(struct vt_font *vf); 409228753Smmvoid vtfont_unref(struct vt_font *vf); 410228753Smmint vtfont_load(vfnt_t *f, struct vt_font **ret); 411228753Smm 412228753Smm/* Sysmouse. */ 413228753Smmvoid sysmouse_process_event(mouse_info_t *mi); 414228753Smm#ifndef SC_NO_CUTPASTE 415228753Smmvoid vt_mouse_event(int type, int x, int y, int event, int cnt, int mlevel); 416228753Smmvoid vt_mouse_state(int show); 417228753Smm#endif 418228753Smm#define VT_MOUSE_SHOW 1 419228753Smm#define VT_MOUSE_HIDE 0 420228753Smm 421228753Smm#endif /* !_DEV_VT_VT_H_ */ 422228753Smm 423228753Smm