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