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