112 #ifndef _SDL_haptic_h
113 #define _SDL_haptic_h
157 #define SDL_HAPTIC_CONSTANT (1<<0)
166 #define SDL_HAPTIC_SINE (1<<1)
177 #define SDL_HAPTIC_LEFTRIGHT (1<<2)
189 #define SDL_HAPTIC_TRIANGLE (1<<3)
198 #define SDL_HAPTIC_SAWTOOTHUP (1<<4)
207 #define SDL_HAPTIC_SAWTOOTHDOWN (1<<5)
216 #define SDL_HAPTIC_RAMP (1<<6)
226 #define SDL_HAPTIC_SPRING (1<<7)
236 #define SDL_HAPTIC_DAMPER (1<<8)
246 #define SDL_HAPTIC_INERTIA (1<<9)
256 #define SDL_HAPTIC_FRICTION (1<<10)
263 #define SDL_HAPTIC_CUSTOM (1<<11)
276 #define SDL_HAPTIC_GAIN (1<<12)
285 #define SDL_HAPTIC_AUTOCENTER (1<<13)
294 #define SDL_HAPTIC_STATUS (1<<14)
302 #define SDL_HAPTIC_PAUSE (1<<15)
315 #define SDL_HAPTIC_POLAR 0
322 #define SDL_HAPTIC_CARTESIAN 1
329 #define SDL_HAPTIC_SPHERICAL 2
344 #define SDL_HAPTIC_INFINITY 4294967295U
struct SDL_HapticDirection SDL_HapticDirection
Structure that represents a haptic direction.
Structure that represents a haptic direction.
DECLSPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic *haptic)
Stops all the currently playing effects on a haptic device.
struct SDL_HapticConstant SDL_HapticConstant
A structure containing a template for a Constant effect.
int32_t Sint32
A signed 32-bit integer type.
DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic *haptic, float strength, Uint32 length)
Runs simple rumble on a haptic device.
DECLSPEC int SDLCALL SDL_HapticUpdateEffect(SDL_Haptic *haptic, int effect, SDL_HapticEffect *data)
Updates the properties of an effect.
A structure containing a template for a Periodic effect.
SDL_HapticDirection direction
DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromJoystick(SDL_Joystick *joystick)
Opens a Haptic device for usage from a Joystick device.
DECLSPEC int SDLCALL SDL_HapticNumEffects(SDL_Haptic *haptic)
Returns the number of effects a haptic device can store.
DECLSPEC int SDLCALL SDL_HapticStopEffect(SDL_Haptic *haptic, int effect)
Stops the haptic effect on its associated haptic device.
DECLSPEC void SDLCALL SDL_HapticClose(SDL_Haptic *haptic)
Closes a Haptic device previously opened with SDL_HapticOpen().
DECLSPEC int SDLCALL SDL_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter)
Sets the global autocenter of the device.
A structure containing a template for a Condition effect.
DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic *haptic)
Unpauses a haptic device.
DECLSPEC unsigned int SDLCALL SDL_HapticQuery(SDL_Haptic *haptic)
Gets the haptic devices supported features in bitwise matter.
struct SDL_HapticRamp SDL_HapticRamp
A structure containing a template for a Ramp effect.
A structure containing a template for a Constant effect.
DECLSPEC int SDLCALL SDL_MouseIsHaptic(void)
Gets whether or not the current mouse has haptic capabilities.
uint32_t Uint32
An unsigned 32-bit integer type.
DECLSPEC int SDLCALL SDL_JoystickIsHaptic(SDL_Joystick *joystick)
Checks to see if a joystick has haptic features.
SDL_HapticCondition condition
DECLSPEC int SDLCALL SDL_HapticEffectSupported(SDL_Haptic *haptic, SDL_HapticEffect *effect)
Checks to see if effect is supported by haptic.
A structure containing a template for a Left/Right effect.
DECLSPEC int SDLCALL SDL_HapticNumAxes(SDL_Haptic *haptic)
Gets the number of haptic axes the device has.
DECLSPEC int SDLCALL SDL_HapticNumEffectsPlaying(SDL_Haptic *haptic)
Returns the number of effects a haptic device can play at the same time.
The generic template for any haptic effect.
union SDL_HapticEffect SDL_HapticEffect
The generic template for any haptic effect.
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
DECLSPEC int SDLCALL SDL_HapticOpened(int device_index)
Checks if the haptic device at index has been opened.
DECLSPEC int SDLCALL SDL_HapticNewEffect(SDL_Haptic *haptic, SDL_HapticEffect *effect)
Creates a new haptic effect on the device.
SDL_HapticConstant constant
DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpen(int device_index)
Opens a Haptic device for usage.
struct SDL_HapticCustom SDL_HapticCustom
A structure containing a template for the SDL_HAPTIC_CUSTOM effect.
SDL_HapticDirection direction
A structure containing a template for a Ramp effect.
DECLSPEC int SDLCALL SDL_HapticIndex(SDL_Haptic *haptic)
Gets the index of a haptic device.
DECLSPEC int SDLCALL SDL_HapticRumbleSupported(SDL_Haptic *haptic)
Checks to see if rumble is supported on a haptic device.
struct SDL_HapticLeftRight SDL_HapticLeftRight
A structure containing a template for a Left/Right effect.
struct SDL_HapticCondition SDL_HapticCondition
A structure containing a template for a Condition effect.
struct SDL_HapticPeriodic SDL_HapticPeriodic
A structure containing a template for a Periodic effect.
SDL_HapticDirection direction
SDL_HapticLeftRight leftright
uint8_t Uint8
An unsigned 8-bit integer type.
int16_t Sint16
A signed 16-bit integer type.
DECLSPEC void SDLCALL SDL_HapticDestroyEffect(SDL_Haptic *haptic, int effect)
Destroys a haptic effect on the device.
A structure containing a template for the SDL_HAPTIC_CUSTOM effect.
DECLSPEC int SDLCALL SDL_HapticRunEffect(SDL_Haptic *haptic, int effect, Uint32 iterations)
Runs the haptic effect on its associated haptic device.
uint16_t Uint16
An unsigned 16-bit integer type.
DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic *haptic)
Stops the simple rumble on a haptic device.
DECLSPEC int SDLCALL SDL_HapticSetGain(SDL_Haptic *haptic, int gain)
Sets the global gain of the device.
DECLSPEC const char *SDLCALL SDL_HapticName(int device_index)
Get the implementation dependent name of a Haptic device.
DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic *haptic)
Initializes the haptic device for simple rumble playback.
SDL_HapticPeriodic periodic
DECLSPEC int SDLCALL SDL_NumHaptics(void)
Count the number of haptic devices attached to the system.
DECLSPEC int SDLCALL SDL_HapticGetEffectStatus(SDL_Haptic *haptic, int effect)
Gets the status of the current effect on the haptic device.
DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromMouse(void)
Tries to open a haptic device from the current mouse.
SDL_HapticDirection direction
SDL_HapticDirection direction
DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic *haptic)
Pauses a haptic device.