1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxJoystick class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_JOYSTICK_H_
13 #define _WX_JOYSTICK_H_
17 class WXDLLIMPEXP_ADV wxJoystick
: public wxObject
19 DECLARE_DYNAMIC_CLASS(wxJoystick
)
25 wxJoystick(int joystick
= wxJOYSTICK1
) { m_joystick
= joystick
; };
28 ////////////////////////////////////////////////////////////////////////////
30 wxPoint
GetPosition() const;
31 int GetPosition(unsigned axis
) const;
32 bool GetButtonState(unsigned button
) const;
33 int GetZPosition() const;
34 int GetButtonState() const;
35 int GetPOVPosition() const;
36 int GetPOVCTSPosition() const;
37 int GetRudderPosition() const;
38 int GetUPosition() const;
39 int GetVPosition() const;
40 int GetMovementThreshold() const;
41 void SetMovementThreshold(int threshold
) ;
44 ////////////////////////////////////////////////////////////////////////////
46 bool IsOk() const; // Checks that the joystick is functioning
47 static int GetNumberJoysticks() ;
48 int GetManufacturerId() const ;
49 int GetProductId() const ;
50 wxString
GetProductName() const ;
57 int GetNumberButtons() const;
58 int GetNumberAxes() const;
59 int GetMaxButtons() const;
60 int GetMaxAxes() const;
61 int GetPollingMin() const;
62 int GetPollingMax() const;
63 int GetRudderMin() const;
64 int GetRudderMax() const;
70 bool HasRudder() const;
75 bool HasPOV4Dir() const;
76 bool HasPOVCTS() const;
79 ////////////////////////////////////////////////////////////////////////////
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();