107 #ifndef SDL_haptic_h_ 108 #define SDL_haptic_h_ 152 #define SDL_HAPTIC_CONSTANT (1u<<0) 161 #define SDL_HAPTIC_SINE (1u<<1) 172 #define SDL_HAPTIC_LEFTRIGHT (1u<<2) 184 #define SDL_HAPTIC_TRIANGLE (1u<<3) 193 #define SDL_HAPTIC_SAWTOOTHUP (1u<<4) 202 #define SDL_HAPTIC_SAWTOOTHDOWN (1u<<5) 211 #define SDL_HAPTIC_RAMP (1u<<6) 221 #define SDL_HAPTIC_SPRING (1u<<7) 231 #define SDL_HAPTIC_DAMPER (1u<<8) 241 #define SDL_HAPTIC_INERTIA (1u<<9) 251 #define SDL_HAPTIC_FRICTION (1u<<10) 258 #define SDL_HAPTIC_CUSTOM (1u<<11) 271 #define SDL_HAPTIC_GAIN (1u<<12) 280 #define SDL_HAPTIC_AUTOCENTER (1u<<13) 289 #define SDL_HAPTIC_STATUS (1u<<14) 299 #define SDL_HAPTIC_PAUSE (1u<<15) 312 #define SDL_HAPTIC_POLAR 0 319 #define SDL_HAPTIC_CARTESIAN 1 326 #define SDL_HAPTIC_SPHERICAL 2 341 #define SDL_HAPTIC_INFINITY 4294967295U
Structure that represents a haptic direction.
int SDL_HapticGetEffectStatus(SDL_Haptic *haptic, int effect)
Gets the status of the current effect on the haptic device.
int SDL_HapticUpdateEffect(SDL_Haptic *haptic, int effect, SDL_HapticEffect *data)
Updates the properties of an effect.
void SDL_HapticClose(SDL_Haptic *haptic)
Closes a haptic device previously opened with SDL_HapticOpen().
int SDL_HapticPause(SDL_Haptic *haptic)
Pauses a haptic device.
A structure containing a template for a Periodic effect.
SDL_HapticDirection direction
int SDL_HapticRumbleInit(SDL_Haptic *haptic)
Initializes the haptic device for simple rumble playback.
SDL_Haptic * SDL_HapticOpen(int device_index)
Opens a haptic device for use.
A structure containing a template for a Condition effect.
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
A structure containing a template for a Constant effect.
int SDL_HapticSetGain(SDL_Haptic *haptic, int gain)
Sets the global gain of the device.
int SDL_HapticNewEffect(SDL_Haptic *haptic, SDL_HapticEffect *effect)
Creates a new haptic effect on the device.
SDL_Haptic * SDL_HapticOpenFromMouse(void)
Tries to open a haptic device from the current mouse.
void SDL_HapticDestroyEffect(SDL_Haptic *haptic, int effect)
Destroys a haptic effect on the device.
SDL_HapticCondition condition
A structure containing a template for a Left/Right effect.
int SDL_HapticRumbleStop(SDL_Haptic *haptic)
Stops the simple rumble on a haptic device.
The generic template for any haptic effect.
int SDL_HapticNumEffectsPlaying(SDL_Haptic *haptic)
Returns the number of effects a haptic device can play at the same time.
SDL_HapticConstant constant
int SDL_HapticEffectSupported(SDL_Haptic *haptic, SDL_HapticEffect *effect)
Checks to see if effect is supported by haptic.
SDL_HapticDirection direction
int SDL_HapticNumEffects(SDL_Haptic *haptic)
Returns the number of effects a haptic device can store.
int SDL_HapticIndex(SDL_Haptic *haptic)
Gets the index of a haptic device.
const char * SDL_HapticName(int device_index)
Get the implementation dependent name of a haptic device.
A structure containing a template for a Ramp effect.
int SDL_HapticRunEffect(SDL_Haptic *haptic, int effect, Uint32 iterations)
Runs the haptic effect on its associated haptic device.
int SDL_JoystickIsHaptic(SDL_Joystick *joystick)
Checks to see if a joystick has haptic features.
static SDL_Haptic * haptic
int SDL_HapticRumbleSupported(SDL_Haptic *haptic)
Checks to see if rumble is supported on a haptic device.
int SDL_HapticRumblePlay(SDL_Haptic *haptic, float strength, Uint32 length)
Runs simple rumble on a haptic device.
SDL_HapticDirection direction
SDL_HapticLeftRight leftright
int SDL_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter)
Sets the global autocenter of the device.
int SDL_HapticNumAxes(SDL_Haptic *haptic)
Gets the number of haptic axes the device has.
int SDL_HapticStopEffect(SDL_Haptic *haptic, int effect)
Stops the haptic effect on its associated haptic device.
int SDL_MouseIsHaptic(void)
Gets whether or not the current mouse has haptic capabilities.
A structure containing a template for the SDL_HAPTIC_CUSTOM effect.
unsigned int SDL_HapticQuery(SDL_Haptic *haptic)
Gets the haptic device's supported features in bitwise manner.
SDL_Haptic * SDL_HapticOpenFromJoystick(SDL_Joystick *joystick)
Opens a haptic device for use from a joystick device.
GLuint GLsizei GLsizei * length
SDL_HapticPeriodic periodic
int SDL_HapticOpened(int device_index)
Checks if the haptic device at index has been opened.
int SDL_NumHaptics(void)
Count the number of haptic devices attached to the system.
SDL_HapticDirection direction
SDL_HapticDirection direction
int SDL_HapticStopAll(SDL_Haptic *haptic)
Stops all the currently playing effects on a haptic device.
int SDL_HapticUnpause(SDL_Haptic *haptic)
Unpauses a haptic device.