mouse.h revision 1.2 1 1.2 soda /* $NetBSD: mouse.h,v 1.2 2000/01/23 21:01:57 soda Exp $ */
2 1.2 soda /* $OpenBSD: mouse.h,v 1.2 1996/06/06 23:06:52 deraadt Exp $ */
3 1.2 soda /* NetBSD: mouse.h,v 1.4 1994/10/27 04:16:10 cgd Exp */
4 1.1 jonathan
5 1.1 jonathan /*-
6 1.1 jonathan * Copyright (c) 1992, 1993 Erik Forsberg.
7 1.1 jonathan * All rights reserved.
8 1.1 jonathan *
9 1.1 jonathan * Redistribution and use in source and binary forms, with or without
10 1.1 jonathan * modification, are permitted provided that the following conditions
11 1.1 jonathan * are met:
12 1.1 jonathan * 1. Redistributions of source code must retain the above copyright
13 1.1 jonathan * notice, this list of conditions and the following disclaimer.
14 1.1 jonathan *
15 1.1 jonathan * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY EXPRESS OR IMPLIED
16 1.1 jonathan * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
17 1.1 jonathan * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
18 1.1 jonathan * NO EVENT SHALL I BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 1.1 jonathan * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 1.1 jonathan * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21 1.1 jonathan * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
22 1.1 jonathan * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
23 1.1 jonathan * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 1.1 jonathan * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 1.1 jonathan */
26 1.1 jonathan
27 1.1 jonathan #ifndef _MOUSE_H_
28 1.1 jonathan #define _MOUSE_H_
29 1.1 jonathan
30 1.1 jonathan struct mouseinfo {
31 1.1 jonathan unsigned char status;
32 1.1 jonathan char xmotion, ymotion;
33 1.1 jonathan };
34 1.1 jonathan
35 1.1 jonathan #define BUTSTATMASK 0x07 /* Any mouse button down if any bit set */
36 1.1 jonathan #define BUTCHNGMASK 0x38 /* Any mouse button changed if any bit set */
37 1.1 jonathan
38 1.1 jonathan #define BUT3STAT 0x01 /* Button 3 down if set */
39 1.1 jonathan #define BUT2STAT 0x02 /* Button 2 down if set */
40 1.1 jonathan #define BUT1STAT 0x04 /* Button 1 down if set */
41 1.1 jonathan #define BUT3CHNG 0x08 /* Button 3 changed if set */
42 1.1 jonathan #define BUT2CHNG 0x10 /* Button 2 changed if set */
43 1.1 jonathan #define BUT1CHNG 0x20 /* Button 1 changed if set */
44 1.1 jonathan #define MOVEMENT 0x40 /* Mouse movement detected */
45 1.1 jonathan
46 1.1 jonathan /* Ioctl definitions */
47 1.1 jonathan
48 1.1 jonathan #define MOUSEIOC ('M'<<8)
49 1.2 soda #define MOUSEIOCREAD (MOUSEIOC|60)
50 1.1 jonathan
51 1.1 jonathan #endif /* !_MOUSE_H_ */
52