xref: /csrg-svn/sys/vax/uba/qevent.h (revision 34545)
1*34545Smarc /*
2*34545Smarc  * Copyright (c) 1982, 1986 Regents of the University of California.
3*34545Smarc  * All rights reserved.  The Berkeley software License Agreement
4*34545Smarc  * specifies the terms and conditions for redistribution.
5*34545Smarc  *
6*34545Smarc  * 		@(#)qevent.h	1.2  Berkeley  05/27/88
7*34545Smarc  */
834539Smarc /************************************************************************
934539Smarc *									*
1034539Smarc *			Copyright (c) 1985 by				*
1134539Smarc *		Digital Equipment Corporation, Maynard, MA		*
1234539Smarc *			All rights reserved.				*
1334539Smarc *									*
1434539Smarc *   This software is furnished under a license and may be used and	*
1534539Smarc *   copied  only  in accordance with the terms of such license and	*
1634539Smarc *   with the  inclusion  of  the  above  copyright  notice.   This	*
1734539Smarc *   software  or  any  other copies thereof may not be provided or	*
1834539Smarc *   otherwise made available to any other person.  No title to and	*
1934539Smarc *   ownership of the software is hereby transferred.			*
2034539Smarc *									*
2134539Smarc *   The information in this software is subject to change  without	*
2234539Smarc *   notice  and should not be construed as a commitment by Digital	*
2334539Smarc *   Equipment Corporation.						*
2434539Smarc *									*
2534539Smarc *   Digital assumes no responsibility for the use  or  reliability	*
2634539Smarc *   of its software on equipment which is not supplied by Digital.	*
2734539Smarc *									*
2834539Smarc ************************************************************************/
2934539Smarc 
3034539Smarc /*
3134539Smarc  * Event queue entries
3234539Smarc  */
3334539Smarc 
34*34545Smarc #ifndef _QEVENT_
35*34545Smarc #define _QEVENT_
3634539Smarc 
3734539Smarc typedef struct  _vs_event {
3834539Smarc         unsigned short vse_x;	/* x position */
3934539Smarc         unsigned short vse_y;	/* y position */
4034539Smarc         unsigned short vse_time;/* 10 millisecond units (button only) */
4134539Smarc         char    vse_type;       /* button or motion? */
4234539Smarc         unsigned char  vse_key;	/* the key (button only) */
4334539Smarc         char    vse_direction;	/* which direction (button only) */
4434539Smarc         char    vse_device;	/* which device (button only) */
4534539Smarc } vsEvent;
4634539Smarc 
4734539Smarc /* vse_type field */
4834539Smarc #define VSE_BUTTON      0               /* button moved */
4934539Smarc #define VSE_MMOTION     1               /* mouse moved */
5034539Smarc #define VSE_TMOTION     2               /* tablet moved */
5134539Smarc 
5234539Smarc /* vse_direction field */
5334539Smarc #define VSE_KBTUP       0               /* up */
5434539Smarc #define VSE_KBTDOWN     1               /* down */
5534539Smarc #define VSE_KBTRAW	2		/* undetermined */
5634539Smarc 
5734539Smarc /* vse_device field */
5834539Smarc #define VSE_NULL	0		/* NULL event (for QD_GETEVENT ret) */
5934539Smarc #define VSE_MOUSE       1               /* mouse */
6034539Smarc #define VSE_DKB         2               /* main keyboard */
6134539Smarc #define VSE_TABLET      3               /* graphics tablet */
6234539Smarc #define VSE_AUX         4               /* auxiliary */
6334539Smarc #define VSE_CONSOLE     5               /* console */
6434539Smarc 
6534539Smarc /* The event queue */
6634539Smarc 
6734539Smarc typedef struct _vs_eventqueue {
6834539Smarc 	vsEvent *events;	/* input event buffer */
6934539Smarc 	int size;		/* size of event buffer */
7034539Smarc 	int head;		/* index into events */
7134539Smarc 	int tail;		/* index into events */
7234539Smarc } vsEventQueue;
7334539Smarc 
7434539Smarc /* mouse cursor position */
7534539Smarc 
7634539Smarc typedef struct _vs_cursor {
7734539Smarc         short x;
7834539Smarc         short y;
7934539Smarc } vsCursor;
8034539Smarc 
8134539Smarc /* mouse motion rectangle */
8234539Smarc 
8334539Smarc typedef struct _vs_box {
8434539Smarc         short bottom;
8534539Smarc         short right;
8634539Smarc         short left;
8734539Smarc         short top;
8834539Smarc } vsBox;
8934539Smarc 
90*34545Smarc #endif /*_QEVENT_*/
91