X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4cc4bfafe5a31cb96f35b3ec9b19fa2b0b3a4eef..970e987e89859b596cbbff2360fc4d9ffa2a10e4:/interface/joystick.h?ds=sidebyside diff --git a/interface/joystick.h b/interface/joystick.h index 4d9d290adc..d9b739c6ff 100644 --- a/interface/joystick.h +++ b/interface/joystick.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: joystick.h -// Purpose: documentation for wxJoystick class +// Purpose: interface of wxJoystick // Author: wxWidgets team // RCS-ID: $Id$ // Licence: wxWindows license @@ -15,8 +15,7 @@ @library{wxadv} @category{FIXME} - @seealso - wxJoystickEvent + @see wxJoystickEvent */ class wxJoystick : public wxObject { @@ -36,35 +35,35 @@ public: //@{ /** Returns the state of the specified joystick button. - + @param id The button id to report, from 0 to GetNumberButtons() - 1 */ - int GetButtonState(); - bool GetButtonState(unsigned id); + int GetButtonState() const; + const bool GetButtonState(unsigned id) const; //@} /** Returns the manufacturer id. */ - int GetManufacturerId(); + int GetManufacturerId() const; /** Returns the movement threshold, the number of steps outside which the joystick is deemed to have moved. */ - int GetMovementThreshold(); + int GetMovementThreshold() const; /** Returns the number of axes for this joystick. */ - int GetNumberAxes(); + int GetNumberAxes() const; /** Returns the number of buttons for this joystick. */ - int GetNumberButtons(); + int GetNumberButtons() const; /** Returns the number of joysticks currently attached to the computer. @@ -76,7 +75,7 @@ public: degree units. Returns -1 on error. */ - int GetPOVCTSPosition(); + int GetPOVCTSPosition() const; /** Returns the point-of-view position, expressed in continuous, one-hundredth of a @@ -84,181 +83,181 @@ public: but limited to return 0, 9000, 18000 or 27000. Returns -1 on error. */ - int GetPOVPosition(); + int GetPOVPosition() const; /** Returns the maximum polling frequency. */ - int GetPollingMax(); + int GetPollingMax() const; /** Returns the minimum polling frequency. */ - int GetPollingMin(); + int GetPollingMin() const; //@{ /** Returns the position of the specified joystick axis. - + @param axis The joystick axis to report, from 0 to GetNumberAxes() - 1. */ - wxPoint GetPosition(); - int GetPosition(unsigned axis); + wxPoint GetPosition() const; + const int GetPosition(unsigned axis) const; //@} /** Returns the product id for the joystick. */ - int GetProductId(); + int GetProductId() const; /** Returns the product name for the joystick. */ - wxString GetProductName(); + wxString GetProductName() const; /** Returns the maximum rudder position. */ - int GetRudderMax(); + int GetRudderMax() const; /** Returns the minimum rudder position. */ - int GetRudderMin(); + int GetRudderMin() const; /** Returns the rudder position. */ - int GetRudderPosition(); + int GetRudderPosition() const; /** Returns the maximum U position. */ - int GetUMax(); + int GetUMax() const; /** Returns the minimum U position. */ - int GetUMin(); + int GetUMin() const; /** Gets the position of the fifth axis of the joystick, if it exists. */ - int GetUPosition(); + int GetUPosition() const; /** Returns the maximum V position. */ - int GetVMax(); + int GetVMax() const; /** Returns the minimum V position. */ - int GetVMin(); + int GetVMin() const; /** Gets the position of the sixth axis of the joystick, if it exists. */ - int GetVPosition(); + int GetVPosition() const; /** Returns the maximum x position. */ - int GetXMax(); + int GetXMax() const; /** Returns the minimum x position. */ - int GetXMin(); + int GetXMin() const; /** Returns the maximum y position. */ - int GetYMax(); + int GetYMax() const; /** Returns the minimum y position. */ - int GetYMin(); + int GetYMin() const; /** Returns the maximum z position. */ - int GetZMax(); + int GetZMax() const; /** Returns the minimum z position. */ - int GetZMin(); + int GetZMin() const; /** Returns the z position of the joystick. */ - int GetZPosition(); + int GetZPosition() const; /** Returns @true if the joystick has a point of view control. */ - bool HasPOV(); + bool HasPOV() const; /** Returns @true if the joystick point-of-view supports discrete values (centered, forward, backward, left, and right). */ - bool HasPOV4Dir(); + bool HasPOV4Dir() const; /** Returns @true if the joystick point-of-view supports continuous degree bearings. */ -#define bool HasPOVCTS() /* implementation is private */ +#define bool HasPOVCTS() const /* implementation is private */ /** Returns @true if there is a rudder attached to the computer. */ - bool HasRudder(); + bool HasRudder() const; /** Returns @true if the joystick has a U axis. */ - bool HasU(); + bool HasU() const; /** Returns @true if the joystick has a V axis. */ - bool HasV(); + bool HasV() const; /** Returns @true if the joystick has a Z axis. */ - bool HasZ(); + bool HasZ() const; /** Returns @true if the joystick is functioning. */ - bool IsOk(); + bool IsOk() const; /** Releases the capture set by @b SetCapture. - - @returns @true if the capture release succeeded. - + + @return @true if the capture release succeeded. + @see SetCapture(), wxJoystickEvent */ bool ReleaseCapture(); /** Sets the capture to direct joystick events to @e win. - + @param win The window that will receive joystick events. @param pollingFreq If zero, movement events are sent when above the threshold. If greater than zero, events are received every pollingFreq milliseconds. - - @returns @true if the capture succeeded. - + + @return @true if the capture succeeded. + @see ReleaseCapture(), wxJoystickEvent */ bool SetCapture(wxWindow* win, int pollingFreq = 0); @@ -270,3 +269,4 @@ public: */ void SetMovementThreshold(int threshold); }; +