104313604Storek /* 2*db00d1deSbostic * Copyright (c) 1992, 1993 3*db00d1deSbostic * The Regents of the University of California. All rights reserved. 404313604Storek * 504313604Storek * This software was developed by the Computer Systems Engineering group 604313604Storek * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 704313604Storek * contributed to Berkeley. 804313604Storek * 9b248cd2bSbostic * All advertising materials mentioning features or use of this software 10b248cd2bSbostic * must display the following acknowledgement: 11b248cd2bSbostic * This product includes software developed by the University of 12cc9a6bbbStorek * California, Lawrence Berkeley Laboratory. 13b248cd2bSbostic * 1404313604Storek * %sccs.include.redist.c% 1504313604Storek * 16*db00d1deSbostic * @(#)vuid_event.h 8.1 (Berkeley) 06/11/93 1704313604Storek * 18cc9a6bbbStorek * from: $Header: vuid_event.h,v 1.4 92/11/26 01:20:27 torek Exp $ (LBL) 1904313604Storek */ 2004313604Storek 2104313604Storek /* 2204313604Storek * The following is a minimal emulation of Sun's `Firm_event' structures 2304313604Storek * and related operations necessary to make X11 happy (i.e., make it 2404313604Storek * compile, and make old X11 binaries run). 2504313604Storek */ 2604313604Storek typedef struct firm_event { 2704313604Storek u_short id; /* key or MS_* or LOC_[XY]_DELTA */ 2804313604Storek u_short pad; /* unused, at least by X11 */ 2904313604Storek int value; /* VKEY_{UP,DOWN} or locator delta */ 3004313604Storek struct timeval time; 3104313604Storek } Firm_event; 3204313604Storek 3304313604Storek /* 3404313604Storek * Special `id' fields. These weird numbers simply match the old binaries. 3504313604Storek * Others are in 0..0x7f and are keyboard key numbers (keyboard dependent!). 3604313604Storek */ 3704313604Storek #define MS_LEFT 0x7f20 /* left mouse button */ 3804313604Storek #define MS_MIDDLE 0x7f21 /* middle mouse button */ 3904313604Storek #define MS_RIGHT 0x7f22 /* right mouse button */ 4004313604Storek #define LOC_X_DELTA 0x7f80 /* mouse delta-X */ 4104313604Storek #define LOC_Y_DELTA 0x7f81 /* mouse delta-Y */ 4204313604Storek 4304313604Storek /* 4404313604Storek * Special `value' fields. These apply to keys and mouse buttons. The 4504313604Storek * value of a mouse delta is the delta. Note that positive deltas are 4604313604Storek * left and up (not left and down as you might expect). 4704313604Storek */ 4804313604Storek #define VKEY_UP 0 /* key or button went up */ 4904313604Storek #define VKEY_DOWN 1 /* key or button went down */ 5004313604Storek 5104313604Storek /* 5204313604Storek * The following ioctls are clearly intended to take things in and out 5304313604Storek * of `firm event' mode. Since we always run in this mode (as far as 5404313604Storek * /dev/kbd and /dev/mouse are concerned, anyway), we always claim to 5504313604Storek * be in this mode and reject anything else. 5604313604Storek */ 5704313604Storek #define VUIDSFORMAT _IOW('v', 1, int) 5804313604Storek #define VUIDGFORMAT _IOR('v', 2, int) 5904313604Storek #define VUID_FIRM_EVENT 1 /* the only format we support */ 60