]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/joystick.h
Add more checks for Intel compiler.
[wxWidgets.git] / include / wx / msw / joystick.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/joystick.h
3 // Purpose: wxJoystick class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_JOYSTICK_H_
12 #define _WX_JOYSTICK_H_
13
14 #include "wx/event.h"
15
16 class WXDLLIMPEXP_ADV wxJoystick: public wxObject
17 {
18 DECLARE_DYNAMIC_CLASS(wxJoystick)
19 public:
20 /*
21 * Public interface
22 */
23
24 wxJoystick(int joystick = wxJOYSTICK1);
25
26 // Attributes
27 ////////////////////////////////////////////////////////////////////////////
28
29 wxPoint GetPosition(void) const;
30 int GetPosition(unsigned axis) const;
31 bool GetButtonState(unsigned button) const;
32 int GetZPosition(void) const;
33 int GetButtonState(void) const;
34 int GetPOVPosition(void) const;
35 int GetPOVCTSPosition(void) const;
36 int GetRudderPosition(void) const;
37 int GetUPosition(void) const;
38 int GetVPosition(void) const;
39 int GetMovementThreshold(void) const;
40 void SetMovementThreshold(int threshold) ;
41
42 // Capabilities
43 ////////////////////////////////////////////////////////////////////////////
44
45 static int GetNumberJoysticks(void);
46
47 bool IsOk(void) const; // Checks that the joystick is functioning
48 int GetManufacturerId(void) const ;
49 int GetProductId(void) const ;
50 wxString GetProductName(void) const ;
51 int GetXMin(void) const;
52 int GetYMin(void) const;
53 int GetZMin(void) const;
54 int GetXMax(void) const;
55 int GetYMax(void) const;
56 int GetZMax(void) const;
57 int GetNumberButtons(void) const;
58 int GetNumberAxes(void) const;
59 int GetMaxButtons(void) const;
60 int GetMaxAxes(void) const;
61 int GetPollingMin(void) const;
62 int GetPollingMax(void) const;
63 int GetRudderMin(void) const;
64 int GetRudderMax(void) const;
65 int GetUMin(void) const;
66 int GetUMax(void) const;
67 int GetVMin(void) const;
68 int GetVMax(void) const;
69
70 bool HasRudder(void) const;
71 bool HasZ(void) const;
72 bool HasU(void) const;
73 bool HasV(void) const;
74 bool HasPOV(void) const;
75 bool HasPOV4Dir(void) const;
76 bool HasPOVCTS(void) const;
77
78 // Operations
79 ////////////////////////////////////////////////////////////////////////////
80
81 // pollingFreq = 0 means that movement events are sent when above the threshold.
82 // If pollingFreq > 0, events are received every this many milliseconds.
83 bool SetCapture(wxWindow* win, int pollingFreq = 0);
84 bool ReleaseCapture(void);
85
86 protected:
87 int m_joystick;
88 };
89
90 #endif
91 // _WX_JOYSTICK_H_