]> icculus.org git repositories - btb/d2x.git/blob - arch/win32/include/mouse.h
remove rcs tags
[btb/d2x.git] / arch / win32 / 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-1998 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
12 */
13 /*
14  *
15  * Header for mouse functions
16  *
17  *
18  */
19
20 #ifndef MOUSE_H
21 #define MOUSE_H
22
23 #include "types.h"
24 #include "fix.h"
25
26 #define MOUSE_MAX_BUTTONS       11
27
28 #define MB_LEFT                 0
29
30 #ifdef MB_RIGHT
31 #undef MB_RIGHT
32 #endif
33 #define MB_RIGHT                1
34 #define MB_MIDDLE               2
35 #define MB_Z_UP                 3
36 #define MB_Z_DOWN               4
37 #define MB_PITCH_BACKWARD       5
38 #define MB_PITCH_FORWARD        6
39 #define MB_BANK_LEFT            7
40 #define MB_BANK_RIGHT           8
41 #define MB_HEAD_LEFT            9
42 #define MB_HEAD_RIGHT           10
43
44 #define MOUSE_LBTN 1
45 #define MOUSE_RBTN 2
46 #define MOUSE_MBTN 4
47
48 #undef NOMOUSE
49 #ifndef NOMOUSE
50
51 extern int mouse_init(int unused);
52 extern void mouse_close(void);
53
54
55 //========================================================================
56 // Check for mouse driver, reset driver if installed. returns number of
57 // buttons if driver is present.
58
59 extern int mouse_set_limits( int x1, int y1, int x2, int y2 );
60 extern void mouse_flush();      // clears all mice events...
61
62 //========================================================================
63 extern void mouse_get_pos( int *x, int *y);
64 extern void mouse_get_delta( int *dx, int *dy );
65 extern int mouse_get_btns();
66 extern void mouse_set_pos( int x, int y);
67 extern void mouse_get_cyberman_pos( int *x, int *y );
68
69 // Returns how long this button has been down since last call.
70 extern fix mouse_button_down_time(int button);
71
72 // Returns how many times this button has went down since last call.
73 extern int mouse_button_down_count(int button);
74
75 // Returns 1 if this button is currently down
76 extern int mouse_button_state(int button);
77
78 #else
79 // 'Neutered' functions... :-)
80 #define mouse_init(a) -1
81 #define mouse_set_limits(a,b,c,d) -1
82 #define mouse_flush()
83 #define mouse_close()
84 #define mouse_get_pos(a,b)
85 #define mouse_get_delta(a,b)
86 #define mouse_get_btns() 0
87 #define mouse_set_pos(a,b)
88 #define mouse_get_cyberman_pos(a,b)
89 #define mouse_button_down_time(a) 0
90 #define mouse_button_down_count(a) 0
91 #define mouse_button_state(a) 0
92
93 #endif
94
95 #endif
96