133097Sbostic /* 234548Smarc * Copyright (c) 1982, 1986 Regents of the University of California. 334548Smarc * All rights reserved. The Berkeley software License Agreement 434548Smarc * specifies the terms and conditions for redistribution. 533097Sbostic * 6*34629Smarc * @(#)qvioctl.h 1.4 Berkeley 06/03/88 7*34629Smarc * 834548Smarc * derived from: @(#)qvioctl.h 1.7 (ULTRIX) 6/11/85 934548Smarc */ 1034548Smarc /* 1133097Sbostic * Ioctl definitions for the qvss. 1233097Sbostic */ 1333097Sbostic #ifdef KERNEL 1434548Smarc #include "ioctl.h" 1534548Smarc #include "qvreg.h" 1633097Sbostic #include "qevent.h" 1733097Sbostic #else 1833097Sbostic #include <sys/ioctl.h> 1934548Smarc #include <vaxuba/qvreg.h> 2034548Smarc #include <vaxuba/qevent.h> 2133097Sbostic #endif 2233097Sbostic 2333097Sbostic struct qv_kpcmd { 2433097Sbostic char nbytes; /* number of bytes in parameter */ 2533097Sbostic unsigned char cmd; /* command to be sent, peripheral bit will */ 2633097Sbostic /* be forced by driver */ 2733097Sbostic unsigned char par[2]; /* bytes of parameters to be sent */ 2833097Sbostic }; 2933097Sbostic /* 3033097Sbostic * qvss information block 3133097Sbostic */ 3233097Sbostic 3333097Sbostic struct qv_info { 3433097Sbostic short mswitches; /* current value of mouse buttons */ 3533097Sbostic vsCursor tablet; /* current tablet position */ 3633097Sbostic short tswitches; /* current tablet buttons NI! */ 3733097Sbostic vsCursor cursor; /* current cursor position */ 3833097Sbostic short row; /* screen row */ 3933097Sbostic short col; /* screen col */ 4033097Sbostic short max_row; /* max character row */ 4133097Sbostic short max_col; /* max character col */ 4233097Sbostic short max_x; /* max x position */ 4333097Sbostic short max_y; /* max y position */ 4433097Sbostic short max_cur_x; /* max cursor y position */ 4533097Sbostic short max_cur_y; /* max cursor y position */ 4633097Sbostic char *bitmap; /* bit map position */ 4733097Sbostic short *scanmap; /* scanline map position */ 4833097Sbostic short *cursorbits; /* cursor bit position */ 4933097Sbostic struct qvdevice *qvaddr; /* virtual address of the csr */ 5033097Sbostic vsEvent *ibuff; /* pointer to event queue */ 5133097Sbostic int iqsize; /* may assume power of two */ 5233097Sbostic int ihead; /* atomic write */ 5333097Sbostic int itail; /* atomic read */ 5433097Sbostic vsCursor mouse; /* atomic read/write */ 5533097Sbostic vsBox mbox; /* atomic read/write */ 5633097Sbostic short mthreshold; /* mouse motion parameter */ 5733097Sbostic short mscale; /* mouse scale factor (if 5833097Sbostic negative, then do square). */ 5933097Sbostic }; 6033097Sbostic typedef struct qv_info vsIoAddr; 6133097Sbostic 6233098Sbostic #define QIOCGINFO _IOR('q', 1, struct qv_info) /* get the info */ 6333098Sbostic #define QIOCSMSTATE _IOW('q', 2, vsCursor) /* set mouse pos */ 6433098Sbostic #define QIOCINIT _IO('q', 4) /* init screen */ 6533098Sbostic #define QIOCKPCMD _IOW('q', 5, struct qv_kpcmd) /* keybd. per. cmd */ 6633098Sbostic #define QIOCADDR _IOR('q', 6, struct qv_info *) /* get address */ 6733097Sbostic 68