package tsdl

  1. Overview
  2. Docs
val infinity : uint32


type feature = int
val gain : feature
val autocenter : feature
val status : feature
val pause : feature


type direction_type = int
val polar : direction_type
val cartesian : direction_type
val spherical : direction_type
module Direction : sig ... end


type effect_type = int
type 'a field

The type for effect fields.

val create_effect : unit -> haptic_effect

create_effect () is an uninitialized haptic effect

val get : haptic_effect -> 'a field -> 'a

get e f gets the field f of e.

val set : haptic_effect -> 'a field -> 'a -> unit

set e f v sets the field f of e to v.

val typ : effect_type field

Constant effect

val constant : effect_type

SDL_HapticConstant fields

val constant_type : effect_type field
val constant_direction : Direction.t field
val constant_length : uint32 field
val constant_delay : uint16 field
val constant_button : uint16 field
val constant_interval : uint16 field
val constant_level : int16 field
val constant_attack_length : uint16 field
val constant_attack_level : uint16 field
val constant_fade_length : uint16 field
val constant_fade_level : uint16 field

Periodic effect

val sine : effect_type
val left_right : effect_type
val triangle : effect_type
val sawtooth_up : effect_type
val sawtooth_down : effect_type

SDL_HapticPeriodic fields

val periodic_type : effect_type field
val periodic_direction : Direction.t field
val periodic_length : uint32 field
val periodic_delay : uint16 field
val periodic_button : uint16 field
val periodic_interval : uint16 field
val periodic_period : uint16 field
val periodic_magnitude : int16 field
val periodic_offset : int16 field
val periodic_phase : uint16 field
val periodic_attack_length : uint16 field
val periodic_attack_level : uint16 field
val periodic_fade_length : uint16 field
val periodic_fade_level : uint16 field

Condition effect

val spring : effect_type
val damper : effect_type
val inertia : effect_type
val friction : effect_type

SDL_HapticCondition fields

val condition_type : effect_type field
val condition_direction : Direction.t field
val condition_length : uint32 field
val condition_delay : uint16 field
val condition_button : uint16 field
val condition_interval : uint16 field
val condition_right_sat_0 : uint16 field
val condition_right_sat_1 : uint16 field
val condition_right_sat_2 : uint16 field
val condition_left_sat_0 : uint16 field
val condition_left_sat_1 : uint16 field
val condition_left_sat_2 : uint16 field
val condition_right_coeff_0 : int16 field
val condition_right_coeff_1 : int16 field
val condition_right_coeff_2 : int16 field
val condition_left_coeff_0 : int16 field
val condition_left_coeff_1 : int16 field
val condition_left_coeff_2 : int16 field
val condition_deadband_0 : uint16 field
val condition_deadband_1 : uint16 field
val condition_deadband_2 : uint16 field
val condition_center_0 : int16 field
val condition_center_1 : int16 field
val condition_center_2 : int16 field

Ramp effect

val ramp : effect_type

SDL_HapticRamp fields

val ramp_type : effect_type field
val ramp_direction : Direction.t field
val ramp_length : uint32 field
val ramp_delay : uint16 field
val ramp_button : uint16 field
val ramp_interval : uint16 field
val ramp_start : int16 field
val ramp_end : int16 field
val ramp_attack_length : uint16 field
val ramp_attack_level : uint16 field
val ramp_fade_length : uint16 field
val ramp_fade_level : uint16 field

Left right effect

For Left right effect.

SDL_HapticLeftRight fields

val left_right_type : effect_type field
val left_right_length : uint32 field
val left_right_large_magnitude : uint16 field
val left_right_small_magnitude : uint16 field

Custom effect

val custom : effect_type

SDL_HapticCustom fields

val custom_type : effect_type field
val custom_direction : Direction.t field
val custom_length : uint32 field
val custom_delay : uint16 field
val custom_button : uint16 field
val custom_interval : uint16 field
val custom_channels : uint8 field
val custom_period : uint16 field
val custom_samples : uint16 field
val custom_data : uint16 list field

Note. Only setable.

val custom_attack_length : uint16 field
val custom_attack_level : uint16 field
val custom_fade_length : uint16 field
val custom_fade_level : uint16 field