diff include/SDL_haptic.h @ 2476:242d8a668ebb gsoc2008_force_feedback

* Implemented opening and closing of haptic devices.
author Edgar Simo <bobbens@gmail.com>
date Mon, 23 Jun 2008 09:01:58 +0000
parents 3f73c88c9abb
children 97f75ea43a93
line wrap: on
line diff
--- a/include/SDL_haptic.h	Sun Jun 01 19:11:49 2008 +0000
+++ b/include/SDL_haptic.h	Mon Jun 23 09:01:58 2008 +0000
@@ -65,12 +65,26 @@
 extern DECLSPEC int SDLCALL SDL_NumHaptics(void);
 
 /*
- * Get the implementation dependent name of a joystick.
+ * Get the implementation dependent name of a Haptic device.
  * This can be called before any joysticks are opened.
  * If no name can be found, this function returns NULL.
  */
 extern DECLSPEC const char *SDLCALL SDL_HapticName(int device_index);
 
+/*
+ * Opens a Haptic device for usage - the index passed as an
+ * argument refers to the N'th Haptic device on this system.
+ *
+ * This function returns a Haptic device identifier, or Null
+ * if an error occurred.
+ */
+extern DECLSPEC SDL_Haptic * SDL_HapticOpen(int device_index);
+
+/* 
+ * Closes a Haptic device previously opened with SDL_HapticOpen.
+ */
+extern DECLSPEC void SDL_HapticClose(SDL_Haptic * haptic);
+
 
 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus