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