]> icculus.org git repositories - btb/d2x.git/blob - arch/win32/include/mouse.h
Enable global structs for mine saving functions
[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  * $Source: /cvs/cvsroot/d2x/arch/win32/include/mouse.h,v $
15  * $Revision: 1.2 $
16  * $Author: schaffner $
17  * $Date: 2004-08-28 23:17:45 $
18  *
19  * Header for mouse functions
20  *
21  * $Log: not supported by cvs2svn $
22  * Revision 1.1.1.1  2001/01/19 03:30:15  bradleyb
23  * Import of d2x-0.0.8
24  *
25  * Revision 1.2  1999/10/09 05:04:34  donut
26  * added mouse_init and mouse_close declarations
27  *
28  * Revision 1.1.1.1  1999/06/14 22:01:24  donut
29  * Import of d1x 1.37 source.
30  *
31  */
32
33 #ifndef MOUSE_H
34 #define MOUSE_H
35
36 #include "types.h"
37 #include "fix.h"
38
39 #define MOUSE_MAX_BUTTONS       11
40
41 #define MB_LEFT                 0
42
43 #ifdef MB_RIGHT
44 #undef MB_RIGHT
45 #endif
46 #define MB_RIGHT                1
47 #define MB_MIDDLE               2
48 #define MB_Z_UP                 3
49 #define MB_Z_DOWN               4
50 #define MB_PITCH_BACKWARD       5
51 #define MB_PITCH_FORWARD        6
52 #define MB_BANK_LEFT            7
53 #define MB_BANK_RIGHT           8
54 #define MB_HEAD_LEFT            9
55 #define MB_HEAD_RIGHT           10
56
57 #define MOUSE_LBTN 1
58 #define MOUSE_RBTN 2
59 #define MOUSE_MBTN 4
60
61 #undef NOMOUSE
62 #ifndef NOMOUSE
63
64 extern int mouse_init(int unused);
65 extern void mouse_close(void);
66
67
68 //========================================================================
69 // Check for mouse driver, reset driver if installed. returns number of
70 // buttons if driver is present.
71
72 extern int mouse_set_limits( int x1, int y1, int x2, int y2 );
73 extern void mouse_flush();      // clears all mice events...
74
75 //========================================================================
76 extern void mouse_get_pos( int *x, int *y);
77 extern void mouse_get_delta( int *dx, int *dy );
78 extern int mouse_get_btns();
79 extern void mouse_set_pos( int x, int y);
80 extern void mouse_get_cyberman_pos( int *x, int *y );
81
82 // Returns how long this button has been down since last call.
83 extern fix mouse_button_down_time(int button);
84
85 // Returns how many times this button has went down since last call.
86 extern int mouse_button_down_count(int button);
87
88 // Returns 1 if this button is currently down
89 extern int mouse_button_state(int button);
90
91 #else
92 // 'Neutered' functions... :-)
93 #define mouse_init(a) -1
94 #define mouse_set_limits(a,b,c,d) -1
95 #define mouse_flush()
96 #define mouse_close()
97 #define mouse_get_pos(a,b)
98 #define mouse_get_delta(a,b)
99 #define mouse_get_btns() 0
100 #define mouse_set_pos(a,b)
101 #define mouse_get_cyberman_pos(a,b)
102 #define mouse_button_down_time(a) 0
103 #define mouse_button_down_count(a) 0
104 #define mouse_button_state(a) 0
105
106 #endif
107
108 #endif
109