]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/joystick.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxJoystick class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "joystick.h"
21 class WXDLLEXPORT wxJoystick
: public wxObject
23 DECLARE_DYNAMIC_CLASS(wxJoystick
)
29 wxJoystick(int joystick
= wxJOYSTICK1
) { m_joystick
= joystick
; };
32 ////////////////////////////////////////////////////////////////////////////
34 wxPoint
GetPosition(void) const;
35 int GetZPosition(void) const;
36 int GetButtonState(void) const;
37 int GetPOVPosition(void) const;
38 int GetPOVCTSPosition(void) const;
39 int GetRudderPosition(void) const;
40 int GetUPosition(void) const;
41 int GetVPosition(void) const;
42 int GetMovementThreshold(void) const;
43 void SetMovementThreshold(int threshold
) ;
46 ////////////////////////////////////////////////////////////////////////////
48 bool IsOk(void) const; // Checks that the joystick is functioning
49 int GetNumberJoysticks(void) const ;
50 int GetManufacturerId(void) const ;
51 int GetProductId(void) const ;
52 wxString
GetProductName(void) const ;
53 int GetXMin(void) const;
54 int GetYMin(void) const;
55 int GetZMin(void) const;
56 int GetXMax(void) const;
57 int GetYMax(void) const;
58 int GetZMax(void) const;
59 int GetNumberButtons(void) const;
60 int GetNumberAxes(void) const;
61 int GetMaxButtons(void) const;
62 int GetMaxAxes(void) const;
63 int GetPollingMin(void) const;
64 int GetPollingMax(void) const;
65 int GetRudderMin(void) const;
66 int GetRudderMax(void) const;
67 int GetUMin(void) const;
68 int GetUMax(void) const;
69 int GetVMin(void) const;
70 int GetVMax(void) const;
72 bool HasRudder(void) const;
73 bool HasZ(void) const;
74 bool HasU(void) const;
75 bool HasV(void) const;
76 bool HasPOV(void) const;
77 bool HasPOV4Dir(void) const;
78 bool HasPOVCTS(void) const;
81 ////////////////////////////////////////////////////////////////////////////
83 // pollingFreq = 0 means that movement events are sent when above the threshold.
84 // If pollingFreq > 0, events are received every this many milliseconds.
85 bool SetCapture(wxWindow
* win
, int pollingFreq
= 0);
86 bool ReleaseCapture(void);