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