1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxJoystick class
8 // Copyright: (c) Ryan Norton
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_JOYSTICK_H_
13 #define _WX_JOYSTICK_H_
17 class WXDLLEXPORT wxJoystickThread
;
19 class WXDLLEXPORT wxJoystick
: public wxObject
21 DECLARE_DYNAMIC_CLASS(wxJoystick
)
24 wxJoystick(int joystick
= wxJOYSTICK1
);
25 virtual ~wxJoystick();
28 ////////////////////////////////////////////////////////////////////////////
30 wxPoint
GetPosition() const;
31 int GetZPosition() const;
32 int GetButtonState() const;
33 int GetPOVPosition() const;
34 int GetPOVCTSPosition() const;
35 int GetRudderPosition() const;
36 int GetUPosition() const;
37 int GetVPosition() const;
38 int GetMovementThreshold() const;
39 void SetMovementThreshold(int threshold
) ;
42 ////////////////////////////////////////////////////////////////////////////
44 bool IsOk() const; // Checks that the joystick is functioning
45 static int GetNumberJoysticks() ;
46 int GetManufacturerId() const ;
47 int GetProductId() const ;
48 wxString
GetProductName() const ;
55 int GetNumberButtons() const;
56 int GetNumberAxes() const;
57 int GetMaxButtons() const;
58 int GetMaxAxes() const;
59 int GetPollingMin() const;
60 int GetPollingMax() const;
61 int GetRudderMin() const;
62 int GetRudderMax() const;
68 bool HasRudder() const;
73 bool HasPOV4Dir() const;
74 bool HasPOVCTS() const;
77 ////////////////////////////////////////////////////////////////////////////
79 // pollingFreq = 0 means that movement events are sent when above the threshold.
80 // If pollingFreq > 0, events are received every this many milliseconds.
81 bool SetCapture(wxWindow
* win
, int pollingFreq
= 0);
82 bool ReleaseCapture();
86 wxJoystickThread
* m_thread
;
87 class wxHIDJoystick
* m_hid
;