]> git.saurik.com Git - wxWidgets.git/blame - include/wx/palmos/joystick.h
do platform-specific checks after ensuring that the symbols we use are defined; extra...
[wxWidgets.git] / include / wx / palmos / joystick.h
CommitLineData
ffecfa5a 1/////////////////////////////////////////////////////////////////////////////
e1d63b79 2// Name: wx/palmos/joystick.h
ffecfa5a 3// Purpose: wxJoystick class
e1d63b79 4// Author: William Osborne - minimal working wxPalmOS port
ffecfa5a
JS
5// Modified by:
6// Created: 10/13/04
e1d63b79 7// RCS-ID: $Id$
ffecfa5a
JS
8// Copyright: (c) William Osborne
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_JOYSTICK_H_
13#define _WX_JOYSTICK_H_
14
ffecfa5a
JS
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
25 wxJoystick(int joystick = wxJOYSTICK1);
26
27 // Attributes
28 ////////////////////////////////////////////////////////////////////////////
29
30 wxPoint GetPosition(void) const;
e6733873
VZ
31 int GetPosition(unsigned axis) const;
32 bool GetButtonState(unsigned button) const;
ffecfa5a
JS
33 int GetZPosition(void) const;
34 int GetButtonState(void) const;
35 int GetPOVPosition(void) const;
36 int GetPOVCTSPosition(void) const;
37 int GetRudderPosition(void) const;
38 int GetUPosition(void) const;
39 int GetVPosition(void) const;
40 int GetMovementThreshold(void) const;
41 void SetMovementThreshold(int threshold) ;
42
43 // Capabilities
44 ////////////////////////////////////////////////////////////////////////////
45
46 static int GetNumberJoysticks(void);
47
48 bool IsOk(void) const; // Checks that the joystick is functioning
49 int GetManufacturerId(void) const ;
50 int GetProductId(void) const ;
51 wxString GetProductName(void) const ;
52 int GetXMin(void) const;
53 int GetYMin(void) const;
54 int GetZMin(void) const;
55 int GetXMax(void) const;
56 int GetYMax(void) const;
57 int GetZMax(void) const;
58 int GetNumberButtons(void) const;
59 int GetNumberAxes(void) const;
60 int GetMaxButtons(void) const;
61 int GetMaxAxes(void) const;
62 int GetPollingMin(void) const;
63 int GetPollingMax(void) const;
64 int GetRudderMin(void) const;
65 int GetRudderMax(void) const;
66 int GetUMin(void) const;
67 int GetUMax(void) const;
68 int GetVMin(void) const;
69 int GetVMax(void) const;
70
71 bool HasRudder(void) const;
72 bool HasZ(void) const;
73 bool HasU(void) const;
74 bool HasV(void) const;
75 bool HasPOV(void) const;
76 bool HasPOV4Dir(void) const;
77 bool HasPOVCTS(void) const;
78
79 // Operations
80 ////////////////////////////////////////////////////////////////////////////
81
82 // pollingFreq = 0 means that movement events are sent when above the threshold.
83 // If pollingFreq > 0, events are received every this many milliseconds.
84 bool SetCapture(wxWindow* win, int pollingFreq = 0);
85 bool ReleaseCapture(void);
86
87protected:
88 int m_joystick;
89};
90
91#endif
92 // _WX_JOYSTICK_H_