]> git.saurik.com Git - wxWidgets.git/blame - include/wx/unix/joystick.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / unix / joystick.h
CommitLineData
101ceb40 1/////////////////////////////////////////////////////////////////////////////
1b88201f 2// Name: wx/unix/joystick.h
101ceb40
JS
3// Purpose: wxJoystick class
4// Author: Guilhem Lavaux
5// Modified by:
6// Created: 01/02/97
99d80019 7// Copyright: (c) Guilhem Lavaux
1b88201f 8// Licence: wxWindows licence
101ceb40
JS
9/////////////////////////////////////////////////////////////////////////////
10
204abcd4
PC
11#ifndef _WX_UNIX_JOYSTICK_H_
12#define _WX_UNIX_JOYSTICK_H_
101ceb40 13
101ceb40 14#include "wx/event.h"
101ceb40 15
b5dbe15d 16class WXDLLIMPEXP_FWD_CORE wxJoystickThread;
a800dc50 17
1a2fe0cb 18class WXDLLIMPEXP_ADV wxJoystick: public wxObject
101ceb40 19{
a800dc50
RD
20 DECLARE_DYNAMIC_CLASS(wxJoystick)
21 public:
22 /*
23 * Public interface
24 */
25
26 wxJoystick(int joystick = wxJOYSTICK1);
d3c7fc99 27 virtual ~wxJoystick();
a800dc50
RD
28
29 // Attributes
30 ////////////////////////////////////////////////////////////////////////////
31
32 wxPoint GetPosition() const;
e6733873
VZ
33 int GetPosition(unsigned axis) const;
34 bool GetButtonState(unsigned button) const;
a800dc50
RD
35 int GetZPosition() const;
36 int GetButtonState() const;
37 int GetPOVPosition() const;
38 int GetPOVCTSPosition() const;
39 int GetRudderPosition() const;
40 int GetUPosition() const;
41 int GetVPosition() const;
42 int GetMovementThreshold() const;
43 void SetMovementThreshold(int threshold) ;
44
45 // Capabilities
46 ////////////////////////////////////////////////////////////////////////////
47
48 bool IsOk() const; // Checks that the joystick is functioning
da9e9563 49 static int GetNumberJoysticks() ;
a800dc50
RD
50 int GetManufacturerId() const ;
51 int GetProductId() const ;
52 wxString GetProductName() const ;
53 int GetXMin() const;
54 int GetYMin() const;
55 int GetZMin() const;
56 int GetXMax() const;
57 int GetYMax() const;
58 int GetZMax() const;
59 int GetNumberButtons() const;
60 int GetNumberAxes() const;
61 int GetMaxButtons() const;
62 int GetMaxAxes() const;
63 int GetPollingMin() const;
64 int GetPollingMax() const;
65 int GetRudderMin() const;
66 int GetRudderMax() const;
67 int GetUMin() const;
68 int GetUMax() const;
69 int GetVMin() const;
70 int GetVMax() const;
71
72 bool HasRudder() const;
73 bool HasZ() const;
74 bool HasU() const;
75 bool HasV() const;
76 bool HasPOV() const;
77 bool HasPOV4Dir() const;
78 bool HasPOVCTS() const;
79
80 // Operations
81 ////////////////////////////////////////////////////////////////////////////
82
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();
101ceb40
JS
87
88protected:
a800dc50
RD
89 int m_device;
90 int m_joystick;
91 wxJoystickThread* m_thread;
101ceb40
JS
92};
93
204abcd4 94#endif // _WX_UNIX_JOYSTICK_H_