]> icculus.org git repositories - btb/d2x.git/blob - unused/bios/mouse.h
configuration fixes
[btb/d2x.git] / unused / bios / 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 #ifndef MOUSE_H
15 #define MOUSE_H
16
17 #include "pstypes.h"
18 #include "fix.h"
19
20 #define MB_LEFT                 0
21
22 #if defined(_WIN32)
23 #undef MB_RIGHT 
24 #endif
25
26 #define MB_RIGHT                        1
27
28 #define MB_MIDDLE                       2
29 #define MB_Z_UP                 3
30 #define MB_Z_DOWN                       4
31 #define MB_PITCH_BACKWARD       5
32 #define MB_PITCH_FORWARD 6
33 #define MB_BANK_LEFT            7
34 #define MB_BANK_RIGHT   8
35 #define MB_HEAD_LEFT            9
36 #define MB_HEAD_RIGHT   10
37
38 #define MOUSE_LBTN 1
39 #define MOUSE_RBTN 2
40 #define MOUSE_MBTN 4
41
42 //========================================================================
43 // Check for mouse driver, reset driver if installed. returns number of
44 // buttons if driver is present.
45
46 extern int mouse_init(int enable_cyberman);
47 extern int mouse_set_limits( int x1, int y1, int x2, int y2 );
48 extern void mouse_flush();      // clears all mice events...
49
50 //========================================================================
51 // Shutdowns mouse system.
52 extern void mouse_close();
53
54 //========================================================================
55 extern void mouse_get_pos( int *x, int *y);
56 extern void mouse_get_delta( int *dx, int *dy );
57 extern int mouse_get_btns();
58 extern void mouse_set_pos( int x, int y);
59 extern void mouse_get_cyberman_pos( int *x, int *y );
60
61 // Returns how long this button has been down since last call.
62 extern fix mouse_button_down_time(int button);
63
64 // Returns how many times this button has went down since last call.
65 extern int mouse_button_down_count(int button);
66
67 // Returns 1 if this button is currently down
68 extern int mouse_button_state(int button);
69
70
71 #endif