xref: /original-bsd/sys/vax/uba/qevent.h (revision c6ddb5f9)
1 /*-
2  * Copyright (c) 1982, 1986 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)qevent.h	7.1 (Berkeley) 05/09/91
8  */
9 
10 /************************************************************************
11 *									*
12 *			Copyright (c) 1985 by				*
13 *		Digital Equipment Corporation, Maynard, MA		*
14 *			All rights reserved.				*
15 *									*
16 *   This software is furnished under a license and may be used and	*
17 *   copied  only  in accordance with the terms of such license and	*
18 *   with the  inclusion  of  the  above  copyright  notice.   This	*
19 *   software  or  any  other copies thereof may not be provided or	*
20 *   otherwise made available to any other person.  No title to and	*
21 *   ownership of the software is hereby transferred.			*
22 *									*
23 *   The information in this software is subject to change  without	*
24 *   notice  and should not be construed as a commitment by Digital	*
25 *   Equipment Corporation.						*
26 *									*
27 *   Digital assumes no responsibility for the use  or  reliability	*
28 *   of its software on equipment which is not supplied by Digital.	*
29 *									*
30 ************************************************************************/
31 
32 /*
33  * Event queue entries
34  */
35 
36 #ifndef _QEVENT_
37 #define _QEVENT_
38 
39 typedef struct  _vs_event {
40         unsigned short vse_x;	/* x position */
41         unsigned short vse_y;	/* y position */
42         unsigned short vse_time;/* 10 millisecond units (button only) */
43         char    vse_type;       /* button or motion? */
44         unsigned char  vse_key;	/* the key (button only) */
45         char    vse_direction;	/* which direction (button only) */
46         char    vse_device;	/* which device (button only) */
47 } vsEvent;
48 
49 /* vse_type field */
50 #define VSE_BUTTON      0               /* button moved */
51 #define VSE_MMOTION     1               /* mouse moved */
52 #define VSE_TMOTION     2               /* tablet moved */
53 
54 /* vse_direction field */
55 #define VSE_KBTUP       0               /* up */
56 #define VSE_KBTDOWN     1               /* down */
57 #define VSE_KBTRAW	2		/* undetermined */
58 
59 /* vse_device field */
60 #define VSE_NULL	0		/* NULL event (for QD_GETEVENT ret) */
61 #define VSE_MOUSE       1               /* mouse */
62 #define VSE_DKB         2               /* main keyboard */
63 #define VSE_TABLET      3               /* graphics tablet */
64 #define VSE_AUX         4               /* auxiliary */
65 #define VSE_CONSOLE     5               /* console */
66 
67 /* The event queue */
68 
69 typedef struct _vs_eventqueue {
70 	vsEvent *events;	/* input event buffer */
71 	int size;		/* size of event buffer */
72 	int head;		/* index into events */
73 	int tail;		/* index into events */
74 } vsEventQueue;
75 
76 /* mouse cursor position */
77 
78 typedef struct _vs_cursor {
79         short x;
80         short y;
81 } vsCursor;
82 
83 /* mouse motion rectangle */
84 
85 typedef struct _vs_box {
86         short bottom;
87         short right;
88         short left;
89         short top;
90 } vsBox;
91 
92 #endif /*_QEVENT_*/
93