]>
Commit | Line | Data |
---|---|---|
2bda0e17 | 1 | ///////////////////////////////////////////////////////////////////////////// |
80fdcdb9 | 2 | // Name: wx/msw/joystick.h |
2bda0e17 KB |
3 | // Purpose: wxJoystick class |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
bbcdf8bc | 7 | // Copyright: (c) Julian Smart |
598ddd96 | 8 | // Licence: wxWindows licence |
2bda0e17 KB |
9 | ///////////////////////////////////////////////////////////////////////////// |
10 | ||
bbcdf8bc JS |
11 | #ifndef _WX_JOYSTICK_H_ |
12 | #define _WX_JOYSTICK_H_ | |
2bda0e17 | 13 | |
2bda0e17 KB |
14 | #include "wx/event.h" |
15 | ||
131f235d | 16 | class WXDLLIMPEXP_ADV wxJoystick: public wxObject |
2bda0e17 KB |
17 | { |
18 | DECLARE_DYNAMIC_CLASS(wxJoystick) | |
19 | public: | |
20 | /* | |
21 | * Public interface | |
22 | */ | |
23 | ||
131f9d9b | 24 | wxJoystick(int joystick = wxJOYSTICK1); |
2bda0e17 KB |
25 | |
26 | // Attributes | |
27 | //////////////////////////////////////////////////////////////////////////// | |
28 | ||
29 | wxPoint GetPosition(void) const; | |
e6733873 VZ |
30 | int GetPosition(unsigned axis) const; |
31 | bool GetButtonState(unsigned button) const; | |
2bda0e17 KB |
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 | ||
131f9d9b JS |
45 | static int GetNumberJoysticks(void); |
46 | ||
2bda0e17 | 47 | bool IsOk(void) const; // Checks that the joystick is functioning |
2bda0e17 KB |
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 | |
bbcdf8bc | 91 | // _WX_JOYSTICK_H_ |