]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/joystick.h
1. Derive wxMessageDialogBase from wxDialog (why did we use multiple
[wxWidgets.git] / include / wx / mac / carbon / joystick.h
CommitLineData
8cf73271
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: joystick.h
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
65571936 9// Licence: wxWindows licence
8cf73271
SC
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_JOYSTICK_H_
13#define _WX_JOYSTICK_H_
14
8cf73271
SC
15#include "wx/event.h"
16
17class WXDLLEXPORT 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;
e6733873
VZ
31 int GetPosition(unsigned axis) const;
32 bool GetButtonState(unsigned button) const;
8cf73271
SC
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
da9e9563 47 static int GetNumberJoysticks() ;
8cf73271
SC
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
90#endif
91 // _WX_JOYSTICK_H_