1 /*- 2 * Copyright (c) 1982, 1986 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)qvioctl.h 7.1 (Berkeley) 05/09/91 8 */ 9 10 /* 11 * derived from: @(#)qvioctl.h 1.7 (ULTRIX) 6/11/85 12 */ 13 /* 14 * Ioctl definitions for the qvss. 15 */ 16 #ifdef KERNEL 17 #include "sys/ioctl.h" 18 #include "qvreg.h" 19 #include "qevent.h" 20 #else 21 #include <sys/ioctl.h> 22 #include <vax/uba/qvreg.h> 23 #include <vax/uba/qevent.h> 24 #endif 25 26 struct qv_kpcmd { 27 char nbytes; /* number of bytes in parameter */ 28 unsigned char cmd; /* command to be sent, peripheral bit will */ 29 /* be forced by driver */ 30 unsigned char par[2]; /* bytes of parameters to be sent */ 31 }; 32 /* 33 * qvss information block 34 */ 35 36 struct qv_info { 37 short mswitches; /* current value of mouse buttons */ 38 vsCursor tablet; /* current tablet position */ 39 short tswitches; /* current tablet buttons NI! */ 40 vsCursor cursor; /* current cursor position */ 41 short row; /* screen row */ 42 short col; /* screen col */ 43 short max_row; /* max character row */ 44 short max_col; /* max character col */ 45 short max_x; /* max x position */ 46 short max_y; /* max y position */ 47 short max_cur_x; /* max cursor y position */ 48 short max_cur_y; /* max cursor y position */ 49 char *bitmap; /* bit map position */ 50 short *scanmap; /* scanline map position */ 51 short *cursorbits; /* cursor bit position */ 52 struct qvdevice *qvaddr; /* virtual address of the csr */ 53 vsEvent *ibuff; /* pointer to event queue */ 54 int iqsize; /* may assume power of two */ 55 int ihead; /* atomic write */ 56 int itail; /* atomic read */ 57 vsCursor mouse; /* atomic read/write */ 58 vsBox mbox; /* atomic read/write */ 59 short mthreshold; /* mouse motion parameter */ 60 short mscale; /* mouse scale factor (if 61 negative, then do square). */ 62 }; 63 typedef struct qv_info vsIoAddr; 64 65 #define QIOCGINFO _IOR('q', 1, struct qv_info) /* get the info */ 66 #define QIOCSMSTATE _IOW('q', 2, vsCursor) /* set mouse pos */ 67 #define QIOCINIT _IO('q', 4) /* init screen */ 68 #define QIOCKPCMD _IOW('q', 5, struct qv_kpcmd) /* keybd. per. cmd */ 69 #define QIOCADDR _IOR('q', 6, struct qv_info *) /* get address */ 70 71