include/SDL_haptic.h
branchgsoc2008_force_feedback
changeset 2489 96adc8025331
parent 2488 8e2bdbccf7ff
child 2495 66c02abeef0e
equal deleted inserted replaced
2488:8e2bdbccf7ff 2489:96adc8025331
    29 #ifndef _SDL_haptic_h
    29 #ifndef _SDL_haptic_h
    30 #define _SDL_haptic_h
    30 #define _SDL_haptic_h
    31 
    31 
    32 #include "SDL_stdinc.h"
    32 #include "SDL_stdinc.h"
    33 #include "SDL_error.h"
    33 #include "SDL_error.h"
       
    34 #include "SDL_joystick.h"
    34 
    35 
    35 #include "begin_code.h"
    36 #include "begin_code.h"
    36 /* Set up for C function definitions, even when using C++ */
    37 /* Set up for C function definitions, even when using C++ */
    37 #ifdef __cplusplus
    38 #ifdef __cplusplus
    38 /* *INDENT-OFF* */
    39 /* *INDENT-OFF* */
   205  * This function returns a Haptic device identifier, or Null
   206  * This function returns a Haptic device identifier, or Null
   206  * if an error occurred.
   207  * if an error occurred.
   207  */
   208  */
   208 extern DECLSPEC SDL_Haptic * SDL_HapticOpen(int device_index);
   209 extern DECLSPEC SDL_Haptic * SDL_HapticOpen(int device_index);
   209 
   210 
       
   211 /*
       
   212  * Checks to see if a joystick has haptic features.
       
   213  *
       
   214  * Returns SDL_TRUE if the joystick is haptic, SDL_FALSE if it isn't
       
   215  * and -1 on error.
       
   216  */
       
   217 extern DECLSPEC int SDL_JoystickIsHaptic(SDL_Joystick * joystick);
       
   218 
       
   219 /*
       
   220  * Opens a Haptic device for usage from a Joystick device.
       
   221  *
       
   222  * Returns a valid pointer to a haptic device on success or NULL
       
   223  * if an error occurred.
       
   224  */
       
   225 extern DECLSPEC SDL_Haptic * SDL_HapticOpenFromJoystick(SDL_Joystick * joystick);
       
   226 
   210 /* 
   227 /* 
   211  * Closes a Haptic device previously opened with SDL_HapticOpen.
   228  * Closes a Haptic device previously opened with SDL_HapticOpen.
   212  */
   229  */
   213 extern DECLSPEC void SDL_HapticClose(SDL_Haptic * haptic);
   230 extern DECLSPEC void SDL_HapticClose(SDL_Haptic * haptic);
   214 
   231