| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
SDL3.Sys.Bindgen.Haptic
Description
The SDL haptic subsystem manages haptic (force feedback) devices.
The basic usage is as follows:
- Initialize the subsystem (SDL_INIT_HAPTIC).
- Open a haptic device.
SDL_OpenHaptic()to open from index.SDL_OpenHapticFromJoystick()to open from an existing joystick.- Create an effect (
SDL_HapticEffect). - Upload the effect with
SDL_CreateHapticEffect(). - Run the effect with
SDL_RunHapticEffect(). - (optional) Free the effect with
SDL_DestroyHapticEffect(). - Close the haptic device with
SDL_CloseHaptic().
Simple rumble example:
SDL_Haptic *haptic = NULL;
// Open the device
SDL_HapticID *haptics = SDL_GetHaptics(NULL);
if (haptics) {
haptic = SDL_OpenHaptic(haptics[0]);
SDL_free(haptics);
}
if (haptic == NULL)
return;
// Initialize simple rumble
if (!SDL_InitHapticRumble(haptic))
return;
// Play effect at 50% strength for 2 seconds
if (!SDL_PlayHapticRumble(haptic, 0.5, 2000))
return;
SDL_Delay(2000);
// Clean up
SDL_CloseHaptic(haptic);
Complete example:
bool test_haptic(SDL_Joystick *joystick)
{
SDL_Haptic *haptic;
SDL_HapticEffect effect;
SDL_HapticEffectID effect_id;
// Open the device
haptic = SDL_OpenHapticFromJoystick(joystick);
if (haptic == NULL) return false; // Most likely joystick isn't haptic
// See if it can do sine waves
if ((SDL_GetHapticFeatures(haptic) & SDL_HAPTIC_SINE)==0) {
SDL_CloseHaptic(haptic); // No sine effect
return false;
}
// Create the effect
SDL_memset(&effect, 0, sizeof(SDL_HapticEffect)); // 0 is safe default
effect.type = SDL_HAPTIC_SINE;
effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates
effect.periodic.direction.dir[0] = 18000; // Force comes from south
effect.periodic.period = 1000; // 1000 ms
effect.periodic.magnitude = 20000; // 20000/32767 strength
effect.periodic.length = 5000; // 5 seconds long
effect.periodic.attack_length = 1000; // Takes 1 second to get max strength
effect.periodic.fade_length = 1000; // Takes 1 second to fade away
// Upload the effect
effect_id = SDL_CreateHapticEffect(haptic, &effect);
// Test the effect
SDL_RunHapticEffect(haptic, effect_id, 1);
SDL_Delay(5000); // Wait for the effect to finish
// We destroy the effect, although closing the device also does this
SDL_DestroyHapticEffect(haptic, effect_id);
// Close the device
SDL_CloseHaptic(haptic);
return true; // Success
}
Note that the SDL haptic subsystem is not thread-safe. The haptic structure used to identify an SDL haptic.
- See also
sDL_OpenHaptic,sDL_OpenHapticFromJoystick,sDL_CloseHaptic
Since: 3.2.0
Synopsis
- data SDL_Haptic
- sDL_HAPTIC_INFINITY :: CUInt
- newtype SDL_HapticEffectType = SDL_HapticEffectType {}
- sDL_HAPTIC_CONSTANT :: CUInt
- sDL_HAPTIC_SINE :: CUInt
- sDL_HAPTIC_SQUARE :: CUInt
- sDL_HAPTIC_TRIANGLE :: CUInt
- sDL_HAPTIC_SAWTOOTHUP :: CUInt
- sDL_HAPTIC_SAWTOOTHDOWN :: CUInt
- sDL_HAPTIC_RAMP :: CUInt
- sDL_HAPTIC_SPRING :: CUInt
- sDL_HAPTIC_DAMPER :: CUInt
- sDL_HAPTIC_INERTIA :: CUInt
- sDL_HAPTIC_FRICTION :: CUInt
- sDL_HAPTIC_LEFTRIGHT :: CUInt
- sDL_HAPTIC_RESERVED1 :: CUInt
- sDL_HAPTIC_RESERVED2 :: CUInt
- sDL_HAPTIC_RESERVED3 :: CUInt
- sDL_HAPTIC_CUSTOM :: CUInt
- sDL_HAPTIC_GAIN :: CUInt
- sDL_HAPTIC_AUTOCENTER :: CUInt
- sDL_HAPTIC_STATUS :: CUInt
- sDL_HAPTIC_PAUSE :: CUInt
- newtype SDL_HapticDirectionType = SDL_HapticDirectionType {}
- sDL_HAPTIC_POLAR :: CInt
- sDL_HAPTIC_CARTESIAN :: CInt
- sDL_HAPTIC_SPHERICAL :: CInt
- sDL_HAPTIC_STEERING_AXIS :: CInt
- newtype SDL_HapticEffectID = SDL_HapticEffectID {}
- data SDL_HapticDirection = SDL_HapticDirection {}
- data SDL_HapticConstant = SDL_HapticConstant {}
- data SDL_HapticPeriodic = SDL_HapticPeriodic {
- type' :: SDL_HapticEffectType
- direction :: SDL_HapticDirection
- length :: Uint32
- delay :: Uint16
- button :: Uint16
- interval :: Uint16
- period :: Uint16
- magnitude :: Sint16
- offset :: Sint16
- phase :: Uint16
- attack_length :: Uint16
- attack_level :: Uint16
- fade_length :: Uint16
- fade_level :: Uint16
- data SDL_HapticCondition = SDL_HapticCondition {
- type' :: SDL_HapticEffectType
- direction :: SDL_HapticDirection
- length :: Uint32
- delay :: Uint16
- button :: Uint16
- interval :: Uint16
- right_sat :: ConstantArray 3 Uint16
- left_sat :: ConstantArray 3 Uint16
- right_coeff :: ConstantArray 3 Sint16
- left_coeff :: ConstantArray 3 Sint16
- deadband :: ConstantArray 3 Uint16
- center :: ConstantArray 3 Sint16
- data SDL_HapticRamp = SDL_HapticRamp {
- type' :: SDL_HapticEffectType
- direction :: SDL_HapticDirection
- length :: Uint32
- delay :: Uint16
- button :: Uint16
- interval :: Uint16
- start :: Sint16
- end :: Sint16
- attack_length :: Uint16
- attack_level :: Uint16
- fade_length :: Uint16
- fade_level :: Uint16
- data SDL_HapticLeftRight = SDL_HapticLeftRight {}
- data SDL_HapticCustom = SDL_HapticCustom {
- type' :: SDL_HapticEffectType
- direction :: SDL_HapticDirection
- length :: Uint32
- delay :: Uint16
- button :: Uint16
- interval :: Uint16
- channels :: Uint8
- period :: Uint16
- samples :: Uint16
- data' :: Ptr Uint16
- attack_length :: Uint16
- attack_level :: Uint16
- fade_length :: Uint16
- fade_level :: Uint16
- newtype SDL_HapticEffect = SDL_HapticEffect {}
- newtype SDL_HapticID = SDL_HapticID {}
Documentation
data SDL_Haptic Source #
- C declaration
struct SDL_Haptic, defined atSDL3/SDL_haptic.h 150:16
sDL_HAPTIC_INFINITY :: CUInt Source #
Used to play a device an infinite number of times.
- See also
sDL_RunHapticEffect- C declaration
macro SDL_HAPTIC_INFINITY, defined atSDL3/SDL_haptic.h 163:9
Since: 3.2.0
newtype SDL_HapticEffectType Source #
Type of haptic effect.
- C declaration
SDL_HapticEffectType, defined atSDL3/SDL_haptic.h 181:16
Constructors
| SDL_HapticEffectType | |
Instances
sDL_HAPTIC_CONSTANT :: CUInt Source #
Constant effect supported.
Constant haptic effect.
- See also
SDL_HapticCondition- C declaration
macro SDL_HAPTIC_CONSTANT, defined atSDL3/SDL_haptic.h 192:9
Since: 3.2.0
sDL_HAPTIC_SINE :: CUInt Source #
Sine wave effect supported.
Periodic haptic effect that simulates sine waves.
- See also
SDL_HapticPeriodic- C declaration
macro SDL_HAPTIC_SINE, defined atSDL3/SDL_haptic.h 203:9
Since: 3.2.0
sDL_HAPTIC_SQUARE :: CUInt Source #
Square wave effect supported.
Periodic haptic effect that simulates square waves.
- See also
SDL_HapticPeriodic- C declaration
macro SDL_HAPTIC_SQUARE, defined atSDL3/SDL_haptic.h 214:9
Since: 3.2.0
sDL_HAPTIC_TRIANGLE :: CUInt Source #
Triangle wave effect supported.
Periodic haptic effect that simulates triangular waves.
- See also
SDL_HapticPeriodic- C declaration
macro SDL_HAPTIC_TRIANGLE, defined atSDL3/SDL_haptic.h 225:9
Since: 3.2.0
sDL_HAPTIC_SAWTOOTHUP :: CUInt Source #
Sawtoothup wave effect supported.
Periodic haptic effect that simulates saw tooth up waves.
- See also
SDL_HapticPeriodic- C declaration
macro SDL_HAPTIC_SAWTOOTHUP, defined atSDL3/SDL_haptic.h 236:9
Since: 3.2.0
sDL_HAPTIC_SAWTOOTHDOWN :: CUInt Source #
Sawtoothdown wave effect supported.
Periodic haptic effect that simulates saw tooth down waves.
- See also
SDL_HapticPeriodic- C declaration
macro SDL_HAPTIC_SAWTOOTHDOWN, defined atSDL3/SDL_haptic.h 247:9
Since: 3.2.0
sDL_HAPTIC_RAMP :: CUInt Source #
Ramp effect supported.
Ramp haptic effect.
- See also
SDL_HapticRamp- C declaration
macro SDL_HAPTIC_RAMP, defined atSDL3/SDL_haptic.h 258:9
Since: 3.2.0
sDL_HAPTIC_SPRING :: CUInt Source #
Spring effect supported - uses axes position.
Condition haptic effect that simulates a spring. Effect is based on the axes position.
- See also
SDL_HapticCondition- C declaration
macro SDL_HAPTIC_SPRING, defined atSDL3/SDL_haptic.h 270:9
Since: 3.2.0
sDL_HAPTIC_DAMPER :: CUInt Source #
Damper effect supported - uses axes velocity.
Condition haptic effect that simulates dampening. Effect is based on the axes velocity.
- See also
SDL_HapticCondition- C declaration
macro SDL_HAPTIC_DAMPER, defined atSDL3/SDL_haptic.h 282:9
Since: 3.2.0
sDL_HAPTIC_INERTIA :: CUInt Source #
Inertia effect supported - uses axes acceleration.
Condition haptic effect that simulates inertia. Effect is based on the axes acceleration.
- See also
SDL_HapticCondition- C declaration
macro SDL_HAPTIC_INERTIA, defined atSDL3/SDL_haptic.h 294:9
Since: 3.2.0
sDL_HAPTIC_FRICTION :: CUInt Source #
Friction effect supported - uses axes movement.
Condition haptic effect that simulates friction. Effect is based on the axes movement.
- See also
SDL_HapticCondition- C declaration
macro SDL_HAPTIC_FRICTION, defined atSDL3/SDL_haptic.h 306:9
Since: 3.2.0
sDL_HAPTIC_LEFTRIGHT :: CUInt Source #
Left/Right effect supported.
Haptic effect for direct control over high/low frequency motors.
- See also
SDL_HapticLeftRight- C declaration
macro SDL_HAPTIC_LEFTRIGHT, defined atSDL3/SDL_haptic.h 317:9
Since: 3.2.0
sDL_HAPTIC_RESERVED1 :: CUInt Source #
Reserved for future use.
- C declaration
macro SDL_HAPTIC_RESERVED1, defined atSDL3/SDL_haptic.h 324:9
Since: 3.2.0
sDL_HAPTIC_RESERVED2 :: CUInt Source #
Reserved for future use.
- C declaration
macro SDL_HAPTIC_RESERVED2, defined atSDL3/SDL_haptic.h 331:9
Since: 3.2.0
sDL_HAPTIC_RESERVED3 :: CUInt Source #
Reserved for future use.
- C declaration
macro SDL_HAPTIC_RESERVED3, defined atSDL3/SDL_haptic.h 338:9
Since: 3.2.0
sDL_HAPTIC_CUSTOM :: CUInt Source #
Custom effect is supported.
User defined custom haptic effect.
- C declaration
macro SDL_HAPTIC_CUSTOM, defined atSDL3/SDL_haptic.h 347:9
Since: 3.2.0
sDL_HAPTIC_GAIN :: CUInt Source #
Device can set global gain.
Device supports setting the global gain.
- See also
sDL_SetHapticGain- C declaration
macro SDL_HAPTIC_GAIN, defined atSDL3/SDL_haptic.h 362:9
Since: 3.2.0
sDL_HAPTIC_AUTOCENTER :: CUInt Source #
Device can set autocenter.
Device supports setting autocenter.
- See also
sDL_SetHapticAutocenter- C declaration
macro SDL_HAPTIC_AUTOCENTER, defined atSDL3/SDL_haptic.h 373:9
Since: 3.2.0
sDL_HAPTIC_STATUS :: CUInt Source #
Device can be queried for effect status.
Device supports querying effect status.
- See also
sDL_GetHapticEffectStatus- C declaration
macro SDL_HAPTIC_STATUS, defined atSDL3/SDL_haptic.h 384:9
Since: 3.2.0
sDL_HAPTIC_PAUSE :: CUInt Source #
Device can be paused.
Devices supports being paused.
- See also
sDL_PauseHaptic,sDL_ResumeHaptic- C declaration
macro SDL_HAPTIC_PAUSE, defined atSDL3/SDL_haptic.h 396:9
Since: 3.2.0
newtype SDL_HapticDirectionType Source #
Type of coordinates used for haptic direction.
- C declaration
SDL_HapticDirectionType, defined atSDL3/SDL_haptic.h 407:15
Constructors
| SDL_HapticDirectionType | |
Instances
| Bits SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods (.&.) :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> SDL_HapticDirectionType # (.|.) :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> SDL_HapticDirectionType # xor :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> SDL_HapticDirectionType # complement :: SDL_HapticDirectionType -> SDL_HapticDirectionType # shift :: SDL_HapticDirectionType -> Int -> SDL_HapticDirectionType # rotate :: SDL_HapticDirectionType -> Int -> SDL_HapticDirectionType # zeroBits :: SDL_HapticDirectionType # bit :: Int -> SDL_HapticDirectionType # setBit :: SDL_HapticDirectionType -> Int -> SDL_HapticDirectionType # clearBit :: SDL_HapticDirectionType -> Int -> SDL_HapticDirectionType # complementBit :: SDL_HapticDirectionType -> Int -> SDL_HapticDirectionType # testBit :: SDL_HapticDirectionType -> Int -> Bool # bitSizeMaybe :: SDL_HapticDirectionType -> Maybe Int # bitSize :: SDL_HapticDirectionType -> Int # isSigned :: SDL_HapticDirectionType -> Bool # shiftL :: SDL_HapticDirectionType -> Int -> SDL_HapticDirectionType # unsafeShiftL :: SDL_HapticDirectionType -> Int -> SDL_HapticDirectionType # shiftR :: SDL_HapticDirectionType -> Int -> SDL_HapticDirectionType # unsafeShiftR :: SDL_HapticDirectionType -> Int -> SDL_HapticDirectionType # rotateL :: SDL_HapticDirectionType -> Int -> SDL_HapticDirectionType # rotateR :: SDL_HapticDirectionType -> Int -> SDL_HapticDirectionType # popCount :: SDL_HapticDirectionType -> Int # | |||||
| FiniteBits SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods finiteBitSize :: SDL_HapticDirectionType -> Int # | |||||
| Bounded SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| Enum SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods succ :: SDL_HapticDirectionType -> SDL_HapticDirectionType # pred :: SDL_HapticDirectionType -> SDL_HapticDirectionType # toEnum :: Int -> SDL_HapticDirectionType # fromEnum :: SDL_HapticDirectionType -> Int # enumFrom :: SDL_HapticDirectionType -> [SDL_HapticDirectionType] # enumFromThen :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> [SDL_HapticDirectionType] # enumFromTo :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> [SDL_HapticDirectionType] # enumFromThenTo :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> SDL_HapticDirectionType -> [SDL_HapticDirectionType] # | |||||
| Storable SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods sizeOf :: SDL_HapticDirectionType -> Int # alignment :: SDL_HapticDirectionType -> Int # peekElemOff :: Ptr SDL_HapticDirectionType -> Int -> IO SDL_HapticDirectionType # pokeElemOff :: Ptr SDL_HapticDirectionType -> Int -> SDL_HapticDirectionType -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_HapticDirectionType # pokeByteOff :: Ptr b -> Int -> SDL_HapticDirectionType -> IO () # peek :: Ptr SDL_HapticDirectionType -> IO SDL_HapticDirectionType # poke :: Ptr SDL_HapticDirectionType -> SDL_HapticDirectionType -> IO () # | |||||
| Generic SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
Methods from :: SDL_HapticDirectionType -> Rep SDL_HapticDirectionType x # to :: Rep SDL_HapticDirectionType x -> SDL_HapticDirectionType # | |||||
| Ix SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods range :: (SDL_HapticDirectionType, SDL_HapticDirectionType) -> [SDL_HapticDirectionType] # index :: (SDL_HapticDirectionType, SDL_HapticDirectionType) -> SDL_HapticDirectionType -> Int # unsafeIndex :: (SDL_HapticDirectionType, SDL_HapticDirectionType) -> SDL_HapticDirectionType -> Int # inRange :: (SDL_HapticDirectionType, SDL_HapticDirectionType) -> SDL_HapticDirectionType -> Bool # rangeSize :: (SDL_HapticDirectionType, SDL_HapticDirectionType) -> Int # unsafeRangeSize :: (SDL_HapticDirectionType, SDL_HapticDirectionType) -> Int # | |||||
| Num SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods (+) :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> SDL_HapticDirectionType # (-) :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> SDL_HapticDirectionType # (*) :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> SDL_HapticDirectionType # negate :: SDL_HapticDirectionType -> SDL_HapticDirectionType # abs :: SDL_HapticDirectionType -> SDL_HapticDirectionType # signum :: SDL_HapticDirectionType -> SDL_HapticDirectionType # | |||||
| Read SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| Integral SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods quot :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> SDL_HapticDirectionType # rem :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> SDL_HapticDirectionType # div :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> SDL_HapticDirectionType # mod :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> SDL_HapticDirectionType # quotRem :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> (SDL_HapticDirectionType, SDL_HapticDirectionType) # divMod :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> (SDL_HapticDirectionType, SDL_HapticDirectionType) # | |||||
| Real SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods | |||||
| Show SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods showsPrec :: Int -> SDL_HapticDirectionType -> ShowS # show :: SDL_HapticDirectionType -> String # showList :: [SDL_HapticDirectionType] -> ShowS # | |||||
| Eq SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods (==) :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> Bool # (/=) :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> Bool # | |||||
| Ord SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods compare :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> Ordering # (<) :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> Bool # (<=) :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> Bool # (>) :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> Bool # (>=) :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> Bool # max :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> SDL_HapticDirectionType # min :: SDL_HapticDirectionType -> SDL_HapticDirectionType -> SDL_HapticDirectionType # | |||||
| Prim SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods sizeOfType# :: Proxy SDL_HapticDirectionType -> Int# # sizeOf# :: SDL_HapticDirectionType -> Int# # alignmentOfType# :: Proxy SDL_HapticDirectionType -> Int# # alignment# :: SDL_HapticDirectionType -> Int# # indexByteArray# :: ByteArray# -> Int# -> SDL_HapticDirectionType # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, SDL_HapticDirectionType #) # writeByteArray# :: MutableByteArray# s -> Int# -> SDL_HapticDirectionType -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> SDL_HapticDirectionType -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> SDL_HapticDirectionType # readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, SDL_HapticDirectionType #) # writeOffAddr# :: Addr# -> Int# -> SDL_HapticDirectionType -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> SDL_HapticDirectionType -> State# s -> State# s # | |||||
| HasFFIType SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| ReadRaw SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods readRaw :: Ptr SDL_HapticDirectionType -> IO SDL_HapticDirectionType # | |||||
| StaticSize SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods | |||||
| WriteRaw SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods writeRaw :: Ptr SDL_HapticDirectionType -> SDL_HapticDirectionType -> IO () # | |||||
| Bitfield SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods narrow :: SDL_HapticDirectionType -> Int -> Word64 # extend :: Word64 -> Int -> SDL_HapticDirectionType # | |||||
| HasCField SDL_HapticDirectionType "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| ty ~ Uint8 => HasField "unwrap" SDL_HapticDirectionType ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticDirectionType -> (ty -> SDL_HapticDirectionType, ty) # | |||||
| ty ~ Uint8 => HasField "unwrap" (Ptr SDL_HapticDirectionType) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticDirectionType -> Ptr ty # | |||||
| type Rep SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic type Rep SDL_HapticDirectionType = D1 ('MetaData "SDL_HapticDirectionType" "SDL3.Sys.Bindgen.Haptic" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_HapticDirectionType" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Uint8))) | |||||
| type FFIType SDL_HapticDirectionType Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticDirectionType "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
sDL_HAPTIC_POLAR :: CInt Source #
Uses polar coordinates for the direction.
- See also
SDL_HapticDirection- C declaration
macro SDL_HAPTIC_POLAR, defined atSDL3/SDL_haptic.h 416:9
Since: 3.2.0
sDL_HAPTIC_CARTESIAN :: CInt Source #
Uses cartesian coordinates for the direction.
- See also
SDL_HapticDirection- C declaration
macro SDL_HAPTIC_CARTESIAN, defined atSDL3/SDL_haptic.h 425:9
Since: 3.2.0
sDL_HAPTIC_SPHERICAL :: CInt Source #
Uses spherical coordinates for the direction.
- See also
SDL_HapticDirection- C declaration
macro SDL_HAPTIC_SPHERICAL, defined atSDL3/SDL_haptic.h 434:9
Since: 3.2.0
sDL_HAPTIC_STEERING_AXIS :: CInt Source #
Use this value to play an effect on the steering wheel axis.
This provides better compatibility across platforms and devices as SDL will guess the correct axis.
- See also
SDL_HapticDirection- C declaration
macro SDL_HAPTIC_STEERING_AXIS, defined atSDL3/SDL_haptic.h 446:9
Since: 3.2.0
newtype SDL_HapticEffectID Source #
ID for haptic effects.
This is -1 if the ID is invalid.
- See also
sDL_CreateHapticEffect- C declaration
SDL_HapticEffectID, defined atSDL3/SDL_haptic.h 460:13
Constructors
| SDL_HapticEffectID | |
Instances
| Bits SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods (.&.) :: SDL_HapticEffectID -> SDL_HapticEffectID -> SDL_HapticEffectID # (.|.) :: SDL_HapticEffectID -> SDL_HapticEffectID -> SDL_HapticEffectID # xor :: SDL_HapticEffectID -> SDL_HapticEffectID -> SDL_HapticEffectID # complement :: SDL_HapticEffectID -> SDL_HapticEffectID # shift :: SDL_HapticEffectID -> Int -> SDL_HapticEffectID # rotate :: SDL_HapticEffectID -> Int -> SDL_HapticEffectID # zeroBits :: SDL_HapticEffectID # bit :: Int -> SDL_HapticEffectID # setBit :: SDL_HapticEffectID -> Int -> SDL_HapticEffectID # clearBit :: SDL_HapticEffectID -> Int -> SDL_HapticEffectID # complementBit :: SDL_HapticEffectID -> Int -> SDL_HapticEffectID # testBit :: SDL_HapticEffectID -> Int -> Bool # bitSizeMaybe :: SDL_HapticEffectID -> Maybe Int # bitSize :: SDL_HapticEffectID -> Int # isSigned :: SDL_HapticEffectID -> Bool # shiftL :: SDL_HapticEffectID -> Int -> SDL_HapticEffectID # unsafeShiftL :: SDL_HapticEffectID -> Int -> SDL_HapticEffectID # shiftR :: SDL_HapticEffectID -> Int -> SDL_HapticEffectID # unsafeShiftR :: SDL_HapticEffectID -> Int -> SDL_HapticEffectID # rotateL :: SDL_HapticEffectID -> Int -> SDL_HapticEffectID # rotateR :: SDL_HapticEffectID -> Int -> SDL_HapticEffectID # popCount :: SDL_HapticEffectID -> Int # | |||||
| FiniteBits SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| Bounded SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| Enum SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods succ :: SDL_HapticEffectID -> SDL_HapticEffectID # pred :: SDL_HapticEffectID -> SDL_HapticEffectID # toEnum :: Int -> SDL_HapticEffectID # fromEnum :: SDL_HapticEffectID -> Int # enumFrom :: SDL_HapticEffectID -> [SDL_HapticEffectID] # enumFromThen :: SDL_HapticEffectID -> SDL_HapticEffectID -> [SDL_HapticEffectID] # enumFromTo :: SDL_HapticEffectID -> SDL_HapticEffectID -> [SDL_HapticEffectID] # enumFromThenTo :: SDL_HapticEffectID -> SDL_HapticEffectID -> SDL_HapticEffectID -> [SDL_HapticEffectID] # | |||||
| Storable SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods sizeOf :: SDL_HapticEffectID -> Int # alignment :: SDL_HapticEffectID -> Int # peekElemOff :: Ptr SDL_HapticEffectID -> Int -> IO SDL_HapticEffectID # pokeElemOff :: Ptr SDL_HapticEffectID -> Int -> SDL_HapticEffectID -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_HapticEffectID # pokeByteOff :: Ptr b -> Int -> SDL_HapticEffectID -> IO () # peek :: Ptr SDL_HapticEffectID -> IO SDL_HapticEffectID # poke :: Ptr SDL_HapticEffectID -> SDL_HapticEffectID -> IO () # | |||||
| Generic SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
Methods from :: SDL_HapticEffectID -> Rep SDL_HapticEffectID x # to :: Rep SDL_HapticEffectID x -> SDL_HapticEffectID # | |||||
| Ix SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods range :: (SDL_HapticEffectID, SDL_HapticEffectID) -> [SDL_HapticEffectID] # index :: (SDL_HapticEffectID, SDL_HapticEffectID) -> SDL_HapticEffectID -> Int # unsafeIndex :: (SDL_HapticEffectID, SDL_HapticEffectID) -> SDL_HapticEffectID -> Int # inRange :: (SDL_HapticEffectID, SDL_HapticEffectID) -> SDL_HapticEffectID -> Bool # rangeSize :: (SDL_HapticEffectID, SDL_HapticEffectID) -> Int # unsafeRangeSize :: (SDL_HapticEffectID, SDL_HapticEffectID) -> Int # | |||||
| Num SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods (+) :: SDL_HapticEffectID -> SDL_HapticEffectID -> SDL_HapticEffectID # (-) :: SDL_HapticEffectID -> SDL_HapticEffectID -> SDL_HapticEffectID # (*) :: SDL_HapticEffectID -> SDL_HapticEffectID -> SDL_HapticEffectID # negate :: SDL_HapticEffectID -> SDL_HapticEffectID # abs :: SDL_HapticEffectID -> SDL_HapticEffectID # | |||||
| Read SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods readsPrec :: Int -> ReadS SDL_HapticEffectID # readList :: ReadS [SDL_HapticEffectID] # | |||||
| Integral SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods quot :: SDL_HapticEffectID -> SDL_HapticEffectID -> SDL_HapticEffectID # rem :: SDL_HapticEffectID -> SDL_HapticEffectID -> SDL_HapticEffectID # div :: SDL_HapticEffectID -> SDL_HapticEffectID -> SDL_HapticEffectID # mod :: SDL_HapticEffectID -> SDL_HapticEffectID -> SDL_HapticEffectID # quotRem :: SDL_HapticEffectID -> SDL_HapticEffectID -> (SDL_HapticEffectID, SDL_HapticEffectID) # divMod :: SDL_HapticEffectID -> SDL_HapticEffectID -> (SDL_HapticEffectID, SDL_HapticEffectID) # toInteger :: SDL_HapticEffectID -> Integer # | |||||
| Real SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods | |||||
| Show SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods showsPrec :: Int -> SDL_HapticEffectID -> ShowS # show :: SDL_HapticEffectID -> String # showList :: [SDL_HapticEffectID] -> ShowS # | |||||
| Eq SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods (==) :: SDL_HapticEffectID -> SDL_HapticEffectID -> Bool # (/=) :: SDL_HapticEffectID -> SDL_HapticEffectID -> Bool # | |||||
| Ord SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods compare :: SDL_HapticEffectID -> SDL_HapticEffectID -> Ordering # (<) :: SDL_HapticEffectID -> SDL_HapticEffectID -> Bool # (<=) :: SDL_HapticEffectID -> SDL_HapticEffectID -> Bool # (>) :: SDL_HapticEffectID -> SDL_HapticEffectID -> Bool # (>=) :: SDL_HapticEffectID -> SDL_HapticEffectID -> Bool # max :: SDL_HapticEffectID -> SDL_HapticEffectID -> SDL_HapticEffectID # min :: SDL_HapticEffectID -> SDL_HapticEffectID -> SDL_HapticEffectID # | |||||
| Prim SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods sizeOfType# :: Proxy SDL_HapticEffectID -> Int# # sizeOf# :: SDL_HapticEffectID -> Int# # alignmentOfType# :: Proxy SDL_HapticEffectID -> Int# # alignment# :: SDL_HapticEffectID -> Int# # indexByteArray# :: ByteArray# -> Int# -> SDL_HapticEffectID # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, SDL_HapticEffectID #) # writeByteArray# :: MutableByteArray# s -> Int# -> SDL_HapticEffectID -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> SDL_HapticEffectID -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> SDL_HapticEffectID # readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, SDL_HapticEffectID #) # writeOffAddr# :: Addr# -> Int# -> SDL_HapticEffectID -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> SDL_HapticEffectID -> State# s -> State# s # | |||||
| HasFFIType SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
Methods toFFIType :: SDL_HapticEffectID -> FFIType SDL_HapticEffectID # fromFFIType :: FFIType SDL_HapticEffectID -> SDL_HapticEffectID # | |||||
| ReadRaw SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods readRaw :: Ptr SDL_HapticEffectID -> IO SDL_HapticEffectID # | |||||
| StaticSize SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods staticSizeOf :: Proxy SDL_HapticEffectID -> Int # | |||||
| WriteRaw SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods writeRaw :: Ptr SDL_HapticEffectID -> SDL_HapticEffectID -> IO () # | |||||
| Bitfield SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods narrow :: SDL_HapticEffectID -> Int -> Word64 # extend :: Word64 -> Int -> SDL_HapticEffectID # | |||||
| HasCField SDL_HapticEffectID "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| ty ~ CInt => HasField "unwrap" SDL_HapticEffectID ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticEffectID -> (ty -> SDL_HapticEffectID, ty) # | |||||
| ty ~ CInt => HasField "unwrap" (Ptr SDL_HapticEffectID) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticEffectID -> Ptr ty # | |||||
| type Rep SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic type Rep SDL_HapticEffectID = D1 ('MetaData "SDL_HapticEffectID" "SDL3.Sys.Bindgen.Haptic" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_HapticEffectID" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CInt))) | |||||
| type FFIType SDL_HapticEffectID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticEffectID "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
data SDL_HapticDirection Source #
Structure that represents a haptic direction.
This is the direction where the force comes from, instead of the direction in which the force is exerted.
Directions can be specified by:
- SDL_HAPTIC_POLAR : Specified by polar coordinates.
- SDL_HAPTIC_CARTESIAN : Specified by cartesian coordinates.
- SDL_HAPTIC_SPHERICAL : Specified by spherical coordinates.
Cardinal directions of the haptic device are relative to the positioning of the device. North is considered to be away from the user.
The following diagram represents the cardinal directions:
.--.
|__| .-------.
|=.| |.-----.|
|--| || ||
| | |'-----'|
||~')___('
[ COMPUTER ]
North (0,-1)
^
|
|
(-1,0) West <----[ HAPTIC ]----> East (1,0)
|
|
v
South (0,1)
[ USER ]
\|||/
(o o)
---ooO-(_)-Ooo---
If type is SDL_HAPTIC_POLAR, direction is encoded by hundredths of a degree starting north and turning clockwise. SDL_HAPTIC_POLAR only uses the first dir parameter. The cardinal directions would be:
- North: 0 (0 degrees)
- East: 9000 (90 degrees)
- South: 18000 (180 degrees)
- West: 27000 (270 degrees)
If type is SDL_HAPTIC_CARTESIAN, direction is encoded by three positions (X axis, Y axis and Z axis (with 3 axes)). SDL_HAPTIC_CARTESIAN uses the first three dir parameters. The cardinal directions would be:
- North: 0,-1, 0
- East: 1, 0, 0
- South: 0, 1, 0
- West: -1, 0, 0
The Z axis represents the height of the effect if supported, otherwise it's unused. In cartesian encoding (1, 2) would be the same as (2, 4), you can use any multiple you want, only the direction matters.
If type is SDL_HAPTIC_SPHERICAL, direction is encoded by two rotations. The first two dir parameters are used. The dir parameters are as follows (all values are in hundredths of degrees):
- Degrees from (1, 0) rotated towards (0, 1).
- Degrees towards (0, 0, 1) (device needs at least 3 axes).
Example of force coming from the south with all encodings (force coming from the south means the user will have to pull the stick to counteract):
SDL_HapticDirection direction;
// Cartesian directions
direction.type = SDL_HAPTIC_CARTESIAN; // Using cartesian direction encoding.
direction.dir[0] = 0; // X position
direction.dir[1] = 1; // Y position
// Assuming the device has 2 axes, we don't need to specify third parameter.
// Polar directions
direction.type = SDL_HAPTIC_POLAR; // We'll be using polar direction encoding.
direction.dir[0] = 18000; // Polar only uses first parameter
// Spherical coordinates
direction.type = SDL_HAPTIC_SPHERICAL; // Spherical encoding
direction.dir[0] = 9000; // Since we only have two axes we don't need more parameters.
- See also
sDL_HAPTIC_POLAR,sDL_HAPTIC_CARTESIAN,sDL_HAPTIC_SPHERICAL,sDL_HAPTIC_STEERING_AXIS,SDL_HapticEffect,sDL_GetNumHapticAxes- C declaration
struct SDL_HapticDirection, defined atSDL3/SDL_haptic.h 566:16
Since: 3.2.0
Constructors
| SDL_HapticDirection | |
Fields
| |
Instances
| Storable SDL_HapticDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods sizeOf :: SDL_HapticDirection -> Int # alignment :: SDL_HapticDirection -> Int # peekElemOff :: Ptr SDL_HapticDirection -> Int -> IO SDL_HapticDirection # pokeElemOff :: Ptr SDL_HapticDirection -> Int -> SDL_HapticDirection -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_HapticDirection # pokeByteOff :: Ptr b -> Int -> SDL_HapticDirection -> IO () # peek :: Ptr SDL_HapticDirection -> IO SDL_HapticDirection # poke :: Ptr SDL_HapticDirection -> SDL_HapticDirection -> IO () # | |||||
| Generic SDL_HapticDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
Methods from :: SDL_HapticDirection -> Rep SDL_HapticDirection x # to :: Rep SDL_HapticDirection x -> SDL_HapticDirection # | |||||
| Show SDL_HapticDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods showsPrec :: Int -> SDL_HapticDirection -> ShowS # show :: SDL_HapticDirection -> String # showList :: [SDL_HapticDirection] -> ShowS # | |||||
| Eq SDL_HapticDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods (==) :: SDL_HapticDirection -> SDL_HapticDirection -> Bool # (/=) :: SDL_HapticDirection -> SDL_HapticDirection -> Bool # | |||||
| ReadRaw SDL_HapticDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods readRaw :: Ptr SDL_HapticDirection -> IO SDL_HapticDirection # | |||||
| StaticSize SDL_HapticDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods staticSizeOf :: Proxy SDL_HapticDirection -> Int # | |||||
| WriteRaw SDL_HapticDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods writeRaw :: Ptr SDL_HapticDirection -> SDL_HapticDirection -> IO () # | |||||
| IsStruct SDL_HapticDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods | |||||
| HasCField SDL_HapticDirection "dir" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticDirection "type'" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| ty ~ ConstantArray 3 Sint32 => HasField "dir" SDL_HapticDirection ty Source # | The encoded direction.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticDirection -> (ty -> SDL_HapticDirection, ty) # | |||||
| ty ~ SDL_HapticDirectionType => HasField "type'" SDL_HapticDirection ty Source # | The type of encoding.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticDirection -> (ty -> SDL_HapticDirection, ty) # | |||||
| ty ~ ConstantArray 3 Sint32 => HasField "dir" (Ptr SDL_HapticDirection) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticDirection -> Ptr ty # | |||||
| ty ~ SDL_HapticDirectionType => HasField "type'" (Ptr SDL_HapticDirection) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticDirection -> Ptr ty # | |||||
| type Rep SDL_HapticDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic type Rep SDL_HapticDirection = D1 ('MetaData "SDL_HapticDirection" "SDL3.Sys.Bindgen.Haptic" "sdl3-bindgen-sys-0.0.1.0-inplace" 'False) (C1 ('MetaCons "SDL_HapticDirection" 'PrefixI 'True) (S1 ('MetaSel ('Just "type'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SDL_HapticDirectionType) :*: S1 ('MetaSel ('Just "dir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (ConstantArray 3 Sint32)))) | |||||
| type CFieldType SDL_HapticDirection "dir" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticDirection "type'" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
data SDL_HapticConstant Source #
A structure containing a template for a Constant effect.
This struct is exclusively for the SDL_HAPTIC_CONSTANT effect.
A constant effect applies a constant force in the specified direction to the joystick.
- See also
sDL_HAPTIC_CONSTANT,SDL_HapticEffect- C declaration
struct SDL_HapticConstant, defined atSDL3/SDL_haptic.h 586:16
Since: 3.2.0
Constructors
| SDL_HapticConstant | |
Fields
| |
Instances
| Storable SDL_HapticConstant Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods sizeOf :: SDL_HapticConstant -> Int # alignment :: SDL_HapticConstant -> Int # peekElemOff :: Ptr SDL_HapticConstant -> Int -> IO SDL_HapticConstant # pokeElemOff :: Ptr SDL_HapticConstant -> Int -> SDL_HapticConstant -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_HapticConstant # pokeByteOff :: Ptr b -> Int -> SDL_HapticConstant -> IO () # peek :: Ptr SDL_HapticConstant -> IO SDL_HapticConstant # poke :: Ptr SDL_HapticConstant -> SDL_HapticConstant -> IO () # | |||||
| Generic SDL_HapticConstant Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
Methods from :: SDL_HapticConstant -> Rep SDL_HapticConstant x # to :: Rep SDL_HapticConstant x -> SDL_HapticConstant # | |||||
| Show SDL_HapticConstant Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods showsPrec :: Int -> SDL_HapticConstant -> ShowS # show :: SDL_HapticConstant -> String # showList :: [SDL_HapticConstant] -> ShowS # | |||||
| Eq SDL_HapticConstant Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods (==) :: SDL_HapticConstant -> SDL_HapticConstant -> Bool # (/=) :: SDL_HapticConstant -> SDL_HapticConstant -> Bool # | |||||
| ReadRaw SDL_HapticConstant Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods readRaw :: Ptr SDL_HapticConstant -> IO SDL_HapticConstant # | |||||
| StaticSize SDL_HapticConstant Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods staticSizeOf :: Proxy SDL_HapticConstant -> Int # | |||||
| WriteRaw SDL_HapticConstant Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods writeRaw :: Ptr SDL_HapticConstant -> SDL_HapticConstant -> IO () # | |||||
| IsStruct SDL_HapticConstant Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods | |||||
| HasCField SDL_HapticConstant "attack_length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticConstant "attack_level" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticConstant "button" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticConstant "delay" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticConstant "direction" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticConstant "fade_length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticConstant "fade_level" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticConstant "interval" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticConstant "length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticConstant "level" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticConstant "type'" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| ty ~ Uint16 => HasField "attack_length" SDL_HapticConstant ty Source # | Duration of the attack.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticConstant -> (ty -> SDL_HapticConstant, ty) # | |||||
| ty ~ Uint16 => HasField "attack_level" SDL_HapticConstant ty Source # | Level at the start of the attack.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticConstant -> (ty -> SDL_HapticConstant, ty) # | |||||
| ty ~ Uint16 => HasField "button" SDL_HapticConstant ty Source # | Button that triggers the effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticConstant -> (ty -> SDL_HapticConstant, ty) # | |||||
| ty ~ Uint16 => HasField "delay" SDL_HapticConstant ty Source # | Delay before starting the effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticConstant -> (ty -> SDL_HapticConstant, ty) # | |||||
| ty ~ SDL_HapticDirection => HasField "direction" SDL_HapticConstant ty Source # | Direction of the effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticConstant -> (ty -> SDL_HapticConstant, ty) # | |||||
| ty ~ Uint16 => HasField "fade_length" SDL_HapticConstant ty Source # | Duration of the fade.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticConstant -> (ty -> SDL_HapticConstant, ty) # | |||||
| ty ~ Uint16 => HasField "fade_level" SDL_HapticConstant ty Source # | Level at the end of the fade.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticConstant -> (ty -> SDL_HapticConstant, ty) # | |||||
| ty ~ Uint16 => HasField "interval" SDL_HapticConstant ty Source # | How soon it can be triggered again after button.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticConstant -> (ty -> SDL_HapticConstant, ty) # | |||||
| ty ~ Uint32 => HasField "length" SDL_HapticConstant ty Source # | Duration of the effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticConstant -> (ty -> SDL_HapticConstant, ty) # | |||||
| ty ~ Sint16 => HasField "level" SDL_HapticConstant ty Source # | Strength of the constant effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticConstant -> (ty -> SDL_HapticConstant, ty) # | |||||
| ty ~ SDL_HapticEffectType => HasField "type'" SDL_HapticConstant ty Source # | SDL_HAPTIC_CONSTANT
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticConstant -> (ty -> SDL_HapticConstant, ty) # | |||||
| ty ~ Uint16 => HasField "attack_length" (Ptr SDL_HapticConstant) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticConstant -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "attack_level" (Ptr SDL_HapticConstant) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticConstant -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "button" (Ptr SDL_HapticConstant) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticConstant -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "delay" (Ptr SDL_HapticConstant) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticConstant -> Ptr ty # | |||||
| ty ~ SDL_HapticDirection => HasField "direction" (Ptr SDL_HapticConstant) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticConstant -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "fade_length" (Ptr SDL_HapticConstant) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticConstant -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "fade_level" (Ptr SDL_HapticConstant) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticConstant -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "interval" (Ptr SDL_HapticConstant) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticConstant -> Ptr ty # | |||||
| ty ~ Uint32 => HasField "length" (Ptr SDL_HapticConstant) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticConstant -> Ptr ty # | |||||
| ty ~ Sint16 => HasField "level" (Ptr SDL_HapticConstant) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticConstant -> Ptr ty # | |||||
| ty ~ SDL_HapticEffectType => HasField "type'" (Ptr SDL_HapticConstant) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticConstant -> Ptr ty # | |||||
| type Rep SDL_HapticConstant Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic type Rep SDL_HapticConstant = D1 ('MetaData "SDL_HapticConstant" "SDL3.Sys.Bindgen.Haptic" "sdl3-bindgen-sys-0.0.1.0-inplace" 'False) (C1 ('MetaCons "SDL_HapticConstant" 'PrefixI 'True) (((S1 ('MetaSel ('Just "type'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SDL_HapticEffectType) :*: S1 ('MetaSel ('Just "direction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SDL_HapticDirection)) :*: (S1 ('MetaSel ('Just "length") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint32) :*: (S1 ('MetaSel ('Just "delay") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16) :*: S1 ('MetaSel ('Just "button") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16)))) :*: ((S1 ('MetaSel ('Just "interval") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16) :*: (S1 ('MetaSel ('Just "level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Sint16) :*: S1 ('MetaSel ('Just "attack_length") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16))) :*: (S1 ('MetaSel ('Just "attack_level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16) :*: (S1 ('MetaSel ('Just "fade_length") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16) :*: S1 ('MetaSel ('Just "fade_level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16)))))) | |||||
| type CFieldType SDL_HapticConstant "attack_length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticConstant "attack_level" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticConstant "button" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticConstant "delay" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticConstant "direction" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticConstant "fade_length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticConstant "fade_level" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticConstant "interval" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticConstant "length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticConstant "level" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticConstant "type'" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
data SDL_HapticPeriodic Source #
A structure containing a template for a Periodic effect.
The struct handles the following effects:
- SDL_HAPTIC_SINE
- SDL_HAPTIC_SQUARE
- SDL_HAPTIC_TRIANGLE
- SDL_HAPTIC_SAWTOOTHUP
- SDL_HAPTIC_SAWTOOTHDOWN
A periodic effect consists in a wave-shaped effect that repeats itself over time. The type determines the shape of the wave and the parameters determine the dimensions of the wave.
Phase is given by hundredth of a degree meaning that giving the phase a value of 9000 will displace it 25% of its period. Here are sample values:
- 0: No phase displacement.
- 9000: Displaced 25% of its period.
- 18000: Displaced 50% of its period.
- 27000: Displaced 75% of its period.
- 36000: Displaced 100% of its period, same as 0, but 0 is preferred.
Examples:
SDL_HAPTIC_SINE
/ \ / \ / \ /
/ \/ \/ \__/
SDL_HAPTIC_SQUARE
__
| | | | | | | | | |
| || || || || |
SDL_HAPTIC_TRIANGLE
/\ /\ /\ /\ /\
/ \ / \ / \ / \ /
/ \/ \/ \/ \/
SDL_HAPTIC_SAWTOOTHUP
/| /| /| /| /| /| /|
/ | / | / | / | / | / | / |
/ |/ |/ |/ |/ |/ |/ |
SDL_HAPTIC_SAWTOOTHDOWN
\ |\ |\ |\ |\ |\ |\ |
\ | \ | \ | \ | \ | \ | \ |
\| \| \| \| \| \| \|
- See also
sDL_HAPTIC_SINE,sDL_HAPTIC_SQUARE,sDL_HAPTIC_TRIANGLE,sDL_HAPTIC_SAWTOOTHUP,sDL_HAPTIC_SAWTOOTHDOWN,SDL_HapticEffect- C declaration
struct SDL_HapticPeriodic, defined atSDL3/SDL_haptic.h 672:16
Since: 3.2.0
Constructors
| SDL_HapticPeriodic | |
Fields
| |
Instances
| Storable SDL_HapticPeriodic Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods sizeOf :: SDL_HapticPeriodic -> Int # alignment :: SDL_HapticPeriodic -> Int # peekElemOff :: Ptr SDL_HapticPeriodic -> Int -> IO SDL_HapticPeriodic # pokeElemOff :: Ptr SDL_HapticPeriodic -> Int -> SDL_HapticPeriodic -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_HapticPeriodic # pokeByteOff :: Ptr b -> Int -> SDL_HapticPeriodic -> IO () # peek :: Ptr SDL_HapticPeriodic -> IO SDL_HapticPeriodic # poke :: Ptr SDL_HapticPeriodic -> SDL_HapticPeriodic -> IO () # | |||||
| Generic SDL_HapticPeriodic Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
Methods from :: SDL_HapticPeriodic -> Rep SDL_HapticPeriodic x # to :: Rep SDL_HapticPeriodic x -> SDL_HapticPeriodic # | |||||
| Show SDL_HapticPeriodic Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods showsPrec :: Int -> SDL_HapticPeriodic -> ShowS # show :: SDL_HapticPeriodic -> String # showList :: [SDL_HapticPeriodic] -> ShowS # | |||||
| Eq SDL_HapticPeriodic Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods (==) :: SDL_HapticPeriodic -> SDL_HapticPeriodic -> Bool # (/=) :: SDL_HapticPeriodic -> SDL_HapticPeriodic -> Bool # | |||||
| ReadRaw SDL_HapticPeriodic Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods readRaw :: Ptr SDL_HapticPeriodic -> IO SDL_HapticPeriodic # | |||||
| StaticSize SDL_HapticPeriodic Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods staticSizeOf :: Proxy SDL_HapticPeriodic -> Int # | |||||
| WriteRaw SDL_HapticPeriodic Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods writeRaw :: Ptr SDL_HapticPeriodic -> SDL_HapticPeriodic -> IO () # | |||||
| IsStruct SDL_HapticPeriodic Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods | |||||
| HasCField SDL_HapticPeriodic "attack_length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticPeriodic "attack_level" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticPeriodic "button" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticPeriodic "delay" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticPeriodic "direction" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticPeriodic "fade_length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticPeriodic "fade_level" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticPeriodic "interval" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticPeriodic "length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticPeriodic "magnitude" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticPeriodic "offset" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticPeriodic "period" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticPeriodic "phase" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticPeriodic "type'" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| ty ~ Uint16 => HasField "attack_length" SDL_HapticPeriodic ty Source # | Duration of the attack.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticPeriodic -> (ty -> SDL_HapticPeriodic, ty) # | |||||
| ty ~ Uint16 => HasField "attack_level" SDL_HapticPeriodic ty Source # | Level at the start of the attack.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticPeriodic -> (ty -> SDL_HapticPeriodic, ty) # | |||||
| ty ~ Uint16 => HasField "button" SDL_HapticPeriodic ty Source # | Button that triggers the effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticPeriodic -> (ty -> SDL_HapticPeriodic, ty) # | |||||
| ty ~ Uint16 => HasField "delay" SDL_HapticPeriodic ty Source # | Delay before starting the effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticPeriodic -> (ty -> SDL_HapticPeriodic, ty) # | |||||
| ty ~ SDL_HapticDirection => HasField "direction" SDL_HapticPeriodic ty Source # | Direction of the effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticPeriodic -> (ty -> SDL_HapticPeriodic, ty) # | |||||
| ty ~ Uint16 => HasField "fade_length" SDL_HapticPeriodic ty Source # | Duration of the fade.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticPeriodic -> (ty -> SDL_HapticPeriodic, ty) # | |||||
| ty ~ Uint16 => HasField "fade_level" SDL_HapticPeriodic ty Source # | Level at the end of the fade.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticPeriodic -> (ty -> SDL_HapticPeriodic, ty) # | |||||
| ty ~ Uint16 => HasField "interval" SDL_HapticPeriodic ty Source # | How soon it can be triggered again after button.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticPeriodic -> (ty -> SDL_HapticPeriodic, ty) # | |||||
| ty ~ Uint32 => HasField "length" SDL_HapticPeriodic ty Source # | Duration of the effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticPeriodic -> (ty -> SDL_HapticPeriodic, ty) # | |||||
| ty ~ Sint16 => HasField "magnitude" SDL_HapticPeriodic ty Source # | Peak value; if negative, equivalent to 180 degrees extra phase shift.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticPeriodic -> (ty -> SDL_HapticPeriodic, ty) # | |||||
| ty ~ Sint16 => HasField "offset" SDL_HapticPeriodic ty Source # | Mean value of the wave.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticPeriodic -> (ty -> SDL_HapticPeriodic, ty) # | |||||
| ty ~ Uint16 => HasField "period" SDL_HapticPeriodic ty Source # | Period of the wave.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticPeriodic -> (ty -> SDL_HapticPeriodic, ty) # | |||||
| ty ~ Uint16 => HasField "phase" SDL_HapticPeriodic ty Source # | Positive phase shift given by hundredth of a degree.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticPeriodic -> (ty -> SDL_HapticPeriodic, ty) # | |||||
| ty ~ SDL_HapticEffectType => HasField "type'" SDL_HapticPeriodic ty Source # | SDL_HAPTIC_SINE, SDL_HAPTIC_SQUARE SDL_HAPTIC_TRIANGLE, SDL_HAPTIC_SAWTOOTHUP or SDL_HAPTIC_SAWTOOTHDOWN
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticPeriodic -> (ty -> SDL_HapticPeriodic, ty) # | |||||
| ty ~ Uint16 => HasField "attack_length" (Ptr SDL_HapticPeriodic) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticPeriodic -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "attack_level" (Ptr SDL_HapticPeriodic) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticPeriodic -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "button" (Ptr SDL_HapticPeriodic) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticPeriodic -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "delay" (Ptr SDL_HapticPeriodic) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticPeriodic -> Ptr ty # | |||||
| ty ~ SDL_HapticDirection => HasField "direction" (Ptr SDL_HapticPeriodic) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticPeriodic -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "fade_length" (Ptr SDL_HapticPeriodic) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticPeriodic -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "fade_level" (Ptr SDL_HapticPeriodic) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticPeriodic -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "interval" (Ptr SDL_HapticPeriodic) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticPeriodic -> Ptr ty # | |||||
| ty ~ Uint32 => HasField "length" (Ptr SDL_HapticPeriodic) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticPeriodic -> Ptr ty # | |||||
| ty ~ Sint16 => HasField "magnitude" (Ptr SDL_HapticPeriodic) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticPeriodic -> Ptr ty # | |||||
| ty ~ Sint16 => HasField "offset" (Ptr SDL_HapticPeriodic) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticPeriodic -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "period" (Ptr SDL_HapticPeriodic) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticPeriodic -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "phase" (Ptr SDL_HapticPeriodic) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticPeriodic -> Ptr ty # | |||||
| ty ~ SDL_HapticEffectType => HasField "type'" (Ptr SDL_HapticPeriodic) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticPeriodic -> Ptr ty # | |||||
| type Rep SDL_HapticPeriodic Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic type Rep SDL_HapticPeriodic = D1 ('MetaData "SDL_HapticPeriodic" "SDL3.Sys.Bindgen.Haptic" "sdl3-bindgen-sys-0.0.1.0-inplace" 'False) (C1 ('MetaCons "SDL_HapticPeriodic" 'PrefixI 'True) (((S1 ('MetaSel ('Just "type'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SDL_HapticEffectType) :*: (S1 ('MetaSel ('Just "direction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SDL_HapticDirection) :*: S1 ('MetaSel ('Just "length") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint32))) :*: ((S1 ('MetaSel ('Just "delay") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16) :*: S1 ('MetaSel ('Just "button") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16)) :*: (S1 ('MetaSel ('Just "interval") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16) :*: S1 ('MetaSel ('Just "period") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16)))) :*: ((S1 ('MetaSel ('Just "magnitude") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Sint16) :*: (S1 ('MetaSel ('Just "offset") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Sint16) :*: S1 ('MetaSel ('Just "phase") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16))) :*: ((S1 ('MetaSel ('Just "attack_length") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16) :*: S1 ('MetaSel ('Just "attack_level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16)) :*: (S1 ('MetaSel ('Just "fade_length") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16) :*: S1 ('MetaSel ('Just "fade_level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16)))))) | |||||
| type CFieldType SDL_HapticPeriodic "attack_length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticPeriodic "attack_level" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticPeriodic "button" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticPeriodic "delay" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticPeriodic "direction" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticPeriodic "fade_length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticPeriodic "fade_level" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticPeriodic "interval" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticPeriodic "length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticPeriodic "magnitude" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticPeriodic "offset" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticPeriodic "period" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticPeriodic "phase" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticPeriodic "type'" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
data SDL_HapticCondition Source #
A structure containing a template for a Condition effect.
The struct handles the following effects:
- SDL_HAPTIC_SPRING: Effect based on axes position.
- SDL_HAPTIC_DAMPER: Effect based on axes velocity.
- SDL_HAPTIC_INERTIA: Effect based on axes acceleration.
- SDL_HAPTIC_FRICTION: Effect based on axes movement.
Direction is handled by condition internals instead of a direction member. The condition effect specific members have three parameters. The first refers to the X axis, the second refers to the Y axis and the third refers to the Z axis. The right terms refer to the positive side of the axis and the left terms refer to the negative side of the axis. Please refer to the SDL_HapticDirection diagram for which side is positive and which is negative.
- See also
SDL_HapticDirection,sDL_HAPTIC_SPRING,sDL_HAPTIC_DAMPER,sDL_HAPTIC_INERTIA,sDL_HAPTIC_FRICTION,SDL_HapticEffect- C declaration
struct SDL_HapticCondition, defined atSDL3/SDL_haptic.h 728:16
Since: 3.2.0
Constructors
| SDL_HapticCondition | |
Fields
| |
Instances
| Storable SDL_HapticCondition Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods sizeOf :: SDL_HapticCondition -> Int # alignment :: SDL_HapticCondition -> Int # peekElemOff :: Ptr SDL_HapticCondition -> Int -> IO SDL_HapticCondition # pokeElemOff :: Ptr SDL_HapticCondition -> Int -> SDL_HapticCondition -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_HapticCondition # pokeByteOff :: Ptr b -> Int -> SDL_HapticCondition -> IO () # peek :: Ptr SDL_HapticCondition -> IO SDL_HapticCondition # poke :: Ptr SDL_HapticCondition -> SDL_HapticCondition -> IO () # | |||||
| Generic SDL_HapticCondition Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
Methods from :: SDL_HapticCondition -> Rep SDL_HapticCondition x # to :: Rep SDL_HapticCondition x -> SDL_HapticCondition # | |||||
| Show SDL_HapticCondition Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods showsPrec :: Int -> SDL_HapticCondition -> ShowS # show :: SDL_HapticCondition -> String # showList :: [SDL_HapticCondition] -> ShowS # | |||||
| Eq SDL_HapticCondition Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods (==) :: SDL_HapticCondition -> SDL_HapticCondition -> Bool # (/=) :: SDL_HapticCondition -> SDL_HapticCondition -> Bool # | |||||
| ReadRaw SDL_HapticCondition Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods readRaw :: Ptr SDL_HapticCondition -> IO SDL_HapticCondition # | |||||
| StaticSize SDL_HapticCondition Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods staticSizeOf :: Proxy SDL_HapticCondition -> Int # | |||||
| WriteRaw SDL_HapticCondition Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods writeRaw :: Ptr SDL_HapticCondition -> SDL_HapticCondition -> IO () # | |||||
| IsStruct SDL_HapticCondition Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods | |||||
| HasCField SDL_HapticCondition "button" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCondition "center" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCondition "deadband" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCondition "delay" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCondition "direction" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCondition "interval" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCondition "left_coeff" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCondition "left_sat" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCondition "length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCondition "right_coeff" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCondition "right_sat" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCondition "type'" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| ty ~ Uint16 => HasField "button" SDL_HapticCondition ty Source # | Button that triggers the effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCondition -> (ty -> SDL_HapticCondition, ty) # | |||||
| ty ~ ConstantArray 3 Sint16 => HasField "center" SDL_HapticCondition ty Source # | Position of the dead zone.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCondition -> (ty -> SDL_HapticCondition, ty) # | |||||
| ty ~ ConstantArray 3 Uint16 => HasField "deadband" SDL_HapticCondition ty Source # | Size of the dead zone; max 0xFFFF: whole axis-range when 0-centered.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCondition -> (ty -> SDL_HapticCondition, ty) # | |||||
| ty ~ Uint16 => HasField "delay" SDL_HapticCondition ty Source # | Delay before starting the effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCondition -> (ty -> SDL_HapticCondition, ty) # | |||||
| ty ~ SDL_HapticDirection => HasField "direction" SDL_HapticCondition ty Source # | Direction of the effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCondition -> (ty -> SDL_HapticCondition, ty) # | |||||
| ty ~ Uint16 => HasField "interval" SDL_HapticCondition ty Source # | How soon it can be triggered again after button.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCondition -> (ty -> SDL_HapticCondition, ty) # | |||||
| ty ~ ConstantArray 3 Sint16 => HasField "left_coeff" SDL_HapticCondition ty Source # | How fast to increase the force towards the negative side.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCondition -> (ty -> SDL_HapticCondition, ty) # | |||||
| ty ~ ConstantArray 3 Uint16 => HasField "left_sat" SDL_HapticCondition ty Source # | Level when joystick is to the negative side; max 0xFFFF.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCondition -> (ty -> SDL_HapticCondition, ty) # | |||||
| ty ~ Uint32 => HasField "length" SDL_HapticCondition ty Source # | Duration of the effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCondition -> (ty -> SDL_HapticCondition, ty) # | |||||
| ty ~ ConstantArray 3 Sint16 => HasField "right_coeff" SDL_HapticCondition ty Source # | How fast to increase the force towards the positive side.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCondition -> (ty -> SDL_HapticCondition, ty) # | |||||
| ty ~ ConstantArray 3 Uint16 => HasField "right_sat" SDL_HapticCondition ty Source # | Level when joystick is to the positive side; max 0xFFFF.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCondition -> (ty -> SDL_HapticCondition, ty) # | |||||
| ty ~ SDL_HapticEffectType => HasField "type'" SDL_HapticCondition ty Source # | SDL_HAPTIC_SPRING, SDL_HAPTIC_DAMPER, SDL_HAPTIC_INERTIA or SDL_HAPTIC_FRICTION
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCondition -> (ty -> SDL_HapticCondition, ty) # | |||||
| ty ~ Uint16 => HasField "button" (Ptr SDL_HapticCondition) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCondition -> Ptr ty # | |||||
| ty ~ ConstantArray 3 Sint16 => HasField "center" (Ptr SDL_HapticCondition) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCondition -> Ptr ty # | |||||
| ty ~ ConstantArray 3 Uint16 => HasField "deadband" (Ptr SDL_HapticCondition) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCondition -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "delay" (Ptr SDL_HapticCondition) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCondition -> Ptr ty # | |||||
| ty ~ SDL_HapticDirection => HasField "direction" (Ptr SDL_HapticCondition) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCondition -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "interval" (Ptr SDL_HapticCondition) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCondition -> Ptr ty # | |||||
| ty ~ ConstantArray 3 Sint16 => HasField "left_coeff" (Ptr SDL_HapticCondition) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCondition -> Ptr ty # | |||||
| ty ~ ConstantArray 3 Uint16 => HasField "left_sat" (Ptr SDL_HapticCondition) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCondition -> Ptr ty # | |||||
| ty ~ Uint32 => HasField "length" (Ptr SDL_HapticCondition) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCondition -> Ptr ty # | |||||
| ty ~ ConstantArray 3 Sint16 => HasField "right_coeff" (Ptr SDL_HapticCondition) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCondition -> Ptr ty # | |||||
| ty ~ ConstantArray 3 Uint16 => HasField "right_sat" (Ptr SDL_HapticCondition) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCondition -> Ptr ty # | |||||
| ty ~ SDL_HapticEffectType => HasField "type'" (Ptr SDL_HapticCondition) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCondition -> Ptr ty # | |||||
| type Rep SDL_HapticCondition Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic type Rep SDL_HapticCondition = D1 ('MetaData "SDL_HapticCondition" "SDL3.Sys.Bindgen.Haptic" "sdl3-bindgen-sys-0.0.1.0-inplace" 'False) (C1 ('MetaCons "SDL_HapticCondition" 'PrefixI 'True) (((S1 ('MetaSel ('Just "type'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SDL_HapticEffectType) :*: (S1 ('MetaSel ('Just "direction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SDL_HapticDirection) :*: S1 ('MetaSel ('Just "length") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint32))) :*: (S1 ('MetaSel ('Just "delay") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16) :*: (S1 ('MetaSel ('Just "button") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16) :*: S1 ('MetaSel ('Just "interval") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16)))) :*: ((S1 ('MetaSel ('Just "right_sat") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (ConstantArray 3 Uint16)) :*: (S1 ('MetaSel ('Just "left_sat") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (ConstantArray 3 Uint16)) :*: S1 ('MetaSel ('Just "right_coeff") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (ConstantArray 3 Sint16)))) :*: (S1 ('MetaSel ('Just "left_coeff") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (ConstantArray 3 Sint16)) :*: (S1 ('MetaSel ('Just "deadband") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (ConstantArray 3 Uint16)) :*: S1 ('MetaSel ('Just "center") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (ConstantArray 3 Sint16))))))) | |||||
| type CFieldType SDL_HapticCondition "button" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCondition "center" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCondition "deadband" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCondition "delay" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCondition "direction" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCondition "interval" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCondition "left_coeff" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCondition "left_sat" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCondition "length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCondition "right_coeff" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCondition "right_sat" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCondition "type'" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
data SDL_HapticRamp Source #
A structure containing a template for a Ramp effect.
This struct is exclusively for the SDL_HAPTIC_RAMP effect.
The ramp effect starts at start strength and ends at end strength. It augments in linear fashion. If you use attack and fade with a ramp the effects get added to the ramp effect making the effect become quadratic instead of linear.
- See also
sDL_HAPTIC_RAMP,SDL_HapticEffect- C declaration
struct SDL_HapticRamp, defined atSDL3/SDL_haptic.h 767:16
Since: 3.2.0
Constructors
| SDL_HapticRamp | |
Fields
| |
Instances
| Storable SDL_HapticRamp Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods sizeOf :: SDL_HapticRamp -> Int # alignment :: SDL_HapticRamp -> Int # peekElemOff :: Ptr SDL_HapticRamp -> Int -> IO SDL_HapticRamp # pokeElemOff :: Ptr SDL_HapticRamp -> Int -> SDL_HapticRamp -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_HapticRamp # pokeByteOff :: Ptr b -> Int -> SDL_HapticRamp -> IO () # peek :: Ptr SDL_HapticRamp -> IO SDL_HapticRamp # poke :: Ptr SDL_HapticRamp -> SDL_HapticRamp -> IO () # | |||||
| Generic SDL_HapticRamp Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
Methods from :: SDL_HapticRamp -> Rep SDL_HapticRamp x # to :: Rep SDL_HapticRamp x -> SDL_HapticRamp # | |||||
| Show SDL_HapticRamp Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods showsPrec :: Int -> SDL_HapticRamp -> ShowS # show :: SDL_HapticRamp -> String # showList :: [SDL_HapticRamp] -> ShowS # | |||||
| Eq SDL_HapticRamp Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods (==) :: SDL_HapticRamp -> SDL_HapticRamp -> Bool # (/=) :: SDL_HapticRamp -> SDL_HapticRamp -> Bool # | |||||
| ReadRaw SDL_HapticRamp Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods readRaw :: Ptr SDL_HapticRamp -> IO SDL_HapticRamp # | |||||
| StaticSize SDL_HapticRamp Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods staticSizeOf :: Proxy SDL_HapticRamp -> Int # staticAlignment :: Proxy SDL_HapticRamp -> Int # | |||||
| WriteRaw SDL_HapticRamp Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods writeRaw :: Ptr SDL_HapticRamp -> SDL_HapticRamp -> IO () # | |||||
| IsStruct SDL_HapticRamp Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods zero :: SDL_HapticRamp # | |||||
| HasCField SDL_HapticRamp "attack_length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticRamp "attack_level" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticRamp "button" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticRamp "delay" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticRamp "direction" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticRamp "end" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticRamp "fade_length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticRamp "fade_level" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticRamp "interval" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticRamp "length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticRamp "start" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticRamp "type'" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| ty ~ Uint16 => HasField "attack_length" SDL_HapticRamp ty Source # | Duration of the attack.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticRamp -> (ty -> SDL_HapticRamp, ty) # | |||||
| ty ~ Uint16 => HasField "attack_level" SDL_HapticRamp ty Source # | Level at the start of the attack.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticRamp -> (ty -> SDL_HapticRamp, ty) # | |||||
| ty ~ Uint16 => HasField "button" SDL_HapticRamp ty Source # | Button that triggers the effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticRamp -> (ty -> SDL_HapticRamp, ty) # | |||||
| ty ~ Uint16 => HasField "delay" SDL_HapticRamp ty Source # | Delay before starting the effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticRamp -> (ty -> SDL_HapticRamp, ty) # | |||||
| ty ~ SDL_HapticDirection => HasField "direction" SDL_HapticRamp ty Source # | Direction of the effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticRamp -> (ty -> SDL_HapticRamp, ty) # | |||||
| ty ~ Sint16 => HasField "end" SDL_HapticRamp ty Source # | Ending strength level.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticRamp -> (ty -> SDL_HapticRamp, ty) # | |||||
| ty ~ Uint16 => HasField "fade_length" SDL_HapticRamp ty Source # | Duration of the fade.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticRamp -> (ty -> SDL_HapticRamp, ty) # | |||||
| ty ~ Uint16 => HasField "fade_level" SDL_HapticRamp ty Source # | Level at the end of the fade.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticRamp -> (ty -> SDL_HapticRamp, ty) # | |||||
| ty ~ Uint16 => HasField "interval" SDL_HapticRamp ty Source # | How soon it can be triggered again after button.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticRamp -> (ty -> SDL_HapticRamp, ty) # | |||||
| ty ~ Uint32 => HasField "length" SDL_HapticRamp ty Source # | Duration of the effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticRamp -> (ty -> SDL_HapticRamp, ty) # | |||||
| ty ~ Sint16 => HasField "start" SDL_HapticRamp ty Source # | Beginning strength level.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticRamp -> (ty -> SDL_HapticRamp, ty) # | |||||
| ty ~ SDL_HapticEffectType => HasField "type'" SDL_HapticRamp ty Source # | SDL_HAPTIC_RAMP
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticRamp -> (ty -> SDL_HapticRamp, ty) # | |||||
| ty ~ Uint16 => HasField "attack_length" (Ptr SDL_HapticRamp) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticRamp -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "attack_level" (Ptr SDL_HapticRamp) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticRamp -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "button" (Ptr SDL_HapticRamp) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticRamp -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "delay" (Ptr SDL_HapticRamp) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticRamp -> Ptr ty # | |||||
| ty ~ SDL_HapticDirection => HasField "direction" (Ptr SDL_HapticRamp) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticRamp -> Ptr ty # | |||||
| ty ~ Sint16 => HasField "end" (Ptr SDL_HapticRamp) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticRamp -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "fade_length" (Ptr SDL_HapticRamp) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticRamp -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "fade_level" (Ptr SDL_HapticRamp) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticRamp -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "interval" (Ptr SDL_HapticRamp) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticRamp -> Ptr ty # | |||||
| ty ~ Uint32 => HasField "length" (Ptr SDL_HapticRamp) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticRamp -> Ptr ty # | |||||
| ty ~ Sint16 => HasField "start" (Ptr SDL_HapticRamp) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticRamp -> Ptr ty # | |||||
| ty ~ SDL_HapticEffectType => HasField "type'" (Ptr SDL_HapticRamp) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticRamp -> Ptr ty # | |||||
| type Rep SDL_HapticRamp Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic type Rep SDL_HapticRamp = D1 ('MetaData "SDL_HapticRamp" "SDL3.Sys.Bindgen.Haptic" "sdl3-bindgen-sys-0.0.1.0-inplace" 'False) (C1 ('MetaCons "SDL_HapticRamp" 'PrefixI 'True) (((S1 ('MetaSel ('Just "type'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SDL_HapticEffectType) :*: (S1 ('MetaSel ('Just "direction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SDL_HapticDirection) :*: S1 ('MetaSel ('Just "length") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint32))) :*: (S1 ('MetaSel ('Just "delay") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16) :*: (S1 ('MetaSel ('Just "button") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16) :*: S1 ('MetaSel ('Just "interval") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16)))) :*: ((S1 ('MetaSel ('Just "start") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Sint16) :*: (S1 ('MetaSel ('Just "end") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Sint16) :*: S1 ('MetaSel ('Just "attack_length") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16))) :*: (S1 ('MetaSel ('Just "attack_level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16) :*: (S1 ('MetaSel ('Just "fade_length") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16) :*: S1 ('MetaSel ('Just "fade_level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16)))))) | |||||
| type CFieldType SDL_HapticRamp "attack_length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticRamp "attack_level" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticRamp "button" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticRamp "delay" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticRamp "direction" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticRamp "end" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticRamp "fade_length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticRamp "fade_level" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticRamp "interval" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticRamp "length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticRamp "start" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticRamp "type'" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
data SDL_HapticLeftRight Source #
A structure containing a template for a Left/Right effect.
This struct is exclusively for the SDL_HAPTIC_LEFTRIGHT effect.
The Left/Right effect is used to explicitly control the large and small motors, commonly found in modern game controllers. The small (right) motor is high frequency, and the large (left) motor is low frequency.
- See also
sDL_HAPTIC_LEFTRIGHT,SDL_HapticEffect- C declaration
struct SDL_HapticLeftRight, defined atSDL3/SDL_haptic.h 806:16
Since: 3.2.0
Constructors
| SDL_HapticLeftRight | |
Fields
| |
Instances
| Storable SDL_HapticLeftRight Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods sizeOf :: SDL_HapticLeftRight -> Int # alignment :: SDL_HapticLeftRight -> Int # peekElemOff :: Ptr SDL_HapticLeftRight -> Int -> IO SDL_HapticLeftRight # pokeElemOff :: Ptr SDL_HapticLeftRight -> Int -> SDL_HapticLeftRight -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_HapticLeftRight # pokeByteOff :: Ptr b -> Int -> SDL_HapticLeftRight -> IO () # peek :: Ptr SDL_HapticLeftRight -> IO SDL_HapticLeftRight # poke :: Ptr SDL_HapticLeftRight -> SDL_HapticLeftRight -> IO () # | |||||
| Generic SDL_HapticLeftRight Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
Methods from :: SDL_HapticLeftRight -> Rep SDL_HapticLeftRight x # to :: Rep SDL_HapticLeftRight x -> SDL_HapticLeftRight # | |||||
| Show SDL_HapticLeftRight Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods showsPrec :: Int -> SDL_HapticLeftRight -> ShowS # show :: SDL_HapticLeftRight -> String # showList :: [SDL_HapticLeftRight] -> ShowS # | |||||
| Eq SDL_HapticLeftRight Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods (==) :: SDL_HapticLeftRight -> SDL_HapticLeftRight -> Bool # (/=) :: SDL_HapticLeftRight -> SDL_HapticLeftRight -> Bool # | |||||
| ReadRaw SDL_HapticLeftRight Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods readRaw :: Ptr SDL_HapticLeftRight -> IO SDL_HapticLeftRight # | |||||
| StaticSize SDL_HapticLeftRight Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods staticSizeOf :: Proxy SDL_HapticLeftRight -> Int # | |||||
| WriteRaw SDL_HapticLeftRight Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods writeRaw :: Ptr SDL_HapticLeftRight -> SDL_HapticLeftRight -> IO () # | |||||
| IsStruct SDL_HapticLeftRight Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods | |||||
| HasCField SDL_HapticLeftRight "large_magnitude" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticLeftRight "length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticLeftRight "small_magnitude" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticLeftRight "type'" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| ty ~ Uint16 => HasField "large_magnitude" SDL_HapticLeftRight ty Source # | Control of the large controller motor.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticLeftRight -> (ty -> SDL_HapticLeftRight, ty) # | |||||
| ty ~ Uint32 => HasField "length" SDL_HapticLeftRight ty Source # | Duration of the effect in milliseconds.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticLeftRight -> (ty -> SDL_HapticLeftRight, ty) # | |||||
| ty ~ Uint16 => HasField "small_magnitude" SDL_HapticLeftRight ty Source # | Control of the small controller motor.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticLeftRight -> (ty -> SDL_HapticLeftRight, ty) # | |||||
| ty ~ SDL_HapticEffectType => HasField "type'" SDL_HapticLeftRight ty Source # | SDL_HAPTIC_LEFTRIGHT
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticLeftRight -> (ty -> SDL_HapticLeftRight, ty) # | |||||
| ty ~ Uint16 => HasField "large_magnitude" (Ptr SDL_HapticLeftRight) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticLeftRight -> Ptr ty # | |||||
| ty ~ Uint32 => HasField "length" (Ptr SDL_HapticLeftRight) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticLeftRight -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "small_magnitude" (Ptr SDL_HapticLeftRight) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticLeftRight -> Ptr ty # | |||||
| ty ~ SDL_HapticEffectType => HasField "type'" (Ptr SDL_HapticLeftRight) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticLeftRight -> Ptr ty # | |||||
| type Rep SDL_HapticLeftRight Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic type Rep SDL_HapticLeftRight = D1 ('MetaData "SDL_HapticLeftRight" "SDL3.Sys.Bindgen.Haptic" "sdl3-bindgen-sys-0.0.1.0-inplace" 'False) (C1 ('MetaCons "SDL_HapticLeftRight" 'PrefixI 'True) ((S1 ('MetaSel ('Just "type'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SDL_HapticEffectType) :*: S1 ('MetaSel ('Just "length") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint32)) :*: (S1 ('MetaSel ('Just "large_magnitude") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16) :*: S1 ('MetaSel ('Just "small_magnitude") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16)))) | |||||
| type CFieldType SDL_HapticLeftRight "large_magnitude" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticLeftRight "length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticLeftRight "small_magnitude" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticLeftRight "type'" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
data SDL_HapticCustom Source #
A structure containing a template for the SDL_HAPTIC_CUSTOM effect.
This struct is exclusively for the SDL_HAPTIC_CUSTOM effect.
A custom force feedback effect is much like a periodic effect, where the application can define its exact shape. You will have to allocate the data yourself. Data should consist of channels * samples Uint16 samples.
If channels is one, the effect is rotated using the defined direction. Otherwise it uses the samples in data for the different axes.
- See also
sDL_HAPTIC_CUSTOM,SDL_HapticEffect- C declaration
struct SDL_HapticCustom, defined atSDL3/SDL_haptic.h 836:16
Since: 3.2.0
Constructors
| SDL_HapticCustom | |
Fields
| |
Instances
| Storable SDL_HapticCustom Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods sizeOf :: SDL_HapticCustom -> Int # alignment :: SDL_HapticCustom -> Int # peekElemOff :: Ptr SDL_HapticCustom -> Int -> IO SDL_HapticCustom # pokeElemOff :: Ptr SDL_HapticCustom -> Int -> SDL_HapticCustom -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_HapticCustom # pokeByteOff :: Ptr b -> Int -> SDL_HapticCustom -> IO () # peek :: Ptr SDL_HapticCustom -> IO SDL_HapticCustom # poke :: Ptr SDL_HapticCustom -> SDL_HapticCustom -> IO () # | |||||
| Generic SDL_HapticCustom Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
Methods from :: SDL_HapticCustom -> Rep SDL_HapticCustom x # to :: Rep SDL_HapticCustom x -> SDL_HapticCustom # | |||||
| Show SDL_HapticCustom Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods showsPrec :: Int -> SDL_HapticCustom -> ShowS # show :: SDL_HapticCustom -> String # showList :: [SDL_HapticCustom] -> ShowS # | |||||
| Eq SDL_HapticCustom Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods (==) :: SDL_HapticCustom -> SDL_HapticCustom -> Bool # (/=) :: SDL_HapticCustom -> SDL_HapticCustom -> Bool # | |||||
| ReadRaw SDL_HapticCustom Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods | |||||
| StaticSize SDL_HapticCustom Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods staticSizeOf :: Proxy SDL_HapticCustom -> Int # staticAlignment :: Proxy SDL_HapticCustom -> Int # | |||||
| WriteRaw SDL_HapticCustom Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods writeRaw :: Ptr SDL_HapticCustom -> SDL_HapticCustom -> IO () # | |||||
| IsStruct SDL_HapticCustom Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods | |||||
| HasCField SDL_HapticCustom "attack_length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCustom "attack_level" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCustom "button" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCustom "channels" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCustom "data'" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCustom "delay" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCustom "direction" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCustom "fade_length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCustom "fade_level" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCustom "interval" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCustom "length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCustom "period" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCustom "samples" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticCustom "type'" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| ty ~ Uint16 => HasField "attack_length" SDL_HapticCustom ty Source # | Duration of the attack.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCustom -> (ty -> SDL_HapticCustom, ty) # | |||||
| ty ~ Uint16 => HasField "attack_level" SDL_HapticCustom ty Source # | Level at the start of the attack.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCustom -> (ty -> SDL_HapticCustom, ty) # | |||||
| ty ~ Uint16 => HasField "button" SDL_HapticCustom ty Source # | Button that triggers the effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCustom -> (ty -> SDL_HapticCustom, ty) # | |||||
| ty ~ Uint8 => HasField "channels" SDL_HapticCustom ty Source # | Axes to use, minimum of one.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCustom -> (ty -> SDL_HapticCustom, ty) # | |||||
| ty ~ Ptr Uint16 => HasField "data'" SDL_HapticCustom ty Source # | Should contain channels*samples items.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCustom -> (ty -> SDL_HapticCustom, ty) # | |||||
| ty ~ Uint16 => HasField "delay" SDL_HapticCustom ty Source # | Delay before starting the effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCustom -> (ty -> SDL_HapticCustom, ty) # | |||||
| ty ~ SDL_HapticDirection => HasField "direction" SDL_HapticCustom ty Source # | Direction of the effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCustom -> (ty -> SDL_HapticCustom, ty) # | |||||
| ty ~ Uint16 => HasField "fade_length" SDL_HapticCustom ty Source # | Duration of the fade.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCustom -> (ty -> SDL_HapticCustom, ty) # | |||||
| ty ~ Uint16 => HasField "fade_level" SDL_HapticCustom ty Source # | Level at the end of the fade.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCustom -> (ty -> SDL_HapticCustom, ty) # | |||||
| ty ~ Uint16 => HasField "interval" SDL_HapticCustom ty Source # | How soon it can be triggered again after button.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCustom -> (ty -> SDL_HapticCustom, ty) # | |||||
| ty ~ Uint32 => HasField "length" SDL_HapticCustom ty Source # | Duration of the effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCustom -> (ty -> SDL_HapticCustom, ty) # | |||||
| ty ~ Uint16 => HasField "period" SDL_HapticCustom ty Source # | Sample periods.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCustom -> (ty -> SDL_HapticCustom, ty) # | |||||
| ty ~ Uint16 => HasField "samples" SDL_HapticCustom ty Source # | Amount of samples.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCustom -> (ty -> SDL_HapticCustom, ty) # | |||||
| ty ~ SDL_HapticEffectType => HasField "type'" SDL_HapticCustom ty Source # | SDL_HAPTIC_CUSTOM
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticCustom -> (ty -> SDL_HapticCustom, ty) # | |||||
| ty ~ Uint16 => HasField "attack_length" (Ptr SDL_HapticCustom) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCustom -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "attack_level" (Ptr SDL_HapticCustom) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCustom -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "button" (Ptr SDL_HapticCustom) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCustom -> Ptr ty # | |||||
| ty ~ Uint8 => HasField "channels" (Ptr SDL_HapticCustom) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCustom -> Ptr ty # | |||||
| ty ~ Ptr Uint16 => HasField "data'" (Ptr SDL_HapticCustom) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCustom -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "delay" (Ptr SDL_HapticCustom) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCustom -> Ptr ty # | |||||
| ty ~ SDL_HapticDirection => HasField "direction" (Ptr SDL_HapticCustom) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCustom -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "fade_length" (Ptr SDL_HapticCustom) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCustom -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "fade_level" (Ptr SDL_HapticCustom) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCustom -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "interval" (Ptr SDL_HapticCustom) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCustom -> Ptr ty # | |||||
| ty ~ Uint32 => HasField "length" (Ptr SDL_HapticCustom) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCustom -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "period" (Ptr SDL_HapticCustom) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCustom -> Ptr ty # | |||||
| ty ~ Uint16 => HasField "samples" (Ptr SDL_HapticCustom) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCustom -> Ptr ty # | |||||
| ty ~ SDL_HapticEffectType => HasField "type'" (Ptr SDL_HapticCustom) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticCustom -> Ptr ty # | |||||
| type Rep SDL_HapticCustom Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic type Rep SDL_HapticCustom = D1 ('MetaData "SDL_HapticCustom" "SDL3.Sys.Bindgen.Haptic" "sdl3-bindgen-sys-0.0.1.0-inplace" 'False) (C1 ('MetaCons "SDL_HapticCustom" 'PrefixI 'True) (((S1 ('MetaSel ('Just "type'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SDL_HapticEffectType) :*: (S1 ('MetaSel ('Just "direction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SDL_HapticDirection) :*: S1 ('MetaSel ('Just "length") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint32))) :*: ((S1 ('MetaSel ('Just "delay") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16) :*: S1 ('MetaSel ('Just "button") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16)) :*: (S1 ('MetaSel ('Just "interval") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16) :*: S1 ('MetaSel ('Just "channels") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint8)))) :*: ((S1 ('MetaSel ('Just "period") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16) :*: (S1 ('MetaSel ('Just "samples") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16) :*: S1 ('MetaSel ('Just "data'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Ptr Uint16)))) :*: ((S1 ('MetaSel ('Just "attack_length") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16) :*: S1 ('MetaSel ('Just "attack_level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16)) :*: (S1 ('MetaSel ('Just "fade_length") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16) :*: S1 ('MetaSel ('Just "fade_level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint16)))))) | |||||
| type CFieldType SDL_HapticCustom "attack_length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCustom "attack_level" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCustom "button" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCustom "channels" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCustom "data'" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCustom "delay" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCustom "direction" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCustom "fade_length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCustom "fade_level" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCustom "interval" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCustom "length" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCustom "period" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCustom "samples" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticCustom "type'" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
newtype SDL_HapticEffect Source #
The generic template for any haptic effect.
All values max at 32767 (0x7FFF). Signed values also can be negative. Time values unless specified otherwise are in milliseconds.
You can also pass SDL_HAPTIC_INFINITY to length instead of a 0-32767 value. Neither delay, interval, attack_length nor fade_length support SDL_HAPTIC_INFINITY. Fade will also not be used since effect never ends.
Additionally, the SDL_HAPTIC_RAMP effect does not support a duration of SDL_HAPTIC_INFINITY.
Button triggers may not be supported on all devices, it is advised to not use them if possible. Buttons start at index 1 instead of index 0 like the joystick.
If both attack_length and fade_level are 0, the envelope is not used, otherwise both values are used.
Common parts:
// Replay - All effects have this
Uint32 length; // Duration of effect (ms).
Uint16 delay; // Delay before starting effect.
// Trigger - All effects have this
Uint16 button; // Button that triggers effect.
Uint16 interval; // How soon before effect can be triggered again.
// Envelope - All effects except condition effects have this
Uint16 attack_length; // Duration of the attack (ms).
Uint16 attack_level; // Level at the start of the attack.
Uint16 fade_length; // Duration of the fade out (ms).
Uint16 fade_level; // Level at the end of the fade.
Here we have an example of a constant effect evolution in time:
Strength
^
|
| effect level --> _________________
| / \
| / \
| / \
| / \
| attack_level --> | \
| | | <--- fade_level
|
+--------------------------------------------------> Time
[--] [---]
attack_length fade_length
[------------------][-----------------------]
delay length
Note either the attack_level or the fade_level may be above the actual effect level.
- See also
SDL_HapticConstant,SDL_HapticPeriodic,SDL_HapticCondition,SDL_HapticRamp,SDL_HapticLeftRight,SDL_HapticCustom- C declaration
union SDL_HapticEffect, defined atSDL3/SDL_haptic.h 935:15
Since: 3.2.0
Constructors
| SDL_HapticEffect | |
Instances
| Storable SDL_HapticEffect Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods sizeOf :: SDL_HapticEffect -> Int # alignment :: SDL_HapticEffect -> Int # peekElemOff :: Ptr SDL_HapticEffect -> Int -> IO SDL_HapticEffect # pokeElemOff :: Ptr SDL_HapticEffect -> Int -> SDL_HapticEffect -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_HapticEffect # pokeByteOff :: Ptr b -> Int -> SDL_HapticEffect -> IO () # peek :: Ptr SDL_HapticEffect -> IO SDL_HapticEffect # poke :: Ptr SDL_HapticEffect -> SDL_HapticEffect -> IO () # | |||||
| Generic SDL_HapticEffect Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
Methods from :: SDL_HapticEffect -> Rep SDL_HapticEffect x # to :: Rep SDL_HapticEffect x -> SDL_HapticEffect # | |||||
| ReadRaw SDL_HapticEffect Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods | |||||
| StaticSize SDL_HapticEffect Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods staticSizeOf :: Proxy SDL_HapticEffect -> Int # staticAlignment :: Proxy SDL_HapticEffect -> Int # | |||||
| WriteRaw SDL_HapticEffect Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods writeRaw :: Ptr SDL_HapticEffect -> SDL_HapticEffect -> IO () # | |||||
| IsUnion SDL_HapticEffect Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods | |||||
| HasCField SDL_HapticEffect "condition" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticEffect "constant" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticEffect "custom" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticEffect "leftright" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticEffect "periodic" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticEffect "ramp" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| HasCField SDL_HapticEffect "type'" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| ty ~ SDL_HapticCondition => HasField "condition" SDL_HapticEffect ty Source # | Condition effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticEffect -> (ty -> SDL_HapticEffect, ty) # | |||||
| ty ~ SDL_HapticConstant => HasField "constant" SDL_HapticEffect ty Source # | Constant effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticEffect -> (ty -> SDL_HapticEffect, ty) # | |||||
| ty ~ SDL_HapticCustom => HasField "custom" SDL_HapticEffect ty Source # | Custom effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticEffect -> (ty -> SDL_HapticEffect, ty) # | |||||
| ty ~ SDL_HapticLeftRight => HasField "leftright" SDL_HapticEffect ty Source # | Left/Right effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticEffect -> (ty -> SDL_HapticEffect, ty) # | |||||
| ty ~ SDL_HapticPeriodic => HasField "periodic" SDL_HapticEffect ty Source # | Periodic effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticEffect -> (ty -> SDL_HapticEffect, ty) # | |||||
| ty ~ SDL_HapticRamp => HasField "ramp" SDL_HapticEffect ty Source # | Ramp effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticEffect -> (ty -> SDL_HapticEffect, ty) # | |||||
| ty ~ SDL_HapticEffectType => HasField "type'" SDL_HapticEffect ty Source # | Effect type.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticEffect -> (ty -> SDL_HapticEffect, ty) # | |||||
| ty ~ SDL_HapticCondition => HasField "condition" SDL_HapticEffect (ty :: Type) Source # | Condition effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: SDL_HapticEffect -> ty # | |||||
| ty ~ SDL_HapticConstant => HasField "constant" SDL_HapticEffect (ty :: Type) Source # | Constant effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: SDL_HapticEffect -> ty # | |||||
| ty ~ SDL_HapticCustom => HasField "custom" SDL_HapticEffect (ty :: Type) Source # | Custom effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: SDL_HapticEffect -> ty # | |||||
| ty ~ SDL_HapticLeftRight => HasField "leftright" SDL_HapticEffect (ty :: Type) Source # | Left/Right effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: SDL_HapticEffect -> ty # | |||||
| ty ~ SDL_HapticPeriodic => HasField "periodic" SDL_HapticEffect (ty :: Type) Source # | Periodic effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: SDL_HapticEffect -> ty # | |||||
| ty ~ SDL_HapticRamp => HasField "ramp" SDL_HapticEffect (ty :: Type) Source # | Ramp effect.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: SDL_HapticEffect -> ty # | |||||
| ty ~ SDL_HapticEffectType => HasField "type'" SDL_HapticEffect (ty :: Type) Source # | Effect type.
| ||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: SDL_HapticEffect -> ty # | |||||
| ty ~ SDL_HapticCondition => HasField "condition" (Ptr SDL_HapticEffect) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticEffect -> Ptr ty # | |||||
| ty ~ SDL_HapticConstant => HasField "constant" (Ptr SDL_HapticEffect) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticEffect -> Ptr ty # | |||||
| ty ~ SDL_HapticCustom => HasField "custom" (Ptr SDL_HapticEffect) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticEffect -> Ptr ty # | |||||
| ty ~ SDL_HapticLeftRight => HasField "leftright" (Ptr SDL_HapticEffect) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticEffect -> Ptr ty # | |||||
| ty ~ SDL_HapticPeriodic => HasField "periodic" (Ptr SDL_HapticEffect) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticEffect -> Ptr ty # | |||||
| ty ~ SDL_HapticRamp => HasField "ramp" (Ptr SDL_HapticEffect) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticEffect -> Ptr ty # | |||||
| ty ~ SDL_HapticEffectType => HasField "type'" (Ptr SDL_HapticEffect) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticEffect -> Ptr ty # | |||||
| type Rep SDL_HapticEffect Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic type Rep SDL_HapticEffect = D1 ('MetaData "SDL_HapticEffect" "SDL3.Sys.Bindgen.Haptic" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_HapticEffect" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteArray))) | |||||
| type CFieldType SDL_HapticEffect "condition" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticEffect "constant" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticEffect "custom" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticEffect "leftright" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticEffect "periodic" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticEffect "ramp" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticEffect "type'" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
newtype SDL_HapticID Source #
This is a unique ID for a haptic device for the time it is connected to the system, and is never reused for the lifetime of the application.
If the haptic device is disconnected and reconnected, it will get a new ID.
The value 0 is an invalid ID.
- C declaration
SDL_HapticID, defined atSDL3/SDL_haptic.h 957:16
Since: 3.2.0
Constructors
| SDL_HapticID | |
Instances
| Bits SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods (.&.) :: SDL_HapticID -> SDL_HapticID -> SDL_HapticID # (.|.) :: SDL_HapticID -> SDL_HapticID -> SDL_HapticID # xor :: SDL_HapticID -> SDL_HapticID -> SDL_HapticID # complement :: SDL_HapticID -> SDL_HapticID # shift :: SDL_HapticID -> Int -> SDL_HapticID # rotate :: SDL_HapticID -> Int -> SDL_HapticID # bit :: Int -> SDL_HapticID # setBit :: SDL_HapticID -> Int -> SDL_HapticID # clearBit :: SDL_HapticID -> Int -> SDL_HapticID # complementBit :: SDL_HapticID -> Int -> SDL_HapticID # testBit :: SDL_HapticID -> Int -> Bool # bitSizeMaybe :: SDL_HapticID -> Maybe Int # bitSize :: SDL_HapticID -> Int # isSigned :: SDL_HapticID -> Bool # shiftL :: SDL_HapticID -> Int -> SDL_HapticID # unsafeShiftL :: SDL_HapticID -> Int -> SDL_HapticID # shiftR :: SDL_HapticID -> Int -> SDL_HapticID # unsafeShiftR :: SDL_HapticID -> Int -> SDL_HapticID # rotateL :: SDL_HapticID -> Int -> SDL_HapticID # rotateR :: SDL_HapticID -> Int -> SDL_HapticID # popCount :: SDL_HapticID -> Int # | |||||
| FiniteBits SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods finiteBitSize :: SDL_HapticID -> Int # countLeadingZeros :: SDL_HapticID -> Int # countTrailingZeros :: SDL_HapticID -> Int # | |||||
| Bounded SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| Enum SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods succ :: SDL_HapticID -> SDL_HapticID # pred :: SDL_HapticID -> SDL_HapticID # toEnum :: Int -> SDL_HapticID # fromEnum :: SDL_HapticID -> Int # enumFrom :: SDL_HapticID -> [SDL_HapticID] # enumFromThen :: SDL_HapticID -> SDL_HapticID -> [SDL_HapticID] # enumFromTo :: SDL_HapticID -> SDL_HapticID -> [SDL_HapticID] # enumFromThenTo :: SDL_HapticID -> SDL_HapticID -> SDL_HapticID -> [SDL_HapticID] # | |||||
| Storable SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods sizeOf :: SDL_HapticID -> Int # alignment :: SDL_HapticID -> Int # peekElemOff :: Ptr SDL_HapticID -> Int -> IO SDL_HapticID # pokeElemOff :: Ptr SDL_HapticID -> Int -> SDL_HapticID -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_HapticID # pokeByteOff :: Ptr b -> Int -> SDL_HapticID -> IO () # peek :: Ptr SDL_HapticID -> IO SDL_HapticID # poke :: Ptr SDL_HapticID -> SDL_HapticID -> IO () # | |||||
| Generic SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| Ix SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods range :: (SDL_HapticID, SDL_HapticID) -> [SDL_HapticID] # index :: (SDL_HapticID, SDL_HapticID) -> SDL_HapticID -> Int # unsafeIndex :: (SDL_HapticID, SDL_HapticID) -> SDL_HapticID -> Int # inRange :: (SDL_HapticID, SDL_HapticID) -> SDL_HapticID -> Bool # rangeSize :: (SDL_HapticID, SDL_HapticID) -> Int # unsafeRangeSize :: (SDL_HapticID, SDL_HapticID) -> Int # | |||||
| Num SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods (+) :: SDL_HapticID -> SDL_HapticID -> SDL_HapticID # (-) :: SDL_HapticID -> SDL_HapticID -> SDL_HapticID # (*) :: SDL_HapticID -> SDL_HapticID -> SDL_HapticID # negate :: SDL_HapticID -> SDL_HapticID # abs :: SDL_HapticID -> SDL_HapticID # signum :: SDL_HapticID -> SDL_HapticID # fromInteger :: Integer -> SDL_HapticID # | |||||
| Read SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods readsPrec :: Int -> ReadS SDL_HapticID # readList :: ReadS [SDL_HapticID] # | |||||
| Integral SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods quot :: SDL_HapticID -> SDL_HapticID -> SDL_HapticID # rem :: SDL_HapticID -> SDL_HapticID -> SDL_HapticID # div :: SDL_HapticID -> SDL_HapticID -> SDL_HapticID # mod :: SDL_HapticID -> SDL_HapticID -> SDL_HapticID # quotRem :: SDL_HapticID -> SDL_HapticID -> (SDL_HapticID, SDL_HapticID) # divMod :: SDL_HapticID -> SDL_HapticID -> (SDL_HapticID, SDL_HapticID) # toInteger :: SDL_HapticID -> Integer # | |||||
| Real SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods toRational :: SDL_HapticID -> Rational # | |||||
| Show SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods showsPrec :: Int -> SDL_HapticID -> ShowS # show :: SDL_HapticID -> String # showList :: [SDL_HapticID] -> ShowS # | |||||
| Eq SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| Ord SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods compare :: SDL_HapticID -> SDL_HapticID -> Ordering # (<) :: SDL_HapticID -> SDL_HapticID -> Bool # (<=) :: SDL_HapticID -> SDL_HapticID -> Bool # (>) :: SDL_HapticID -> SDL_HapticID -> Bool # (>=) :: SDL_HapticID -> SDL_HapticID -> Bool # max :: SDL_HapticID -> SDL_HapticID -> SDL_HapticID # min :: SDL_HapticID -> SDL_HapticID -> SDL_HapticID # | |||||
| Prim SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods sizeOfType# :: Proxy SDL_HapticID -> Int# # sizeOf# :: SDL_HapticID -> Int# # alignmentOfType# :: Proxy SDL_HapticID -> Int# # alignment# :: SDL_HapticID -> Int# # indexByteArray# :: ByteArray# -> Int# -> SDL_HapticID # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, SDL_HapticID #) # writeByteArray# :: MutableByteArray# s -> Int# -> SDL_HapticID -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> SDL_HapticID -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> SDL_HapticID # readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, SDL_HapticID #) # writeOffAddr# :: Addr# -> Int# -> SDL_HapticID -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> SDL_HapticID -> State# s -> State# s # | |||||
| HasFFIType SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
Methods | |||||
| ReadRaw SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods readRaw :: Ptr SDL_HapticID -> IO SDL_HapticID # | |||||
| StaticSize SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| WriteRaw SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods writeRaw :: Ptr SDL_HapticID -> SDL_HapticID -> IO () # | |||||
| Bitfield SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| HasCField SDL_HapticID "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Associated Types
| |||||
| ty ~ Uint32 => HasField "unwrap" SDL_HapticID ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods hasField :: SDL_HapticID -> (ty -> SDL_HapticID, ty) # | |||||
| ty ~ Uint32 => HasField "unwrap" (Ptr SDL_HapticID) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic Methods getField :: Ptr SDL_HapticID -> Ptr ty # | |||||
| type Rep SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic type Rep SDL_HapticID = D1 ('MetaData "SDL_HapticID" "SDL3.Sys.Bindgen.Haptic" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_HapticID" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Uint32))) | |||||
| type FFIType SDL_HapticID Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||
| type CFieldType SDL_HapticID "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Haptic | |||||