]> git.saurik.com Git - wxWidgets.git/blame - include/wx/osx/joystick.h
synchronize GTK2 minimum version in docs
[wxWidgets.git] / include / wx / osx / joystick.h
CommitLineData
6762286d 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/osx/joystick.h
6762286d
SC
3// Purpose: wxJoystick class
4// Author: Stefan Csomor
5// Modified by:
6// Created: 1998-01-01
7// RCS-ID: $Id$
8// Copyright: (c) Stefan Csomor
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_JOYSTICK_H_
13#define _WX_JOYSTICK_H_
14
15#include "wx/event.h"
16
17class WXDLLIMPEXP_ADV wxJoystick: public wxObject
18{
19 DECLARE_DYNAMIC_CLASS(wxJoystick)
20 public:
21 /*
22 * Public interface
23 */
24
6dd0883d 25 wxJoystick(int joystick = wxJOYSTICK1) { m_joystick = joystick; }
6762286d
SC
26
27 // Attributes
28 ////////////////////////////////////////////////////////////////////////////
29
30 wxPoint GetPosition() const;
31 int GetPosition(unsigned axis) const;
32 bool GetButtonState(unsigned button) const;
33 int GetZPosition() const;
34 int GetButtonState() const;
35 int GetPOVPosition() const;
36 int GetPOVCTSPosition() const;
37 int GetRudderPosition() const;
38 int GetUPosition() const;
39 int GetVPosition() const;
40 int GetMovementThreshold() const;
41 void SetMovementThreshold(int threshold) ;
42
43 // Capabilities
44 ////////////////////////////////////////////////////////////////////////////
45
46 bool IsOk() const; // Checks that the joystick is functioning
47 static int GetNumberJoysticks() ;
48 int GetManufacturerId() const ;
49 int GetProductId() const ;
50 wxString GetProductName() const ;
51 int GetXMin() const;
52 int GetYMin() const;
53 int GetZMin() const;
54 int GetXMax() const;
55 int GetYMax() const;
56 int GetZMax() const;
57 int GetNumberButtons() const;
58 int GetNumberAxes() const;
59 int GetMaxButtons() const;
60 int GetMaxAxes() const;
61 int GetPollingMin() const;
62 int GetPollingMax() const;
63 int GetRudderMin() const;
64 int GetRudderMax() const;
65 int GetUMin() const;
66 int GetUMax() const;
67 int GetVMin() const;
68 int GetVMax() const;
69
70 bool HasRudder() const;
71 bool HasZ() const;
72 bool HasU() const;
73 bool HasV() const;
74 bool HasPOV() const;
75 bool HasPOV4Dir() const;
76 bool HasPOVCTS() const;
77
78 // Operations
79 ////////////////////////////////////////////////////////////////////////////
80
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();
85
86protected:
87 int m_joystick;
88};
89
5c6eb3a8 90#endif
6762286d 91 // _WX_JOYSTICK_H_