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