[haiku-commits] haiku: hrev48649 - docs/user/device

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 10 Jan 2015 11:43:55 +0100 (CET)

hrev48649 adds 2 changesets to branch 'master'
old head: d1644d7e4fdc62dd671d792278f744d476a110df
new head: c50131cd6a55e31577a746dcace06eddb0e7b0a3
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=c50131c+%5Ed1644d7

----------------------------------------------------------------------------

c8e6696: Add documentation for the Open method in the joystick class.

                                            [ mandar <mjuvekar7@xxxxxxxxx> ]

c50131c: Complete and rework BJoystick docs.

                                 [ Adrien Destugues <pulkomandy@xxxxxxxxx> ]

----------------------------------------------------------------------------

1 file changed, 47 insertions(+), 3 deletions(-)
docs/user/device/Joystick.dox | 50 ++++++++++++++++++++++++++++++++++++---

############################################################################

Commit:      c8e66967162ab0991d7a765a27b87291d70d1cc9
URL:         http://cgit.haiku-os.org/haiku/commit/?id=c8e6696
Author:      mandar <mjuvekar7@xxxxxxxxx>
Date:        Fri Jan  9 13:14:30 2015 UTC
Committer:   Adrien Destugues <pulkomandy@xxxxxxxxx>
Commit-Date: Sat Jan 10 10:31:02 2015 UTC

Add documentation for the Open method in the joystick class.

----------------------------------------------------------------------------

diff --git a/docs/user/device/Joystick.dox b/docs/user/device/Joystick.dox
index 73d32d0..aa8612e 100644
--- a/docs/user/device/Joystick.dox
+++ b/docs/user/device/Joystick.dox
@@ -11,8 +11,51 @@
  */
 
 /*!
+    \file Joystick.h
+    \ingroup device
+    \brief BJoystick class definition.
+*/
+
+/*!
+    \class Joystick
+    \ingroup device
+    \brief Class that provides an interface to a joystick and other similar 
game
+           controllers.
+
+    This class adds support for joysticks and other similar game controllers
+    through game ports, both, on cards and some build-in ports.
+
+    The class also provides two modes - standard and enhanced
+*/
+
+/*!
     \fn int32 BJoystick::CountDevices()
     \brief Count the number of joysticks connected.
 
     \return The number of joystick devices connected.
 */
+
+/*!
+    \fn status_t BJoystick::Open(const char *portname, bool enhanced)
+    \brief Open a specific game port.
+
+    This method can be used to open the game port specified by the parameter
+    \c portname amd also allows you to specify whether to use enhanced mode or
+    not.
+
+    Enhanced mode adds support for up to 32 buttons per joystick, an indefinite
+    number of axes and thumb controls, and also allows you to connect multiple
+    joysticks to a single game port. It provides several methods to determine
+    the state of a joystick and also a preference application.
+
+    Enhanced mode also provides a mechanism to determine what joysticks are
+    available and what types of and how many controls are available on them.
+
+    \param portname The name of the game port to be opened.
+    \param enhanced Specifies whether to use enhanced mode while opening the 
port.
+    \return B_BAD_VALUE if portname is null.
+            B_ERROR if the specified port is unable to open or if portname is 
not valid.
+            A positive integer if the port is opened succesfully.
+    \see CountDevices()
+         GetDeviceName()
+*/

############################################################################

Revision:    hrev48649
Commit:      c50131cd6a55e31577a746dcace06eddb0e7b0a3
URL:         http://cgit.haiku-os.org/haiku/commit/?id=c50131c
Author:      Adrien Destugues <pulkomandy@xxxxxxxxx>
Date:        Sat Jan 10 10:44:58 2015 UTC

Complete and rework BJoystick docs.

----------------------------------------------------------------------------

diff --git a/docs/user/device/Joystick.dox b/docs/user/device/Joystick.dox
index aa8612e..bf3a1b7 100644
--- a/docs/user/device/Joystick.dox
+++ b/docs/user/device/Joystick.dox
@@ -11,51 +11,52 @@
  */
 
 /*!
-    \file Joystick.h
-    \ingroup device
-    \brief BJoystick class definition.
+       \file Joystick.h
+       \ingroup device
+       \brief BJoystick class definition.
 */
 
 /*!
-    \class Joystick
-    \ingroup device
-    \brief Class that provides an interface to a joystick and other similar 
game
-           controllers.
-
-    This class adds support for joysticks and other similar game controllers
-    through game ports, both, on cards and some build-in ports.
-
-    The class also provides two modes - standard and enhanced
+       \class Joystick
+       \ingroup device
+       \brief Class that provides an interface to joysticks and game 
controllers.
+
+       This class allows application to access the data from game controllers 
of
+       any type (joysticks, gamepads, racing wheels, etc). It provides 
discovery
+       of the button configuration and axis layout and reports the status of 
the
+       buttons and position of the axis. There is also support for enumerating 
the
+       available controllers.
+
+       Joysticks can be accessed in two modes called standard and enhanced. The
+       standard mode is for compatibility with the BeBox joysticks and is not
+       implemented in Haiku. New applications should use the enhanced mode.
 */
 
 /*!
-    \fn int32 BJoystick::CountDevices()
-    \brief Count the number of joysticks connected.
+       \fn int32 BJoystick::CountDevices()
+       \brief Count the number of joysticks connected.
 
-    \return The number of joystick devices connected.
+       \return The number of joystick devices connected to the computer.
 */
 
 /*!
-    \fn status_t BJoystick::Open(const char *portname, bool enhanced)
-    \brief Open a specific game port.
-
-    This method can be used to open the game port specified by the parameter
-    \c portname amd also allows you to specify whether to use enhanced mode or
-    not.
-
-    Enhanced mode adds support for up to 32 buttons per joystick, an indefinite
-    number of axes and thumb controls, and also allows you to connect multiple
-    joysticks to a single game port. It provides several methods to determine
-    the state of a joystick and also a preference application.
-
-    Enhanced mode also provides a mechanism to determine what joysticks are
-    available and what types of and how many controls are available on them.
-
-    \param portname The name of the game port to be opened.
-    \param enhanced Specifies whether to use enhanced mode while opening the 
port.
-    \return B_BAD_VALUE if portname is null.
-            B_ERROR if the specified port is unable to open or if portname is 
not valid.
-            A positive integer if the port is opened succesfully.
-    \see CountDevices()
-         GetDeviceName()
+       \fn status_t BJoystick::Open(const char *portname, bool enhanced)
+       \brief Open a specific game port.
+
+       This method can be used to open the game port specified by the parameter
+       \c portname amd also allows you to specify whether to use enhanced mode 
or
+       not. The port name can be either an absolute path to the game port 
device,
+       or only the device file name.
+
+       Enhanced mode adds support for more than 32 buttons per joystick, and an
+       unlimited number of axes and thumb controls. To support this, several
+       functions allow to get information about the device, such as the button
+       count, the name of each button, and the number and name of the axis.
+
+       \param portname The name of the game port to be opened.
+       \param enhanced Specifies whether to use enhanced mode while opening 
the port.
+       \return B_BAD_VALUE if portname is null.
+       \return B_NO_INIT if the object failed to initialize.
+       \return B_ERROR if the specified port cannot be open.
+       \return The file descriptor for the port if it is opened succesfully.
 */


Other related posts:

  • » [haiku-commits] haiku: hrev48649 - docs/user/device - pulkomandy