summaryrefslogtreecommitdiffstats
path: root/sys/dev/vt/vt.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/vt/vt.h')
-rw-r--r--sys/dev/vt/vt.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/vt/vt.h b/sys/dev/vt/vt.h
index b660545..c804e56 100644
--- a/sys/dev/vt/vt.h
+++ b/sys/dev/vt/vt.h
@@ -114,11 +114,17 @@ typedef unsigned int vt_axis_t;
struct vt_mouse_cursor;
#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_window *vd_windows[VT_MAXWINDOWS]; /* (c) Windows. */
struct vt_window *vd_curwindow; /* (d) Current window. */
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. */
void *vd_softc; /* (u) Driver data. */
#ifndef SC_NO_CUTPASTE
@@ -152,6 +158,10 @@ struct vt_device {
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.
*
OpenPOWER on IntegriCloud