[BACK]Return to qevent.h CVS log [TXT][DIR] Up to [local] / sys / arch / vax / qbus

Annotation of sys/arch/vax/qbus/qevent.h, Revision 1.1.1.1

1.1       nbrk        1: /*     $OpenBSD: qevent.h,v 1.2 2003/06/02 23:27:58 millert Exp $      */
                      2: /*     $NetBSD: qevent.h,v 1.1 1998/03/21 10:02:39 ragge Exp $ */
                      3: /*-
                      4:  * Copyright (c) 1982, 1986 The Regents of the University of California.
                      5:  * All rights reserved.
                      6:  *
                      7:  * Redistribution and use in source and binary forms, with or without
                      8:  * modification, are permitted provided that the following conditions
                      9:  * are met:
                     10:  * 1. Redistributions of source code must retain the above copyright
                     11:  *    notice, this list of conditions and the following disclaimer.
                     12:  * 2. Redistributions in binary form must reproduce the above copyright
                     13:  *    notice, this list of conditions and the following disclaimer in the
                     14:  *    documentation and/or other materials provided with the distribution.
                     15:  * 3. Neither the name of the University nor the names of its contributors
                     16:  *    may be used to endorse or promote products derived from this software
                     17:  *    without specific prior written permission.
                     18:  *
                     19:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     20:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     21:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     22:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     23:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     24:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     25:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     26:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     27:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     28:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     29:  * SUCH DAMAGE.
                     30:  *
                     31:  *     @(#)qevent.h    7.1 (Berkeley) 5/9/91
                     32:  */
                     33:
                     34: /************************************************************************
                     35: *                                                                      *
                     36: *                      Copyright (c) 1985 by                           *
                     37: *              Digital Equipment Corporation, Maynard, MA              *
                     38: *                      All rights reserved.                            *
                     39: *                                                                      *
                     40: *   This software is furnished under a license and may be used and     *
                     41: *   copied  only  in accordance with the terms of such license and     *
                     42: *   with the  inclusion  of  the  above  copyright  notice.   This     *
                     43: *   software  or  any  other copies thereof may not be provided or     *
                     44: *   otherwise made available to any other person.  No title to and     *
                     45: *   ownership of the software is hereby transferred.                   *
                     46: *                                                                      *
                     47: *   The information in this software is subject to change  without     *
                     48: *   notice  and should not be construed as a commitment by Digital     *
                     49: *   Equipment Corporation.                                             *
                     50: *                                                                      *
                     51: *   Digital assumes no responsibility for the use  or  reliability     *
                     52: *   of its software on equipment which is not supplied by Digital.     *
                     53: *                                                                      *
                     54: ************************************************************************/
                     55:
                     56: /*
                     57:  * Event queue entries
                     58:  */
                     59:
                     60: #ifndef _QEVENT_
                     61: #define _QEVENT_
                     62:
                     63: typedef struct  _vs_event {
                     64:         unsigned short vse_x;  /* x position */
                     65:         unsigned short vse_y;  /* y position */
                     66:         unsigned short vse_time;/* 10 millisecond units (button only) */
                     67:         char    vse_type;       /* button or motion? */
                     68:         unsigned char  vse_key;        /* the key (button only) */
                     69:         char    vse_direction; /* which direction (button only) */
                     70:         char    vse_device;    /* which device (button only) */
                     71: } vsEvent;
                     72:
                     73: /* vse_type field */
                     74: #define VSE_BUTTON      0               /* button moved */
                     75: #define VSE_MMOTION     1               /* mouse moved */
                     76: #define VSE_TMOTION     2               /* tablet moved */
                     77:
                     78: /* vse_direction field */
                     79: #define VSE_KBTUP       0               /* up */
                     80: #define VSE_KBTDOWN     1               /* down */
                     81: #define VSE_KBTRAW     2               /* undetermined */
                     82:
                     83: /* vse_device field */
                     84: #define VSE_NULL       0               /* NULL event (for QD_GETEVENT ret) */
                     85: #define VSE_MOUSE       1               /* mouse */
                     86: #define VSE_DKB         2               /* main keyboard */
                     87: #define VSE_TABLET      3               /* graphics tablet */
                     88: #define VSE_AUX         4               /* auxiliary */
                     89: #define VSE_CONSOLE     5               /* console */
                     90:
                     91: /* The event queue */
                     92:
                     93: typedef struct _vs_eventqueue {
                     94:        vsEvent *events;        /* input event buffer */
                     95:        int size;               /* size of event buffer */
                     96:        int head;               /* index into events */
                     97:        int tail;               /* index into events */
                     98: } vsEventQueue;
                     99:
                    100: /* mouse cursor position */
                    101:
                    102: typedef struct _vs_cursor {
                    103:         short x;
                    104:         short y;
                    105: } vsCursor;
                    106:
                    107: /* mouse motion rectangle */
                    108:
                    109: typedef struct _vs_box {
                    110:         short bottom;
                    111:         short right;
                    112:         short left;
                    113:         short top;
                    114: } vsBox;
                    115:
                    116: #endif /*_QEVENT_*/

CVSweb