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