1*49567Sbostic /*- 2*49567Sbostic * Copyright (c) 1982, 1986 The Regents of the University of California. 3*49567Sbostic * All rights reserved. 433097Sbostic * 5*49567Sbostic * %sccs.include.redist.c% 6*49567Sbostic * 7*49567Sbostic * @(#)qvioctl.h 7.1 (Berkeley) 05/09/91 8*49567Sbostic */ 9*49567Sbostic 10*49567Sbostic /* 1134548Smarc * derived from: @(#)qvioctl.h 1.7 (ULTRIX) 6/11/85 1234548Smarc */ 1334548Smarc /* 1433097Sbostic * Ioctl definitions for the qvss. 1533097Sbostic */ 1633097Sbostic #ifdef KERNEL 1745805Sbostic #include "sys/ioctl.h" 1834548Smarc #include "qvreg.h" 1933097Sbostic #include "qevent.h" 2033097Sbostic #else 2133097Sbostic #include <sys/ioctl.h> 2245805Sbostic #include <vax/uba/qvreg.h> 2345805Sbostic #include <vax/uba/qevent.h> 2433097Sbostic #endif 2533097Sbostic 2633097Sbostic struct qv_kpcmd { 2733097Sbostic char nbytes; /* number of bytes in parameter */ 2833097Sbostic unsigned char cmd; /* command to be sent, peripheral bit will */ 2933097Sbostic /* be forced by driver */ 3033097Sbostic unsigned char par[2]; /* bytes of parameters to be sent */ 3133097Sbostic }; 3233097Sbostic /* 3333097Sbostic * qvss information block 3433097Sbostic */ 3533097Sbostic 3633097Sbostic struct qv_info { 3733097Sbostic short mswitches; /* current value of mouse buttons */ 3833097Sbostic vsCursor tablet; /* current tablet position */ 3933097Sbostic short tswitches; /* current tablet buttons NI! */ 4033097Sbostic vsCursor cursor; /* current cursor position */ 4133097Sbostic short row; /* screen row */ 4233097Sbostic short col; /* screen col */ 4333097Sbostic short max_row; /* max character row */ 4433097Sbostic short max_col; /* max character col */ 4533097Sbostic short max_x; /* max x position */ 4633097Sbostic short max_y; /* max y position */ 4733097Sbostic short max_cur_x; /* max cursor y position */ 4833097Sbostic short max_cur_y; /* max cursor y position */ 4933097Sbostic char *bitmap; /* bit map position */ 5033097Sbostic short *scanmap; /* scanline map position */ 5133097Sbostic short *cursorbits; /* cursor bit position */ 5233097Sbostic struct qvdevice *qvaddr; /* virtual address of the csr */ 5333097Sbostic vsEvent *ibuff; /* pointer to event queue */ 5433097Sbostic int iqsize; /* may assume power of two */ 5533097Sbostic int ihead; /* atomic write */ 5633097Sbostic int itail; /* atomic read */ 5733097Sbostic vsCursor mouse; /* atomic read/write */ 5833097Sbostic vsBox mbox; /* atomic read/write */ 5933097Sbostic short mthreshold; /* mouse motion parameter */ 6033097Sbostic short mscale; /* mouse scale factor (if 6133097Sbostic negative, then do square). */ 6233097Sbostic }; 6333097Sbostic typedef struct qv_info vsIoAddr; 6433097Sbostic 6533098Sbostic #define QIOCGINFO _IOR('q', 1, struct qv_info) /* get the info */ 6633098Sbostic #define QIOCSMSTATE _IOW('q', 2, vsCursor) /* set mouse pos */ 6733098Sbostic #define QIOCINIT _IO('q', 4) /* init screen */ 6833098Sbostic #define QIOCKPCMD _IOW('q', 5, struct qv_kpcmd) /* keybd. per. cmd */ 6933098Sbostic #define QIOCADDR _IOR('q', 6, struct qv_info *) /* get address */ 7033097Sbostic 71