1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/joystick.h
3 // Purpose: wxJoystick class
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
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
);
27 ////////////////////////////////////////////////////////////////////////////
29 wxPoint
GetPosition(void) const;
30 int GetPosition(unsigned axis
) const;
31 bool GetButtonState(unsigned button
) const;
32 int GetZPosition(void) const;
33 int GetButtonState(void) const;
34 int GetPOVPosition(void) const;
35 int GetPOVCTSPosition(void) const;
36 int GetRudderPosition(void) const;
37 int GetUPosition(void) const;
38 int GetVPosition(void) const;
39 int GetMovementThreshold(void) const;
40 void SetMovementThreshold(int threshold
) ;
43 ////////////////////////////////////////////////////////////////////////////
45 static int GetNumberJoysticks(void);
47 bool IsOk(void) const; // Checks that the joystick is functioning
48 int GetManufacturerId(void) const ;
49 int GetProductId(void) const ;
50 wxString
GetProductName(void) const ;
51 int GetXMin(void) const;
52 int GetYMin(void) const;
53 int GetZMin(void) const;
54 int GetXMax(void) const;
55 int GetYMax(void) const;
56 int GetZMax(void) const;
57 int GetNumberButtons(void) const;
58 int GetNumberAxes(void) const;
59 int GetMaxButtons(void) const;
60 int GetMaxAxes(void) const;
61 int GetPollingMin(void) const;
62 int GetPollingMax(void) const;
63 int GetRudderMin(void) const;
64 int GetRudderMax(void) const;
65 int GetUMin(void) const;
66 int GetUMax(void) const;
67 int GetVMin(void) const;
68 int GetVMax(void) const;
70 bool HasRudder(void) const;
71 bool HasZ(void) const;
72 bool HasU(void) const;
73 bool HasV(void) const;
74 bool HasPOV(void) const;
75 bool HasPOV4Dir(void) const;
76 bool HasPOVCTS(void) 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(void);