1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxJoystick class
4 // Author: Guilhem Lavaux
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "joystick.h"
20 #include "wx/thread.h"
22 class WXDLLEXPORT wxJoystickThread
;
24 class WXDLLEXPORT wxJoystick
: public wxObject
26 DECLARE_DYNAMIC_CLASS(wxJoystick
)
32 wxJoystick(int joystick
= wxJOYSTICK1
);
36 ////////////////////////////////////////////////////////////////////////////
38 wxPoint
GetPosition() const;
39 int GetZPosition() const;
40 int GetButtonState() const;
41 int GetPOVPosition() const;
42 int GetPOVCTSPosition() const;
43 int GetRudderPosition() const;
44 int GetUPosition() const;
45 int GetVPosition() const;
46 int GetMovementThreshold() const;
47 void SetMovementThreshold(int threshold
) ;
50 ////////////////////////////////////////////////////////////////////////////
52 bool IsOk() const; // Checks that the joystick is functioning
53 int GetNumberJoysticks() const ;
54 int GetManufacturerId() const ;
55 int GetProductId() const ;
56 wxString
GetProductName() const ;
63 int GetNumberButtons() const;
64 int GetNumberAxes() const;
65 int GetMaxButtons() const;
66 int GetMaxAxes() const;
67 int GetPollingMin() const;
68 int GetPollingMax() const;
69 int GetRudderMin() const;
70 int GetRudderMax() const;
76 bool HasRudder() const;
81 bool HasPOV4Dir() const;
82 bool HasPOVCTS() const;
85 ////////////////////////////////////////////////////////////////////////////
87 // pollingFreq = 0 means that movement events are sent when above the threshold.
88 // If pollingFreq > 0, events are received every this many milliseconds.
89 bool SetCapture(wxWindow
* win
, int pollingFreq
= 0);
90 bool ReleaseCapture();
95 wxJoystickThread
* m_thread
;