1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/os2/joystick.h
3 // Purpose: wxJoystick class
4 // Author: David Webster
7 // Copyright: (c) David Webster
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_JOYSTICK_H_
12 #define _WX_JOYSTICK_H_
16 class WXDLLIMPEXP_ADV wxJoystick
: public wxObject
18 DECLARE_DYNAMIC_CLASS(wxJoystick
)
24 wxJoystick(int joystick
= wxJOYSTICK1
) { m_joystick
= joystick
; }
27 ////////////////////////////////////////////////////////////////////////////
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
) ;
41 ////////////////////////////////////////////////////////////////////////////
43 bool IsOk() const; // Checks that the joystick is functioning
44 static int GetNumberJoysticks() ;
45 int GetManufacturerId() const ;
46 int GetProductId() const ;
47 wxString
GetProductName() 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;
67 bool HasRudder() const;
72 bool HasPOV4Dir() const;
73 bool HasPOVCTS() const;
76 ////////////////////////////////////////////////////////////////////////////
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();