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