]> icculus.org git repositories - btb/d2x.git/blob - arch/include/mouse.h
Removed duplicate files
[btb/d2x.git] / arch / include / mouse.h
1 /*
2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.  
11 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
12 */
13
14 /*
15  * $Source: /cvs/cvsroot/d2x/arch/include/mouse.h,v $
16  * $Revision: 1.1 $
17  * $Author: bradleyb $
18  * $Date: 2001-01-28 05:46:33 $
19  *
20  * Header for mouse functions
21  *
22  * $Log: not supported by cvs2svn $
23  */
24
25 #ifndef MOUSE_H
26 #define MOUSE_H
27
28 #include "pstypes.h"
29 #include "fix.h"
30
31 #define MB_LEFT                 0
32
33 #if defined(_WIN32)
34 #undef MB_RIGHT 
35 #endif
36
37 #define MB_RIGHT                        1
38
39 #define MB_MIDDLE                       2
40 #define MB_Z_UP                 3
41 #define MB_Z_DOWN                       4
42 #define MB_PITCH_BACKWARD       5
43 #define MB_PITCH_FORWARD 6
44 #define MB_BANK_LEFT            7
45 #define MB_BANK_RIGHT   8
46 #define MB_HEAD_LEFT            9
47 #define MB_HEAD_RIGHT   10
48
49 #define MOUSE_LBTN 1
50 #define MOUSE_RBTN 2
51 #define MOUSE_MBTN 4
52
53 //========================================================================
54 // Check for mouse driver, reset driver if installed. returns number of
55 // buttons if driver is present.
56
57 #ifdef SVGALIB_INPUT
58 extern int d_mouse_init(int enable_cyberman); /* conflict with <vgamouse.h> */
59 #else
60 extern int mouse_init(int enable_cyberman);
61 #endif
62 /* changed from int to void */
63 extern void mouse_set_limits( int x1, int y1, int x2, int y2 );
64 extern void mouse_flush();      // clears all mice events...
65
66 //========================================================================
67 // Shutdowns mouse system.
68 #ifdef SVGALIB_INPUT
69 extern void d_mouse_close(); /* conflict with <vgamouse.h> */
70 #else
71 extern void mouse_close();
72 #endif
73
74 //========================================================================
75 extern void mouse_get_pos( int *x, int *y);
76 extern void mouse_get_delta( int *dx, int *dy );
77 extern int mouse_get_btns();
78 extern void mouse_set_pos( int x, int y);
79 extern void mouse_get_cyberman_pos( int *x, int *y );
80
81 // Returns how long this button has been down since last call.
82 extern fix mouse_button_down_time(int button);
83
84 // Returns how many times this button has went down since last call.
85 extern int mouse_button_down_count(int button);
86
87 // Returns 1 if this button is currently down
88 extern int mouse_button_state(int button);
89
90
91 #endif