include/SDL_haptic.h
branchgsoc2008_force_feedback
changeset 2489 96adc8025331
parent 2488 8e2bdbccf7ff
child 2495 66c02abeef0e
     1.1 --- a/include/SDL_haptic.h	Tue Jul 01 18:35:05 2008 +0000
     1.2 +++ b/include/SDL_haptic.h	Wed Jul 02 08:24:35 2008 +0000
     1.3 @@ -31,6 +31,7 @@
     1.4  
     1.5  #include "SDL_stdinc.h"
     1.6  #include "SDL_error.h"
     1.7 +#include "SDL_joystick.h"
     1.8  
     1.9  #include "begin_code.h"
    1.10  /* Set up for C function definitions, even when using C++ */
    1.11 @@ -207,6 +208,22 @@
    1.12   */
    1.13  extern DECLSPEC SDL_Haptic * SDL_HapticOpen(int device_index);
    1.14  
    1.15 +/*
    1.16 + * Checks to see if a joystick has haptic features.
    1.17 + *
    1.18 + * Returns SDL_TRUE if the joystick is haptic, SDL_FALSE if it isn't
    1.19 + * and -1 on error.
    1.20 + */
    1.21 +extern DECLSPEC int SDL_JoystickIsHaptic(SDL_Joystick * joystick);
    1.22 +
    1.23 +/*
    1.24 + * Opens a Haptic device for usage from a Joystick device.
    1.25 + *
    1.26 + * Returns a valid pointer to a haptic device on success or NULL
    1.27 + * if an error occurred.
    1.28 + */
    1.29 +extern DECLSPEC SDL_Haptic * SDL_HapticOpenFromJoystick(SDL_Joystick * joystick);
    1.30 +
    1.31  /* 
    1.32   * Closes a Haptic device previously opened with SDL_HapticOpen.
    1.33   */