diff include/SDL_haptic.h @ 2512:ef147ee4896c gsoc2008_force_feedback

Improved some ioctl handling. Implemented SDL_MouseIsHaptic and SDL_HapticOpenFromMouse. More code comments.
author Edgar Simo <bobbens@gmail.com>
date Thu, 10 Jul 2008 08:38:08 +0000
parents f12ae0bae468
children 030fc4375e63
line wrap: on
line diff
--- a/include/SDL_haptic.h	Wed Jul 09 18:29:11 2008 +0000
+++ b/include/SDL_haptic.h	Thu Jul 10 08:38:08 2008 +0000
@@ -638,6 +638,7 @@
  *    \return Device identifier or NULL on error.
  *
  * \sa SDL_HapticIndex
+ * \sa SDL_HapticOpenFromMouse
  * \sa SDL_HapticOpenFromJoystick
  * \sa SDL_HapticClose
  * \sa SDL_HapticSetGain
@@ -672,6 +673,29 @@
 extern DECLSPEC int SDL_HapticIndex(SDL_Haptic * haptic);
 
 /**
+ * \fn int SDL_MouseIsHaptic(void)
+ *
+ * \brief Gets whether or not the current mouse has haptic capabilities.
+ *
+ *    \return SDL_TRUE if the mouse is haptic, SDL_FALSE if it isn't.
+ *
+ * \sa SDL_HapticOpenFromMouse
+ */
+extern DECLSPEC SDL_MouseIsHaptic(void);
+
+/**
+ * \fn SDL_Haptic * SDL_HapticOpenFromMouse(void)
+ *
+ * \brief Tries to open a haptic device from the current mouse.
+ *
+ *    \return The haptic device identifier or NULL on error.
+ *
+ * \sa SDL_MouseIsHaptic
+ * \sa SDL_HapticOpen
+ */
+extern DECLSPEC SDL_Haptic * SDL_HapticOpenFromMouse(void);
+
+/**
  * \fn int SDL_JoystickIsHaptic(SDL_Joystick * joystick)
  *
  * \brief Checks to see if a joystick has haptic features.