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