vt.h (274868) | vt.h (282749) |
---|---|
1/*- 2 * Copyright (c) 2009, 2013 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Ed Schouten under sponsorship from the 6 * FreeBSD Foundation. 7 * 8 * Portions of this software were developed by Oleksandr Rybalko --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * | 1/*- 2 * Copyright (c) 2009, 2013 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Ed Schouten under sponsorship from the 6 * FreeBSD Foundation. 7 * 8 * Portions of this software were developed by Oleksandr Rybalko --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * |
32 * $FreeBSD: stable/10/sys/dev/vt/vt.h 274868 2014-11-22 17:47:03Z dumbbell $ | 32 * $FreeBSD: stable/10/sys/dev/vt/vt.h 282749 2015-05-11 08:00:16Z avg $ |
33 */ 34 35#ifndef _DEV_VT_VT_H_ 36#define _DEV_VT_VT_H_ 37 38#include <sys/param.h> 39#include <sys/_lock.h> 40#include <sys/_mutex.h> --- 45 unchanged lines hidden (view full) --- 86static int vt_##_name = _default; \ 87SYSCTL_INT(_kern_vt, OID_AUTO, _name, CTLFLAG_RW, &vt_##_name, _default,\ 88 _descr); \ 89TUNABLE_INT("kern.vt." #_name, &vt_##_name); 90 91struct vt_driver; 92 93void vt_allocate(struct vt_driver *, void *); | 33 */ 34 35#ifndef _DEV_VT_VT_H_ 36#define _DEV_VT_VT_H_ 37 38#include <sys/param.h> 39#include <sys/_lock.h> 40#include <sys/_mutex.h> --- 45 unchanged lines hidden (view full) --- 86static int vt_##_name = _default; \ 87SYSCTL_INT(_kern_vt, OID_AUTO, _name, CTLFLAG_RW, &vt_##_name, _default,\ 88 _descr); \ 89TUNABLE_INT("kern.vt." #_name, &vt_##_name); 90 91struct vt_driver; 92 93void vt_allocate(struct vt_driver *, void *); |
94void vt_resume(void); 95void vt_suspend(void); | |
96 97typedef unsigned int vt_axis_t; 98 99/* 100 * List of locks 101 * (d) locked by vd_lock 102 * (b) locked by vb_lock 103 * (G) locked by Giant --- 53 unchanged lines hidden (view full) --- 157 unsigned int vd_kbstate; /* (?) Device unit. */ 158 unsigned int vd_unit; /* (c) Device unit. */ 159}; 160 161#define VD_PASTEBUF(vd) ((vd)->vd_pastebuf.vpb_buf) 162#define VD_PASTEBUFSZ(vd) ((vd)->vd_pastebuf.vpb_bufsz) 163#define VD_PASTEBUFLEN(vd) ((vd)->vd_pastebuf.vpb_len) 164 | 94 95typedef unsigned int vt_axis_t; 96 97/* 98 * List of locks 99 * (d) locked by vd_lock 100 * (b) locked by vb_lock 101 * (G) locked by Giant --- 53 unchanged lines hidden (view full) --- 155 unsigned int vd_kbstate; /* (?) Device unit. */ 156 unsigned int vd_unit; /* (c) Device unit. */ 157}; 158 159#define VD_PASTEBUF(vd) ((vd)->vd_pastebuf.vpb_buf) 160#define VD_PASTEBUFSZ(vd) ((vd)->vd_pastebuf.vpb_bufsz) 161#define VD_PASTEBUFLEN(vd) ((vd)->vd_pastebuf.vpb_len) 162 |
163void vt_resume(struct vt_device *vd); 164void vt_suspend(struct vt_device *vd); 165 |
|
165/* 166 * Per-window terminal screen buffer. 167 * 168 * Because redrawing is performed asynchronously, the buffer keeps track 169 * of a rectangle that needs to be redrawn (vb_dirtyrect). Because this 170 * approach seemed to cause suboptimal performance (when the top left 171 * and the bottom right of the screen are modified), it also uses a set 172 * of bitmasks to keep track of the rows and columns (mod 64) that have --- 136 unchanged lines hidden (view full) --- 309 unsigned int width, unsigned int height, 310 unsigned int x, unsigned int y, term_color_t fg, term_color_t bg); 311typedef int vd_fb_ioctl_t(struct vt_device *, u_long, caddr_t, struct thread *); 312typedef int vd_fb_mmap_t(struct vt_device *, vm_ooffset_t, vm_paddr_t *, int, 313 vm_memattr_t *); 314typedef void vd_drawrect_t(struct vt_device *, int, int, int, int, int, 315 term_color_t); 316typedef void vd_setpixel_t(struct vt_device *, int, int, term_color_t); | 166/* 167 * Per-window terminal screen buffer. 168 * 169 * Because redrawing is performed asynchronously, the buffer keeps track 170 * of a rectangle that needs to be redrawn (vb_dirtyrect). Because this 171 * approach seemed to cause suboptimal performance (when the top left 172 * and the bottom right of the screen are modified), it also uses a set 173 * of bitmasks to keep track of the rows and columns (mod 64) that have --- 136 unchanged lines hidden (view full) --- 310 unsigned int width, unsigned int height, 311 unsigned int x, unsigned int y, term_color_t fg, term_color_t bg); 312typedef int vd_fb_ioctl_t(struct vt_device *, u_long, caddr_t, struct thread *); 313typedef int vd_fb_mmap_t(struct vt_device *, vm_ooffset_t, vm_paddr_t *, int, 314 vm_memattr_t *); 315typedef void vd_drawrect_t(struct vt_device *, int, int, int, int, int, 316 term_color_t); 317typedef void vd_setpixel_t(struct vt_device *, int, int, term_color_t); |
318typedef void vd_suspend_t(struct vt_device *); 319typedef void vd_resume_t(struct vt_device *); |
|
317 318struct vt_driver { 319 char vd_name[16]; 320 /* Console attachment. */ 321 vd_probe_t *vd_probe; 322 vd_init_t *vd_init; 323 324 /* Drawing. */ --- 7 unchanged lines hidden (view full) --- 332 vd_fb_ioctl_t *vd_fb_ioctl; 333 334 /* Framebuffer mmap, if present. */ 335 vd_fb_mmap_t *vd_fb_mmap; 336 337 /* Update display setting on vt switch. */ 338 vd_postswitch_t *vd_postswitch; 339 | 320 321struct vt_driver { 322 char vd_name[16]; 323 /* Console attachment. */ 324 vd_probe_t *vd_probe; 325 vd_init_t *vd_init; 326 327 /* Drawing. */ --- 7 unchanged lines hidden (view full) --- 335 vd_fb_ioctl_t *vd_fb_ioctl; 336 337 /* Framebuffer mmap, if present. */ 338 vd_fb_mmap_t *vd_fb_mmap; 339 340 /* Update display setting on vt switch. */ 341 vd_postswitch_t *vd_postswitch; 342 |
343 /* Suspend/resume handlers. */ 344 vd_suspend_t *vd_suspend; 345 vd_resume_t *vd_resume; 346 |
|
340 /* Priority to know which one can override */ 341 int vd_priority; 342#define VD_PRIORITY_DUMB 10 343#define VD_PRIORITY_GENERIC 100 344#define VD_PRIORITY_SPECIFIC 1000 345}; 346 347/* --- 76 unchanged lines hidden --- | 347 /* Priority to know which one can override */ 348 int vd_priority; 349#define VD_PRIORITY_DUMB 10 350#define VD_PRIORITY_GENERIC 100 351#define VD_PRIORITY_SPECIFIC 1000 352}; 353 354/* --- 76 unchanged lines hidden --- |