]> git.saurik.com Git - wxWidgets.git/blame - include/wx/x11/joystick.h
Added intermediate state (m_showOnIdle) indicating that
[wxWidgets.git] / include / wx / x11 / joystick.h
CommitLineData
83df96d6
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: joystick.h
3// Purpose: wxJoystick class
4// Author: Julian Smart
5// Modified by:
6// Created: 17/09/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
83df96d6
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_JOYSTICK_H_
13#define _WX_JOYSTICK_H_
14
83df96d6
JS
15#include "wx/event.h"
16
17class WXDLLEXPORT wxJoystick: public wxObject
18{
19 DECLARE_DYNAMIC_CLASS(wxJoystick)
20public:
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
da9e9563 45 static int GetNumberJoysticks() ;
83df96d6
JS
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
84protected:
85 int m_joystick;
86};
87
88#endif
89// _WX_JOYSTICK_H_