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