]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/joystick.h
Fix wxCalendarEvent and wxTextUrlEvent event classes implementing Clone() correctly...
[wxWidgets.git] / include / wx / os2 / joystick.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: joystick.h
3 // Purpose: wxJoystick class
4 // Author: David Webster
5 // Modified by:
6 // Created: 10/09/99
7 // RCS-ID: $Id$
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_JOYSTICK_H_
13 #define _WX_JOYSTICK_H_
14
15 #include "wx/event.h"
16
17 class WXDLLIMPEXP_ADV wxJoystick: public wxObject
18 {
19 DECLARE_DYNAMIC_CLASS(wxJoystick)
20 public:
21 /*
22 * Public interface
23 */
24
25 wxJoystick(int joystick = wxJOYSTICK1) { m_joystick = joystick; };
26
27 // Attributes
28 ////////////////////////////////////////////////////////////////////////////
29
30 wxPoint GetPosition() const;
31 int GetZPosition() const;
32 int GetButtonState() const;
33 int GetPOVPosition() const;
34 int GetPOVCTSPosition() const;
35 int GetRudderPosition() const;
36 int GetUPosition() const;
37 int GetVPosition() const;
38 int GetMovementThreshold() const;
39 void SetMovementThreshold(int threshold) ;
40
41 // Capabilities
42 ////////////////////////////////////////////////////////////////////////////
43
44 bool IsOk() const; // Checks that the joystick is functioning
45 static int GetNumberJoysticks() ;
46 int GetManufacturerId() const ;
47 int GetProductId() const ;
48 wxString GetProductName() const ;
49 int GetXMin() const;
50 int GetYMin() const;
51 int GetZMin() const;
52 int GetXMax() const;
53 int GetYMax() const;
54 int GetZMax() const;
55 int GetNumberButtons() const;
56 int GetNumberAxes() const;
57 int GetMaxButtons() const;
58 int GetMaxAxes() const;
59 int GetPollingMin() const;
60 int GetPollingMax() const;
61 int GetRudderMin() const;
62 int GetRudderMax() const;
63 int GetUMin() const;
64 int GetUMax() const;
65 int GetVMin() const;
66 int GetVMax() const;
67
68 bool HasRudder() const;
69 bool HasZ() const;
70 bool HasU() const;
71 bool HasV() const;
72 bool HasPOV() const;
73 bool HasPOV4Dir() const;
74 bool HasPOVCTS() const;
75
76 // Operations
77 ////////////////////////////////////////////////////////////////////////////
78
79 // pollingFreq = 0 means that movement events are sent when above the threshold.
80 // If pollingFreq > 0, events are received every this many milliseconds.
81 bool SetCapture(wxWindow* win, int pollingFreq = 0);
82 bool ReleaseCapture();
83
84 protected:
85 int m_joystick;
86 };
87
88 #endif
89 // _WX_JOYSTICK_H_