Documentation
¶
Overview ¶
Package corehaptics provides a fluent Go API over the macOS CoreHaptics framework.
Construction ¶
New… functions create objects; each With… method sets one property and returns its receiver, so configuration calls chain. A <Type>FromID constructor adopts an Objective-C object obtained elsewhere.
Lifecycle ¶
A wrapper releases its Objective-C object automatically once the garbage collector finds it unreachable. Call Release to relinquish the reference deterministically (for objects holding scarce resources); Release is idempotent, and afterwards the wrapper's methods are no-ops returning zero values.
Errors ¶
Failing calls return errors carrying the Objective-C error domain and code. Match them against this package's Err… sentinel values with errors.Is, or inspect domain, code, and Apple's prose via errors.As with *errkit.Error.
Index ¶
- Variables
- func CHHapticAudioResourceKeyLoopEnabled() obj.Object
- func CHHapticAudioResourceKeyUseVolumeEnvelope() obj.Object
- func CHHapticDynamicParameterIDAudioAttackTimeControl() obj.Object
- func CHHapticDynamicParameterIDAudioBrightnessControl() obj.Object
- func CHHapticDynamicParameterIDAudioDecayTimeControl() obj.Object
- func CHHapticDynamicParameterIDAudioPanControl() obj.Object
- func CHHapticDynamicParameterIDAudioPitchControl() obj.Object
- func CHHapticDynamicParameterIDAudioReleaseTimeControl() obj.Object
- func CHHapticDynamicParameterIDAudioVolumeControl() obj.Object
- func CHHapticDynamicParameterIDHapticAttackTimeControl() obj.Object
- func CHHapticDynamicParameterIDHapticDecayTimeControl() obj.Object
- func CHHapticDynamicParameterIDHapticIntensityControl() obj.Object
- func CHHapticDynamicParameterIDHapticReleaseTimeControl() obj.Object
- func CHHapticDynamicParameterIDHapticSharpnessControl() obj.Object
- func CHHapticEventParameterIDAttackTime() obj.Object
- func CHHapticEventParameterIDAudioBrightness() obj.Object
- func CHHapticEventParameterIDAudioPan() obj.Object
- func CHHapticEventParameterIDAudioPitch() obj.Object
- func CHHapticEventParameterIDAudioVolume() obj.Object
- func CHHapticEventParameterIDDecayTime() obj.Object
- func CHHapticEventParameterIDHapticIntensity() obj.Object
- func CHHapticEventParameterIDHapticSharpness() obj.Object
- func CHHapticEventParameterIDReleaseTime() obj.Object
- func CHHapticEventParameterIDSustained() obj.Object
- func CHHapticEventTypeAudioContinuous() obj.Object
- func CHHapticEventTypeAudioCustom() obj.Object
- func CHHapticEventTypeHapticContinuous() obj.Object
- func CHHapticEventTypeHapticTransient() obj.Object
- func CHHapticPatternKeyEvent() obj.Object
- func CHHapticPatternKeyEventDuration() obj.Object
- func CHHapticPatternKeyEventParameters() obj.Object
- func CHHapticPatternKeyEventType() obj.Object
- func CHHapticPatternKeyEventWaveformLoopEnabled() obj.Object
- func CHHapticPatternKeyEventWaveformPath() obj.Object
- func CHHapticPatternKeyEventWaveformUseVolumeEnvelope() obj.Object
- func CHHapticPatternKeyParameter() obj.Object
- func CHHapticPatternKeyParameterCurve() obj.Object
- func CHHapticPatternKeyParameterCurveControlPoints() obj.Object
- func CHHapticPatternKeyParameterID() obj.Object
- func CHHapticPatternKeyParameterValue() obj.Object
- func CHHapticPatternKeyPattern() obj.Object
- func CHHapticPatternKeyTime() obj.Object
- func CHHapticPatternKeyVersion() obj.Object
- type HapticAdvancedPatternPlayer
- type HapticDeviceCapability
- type HapticDynamicParameter
- func (hdp *HapticDynamicParameter) Description() string
- func (hdp *HapticDynamicParameter) IsEqual(other obj.Object) bool
- func (hdp *HapticDynamicParameter) IsKind(className string) bool
- func (hdp *HapticDynamicParameter) ParameterID() *foundation.String
- func (hdp *HapticDynamicParameter) RelativeTime() float64
- func (hdp *HapticDynamicParameter) String() string
- func (hdp *HapticDynamicParameter) Value() float32
- func (hdp *HapticDynamicParameter) WithRelativeTime(relativeTime float64) *HapticDynamicParameter
- func (hdp *HapticDynamicParameter) WithValue(value float32) *HapticDynamicParameter
- type HapticEngine
- func (he *HapticEngine) CurrentTime() float64
- func (he *HapticEngine) Description() string
- func (he *HapticEngine) IsAutoShutdownEnabled() bool
- func (he *HapticEngine) IsEqual(other obj.Object) bool
- func (he *HapticEngine) IsKind(className string) bool
- func (he *HapticEngine) IsMutedForAudio() bool
- func (he *HapticEngine) IsMutedForHaptics() bool
- func (he *HapticEngine) NotifyWhenPlayersFinished(finishedHandler func(unsafe.Pointer) int)
- func (he *HapticEngine) PlayPatternFromData(data []byte) error
- func (he *HapticEngine) PlayPatternFromURL(fileURL string) error
- func (he *HapticEngine) PlaysAudioOnly() bool
- func (he *HapticEngine) PlaysHapticsOnly() bool
- func (he *HapticEngine) RegisterAudioResourceOptions(resourceURL string, options obj.Object) (result int, err error)
- func (he *HapticEngine) StartAndReturnError() error
- func (he *HapticEngine) StartWithCompletionHandler(completionHandler func(unsafe.Pointer))
- func (he *HapticEngine) StopWithCompletionHandler(completionHandler func(unsafe.Pointer))
- func (he *HapticEngine) String() string
- func (he *HapticEngine) UnregisterAudioResource(resourceID int) error
- func (he *HapticEngine) WithAutoShutdownEnabled(autoShutdownEnabled bool) *HapticEngine
- func (he *HapticEngine) WithIsMutedForAudio(isMutedForAudio bool) *HapticEngine
- func (he *HapticEngine) WithIsMutedForHaptics(isMutedForHaptics bool) *HapticEngine
- func (he *HapticEngine) WithPlaysAudioOnly(playsAudioOnly bool) *HapticEngine
- func (he *HapticEngine) WithPlaysHapticsOnly(playsHapticsOnly bool) *HapticEngine
- func (he *HapticEngine) WithResetHandler(resetHandler func()) *HapticEngine
- func (he *HapticEngine) WithStoppedHandler(stoppedHandler func(HapticEngineStoppedReason)) *HapticEngine
- type HapticEngineFinishedAction
- type HapticEngineStoppedReason
- type HapticErrorCode
- type HapticEvent
- func HapticEventFromID(id objc.ID) *HapticEvent
- func NewHapticEventWithAudioResourceIDParametersRelativeTime(resID int, eventParams []*HapticEventParameter, time_ float64) *HapticEvent
- func NewHapticEventWithAudioResourceIDParametersRelativeTimeDuration(resID int, eventParams []*HapticEventParameter, time_ float64, ...) *HapticEvent
- func NewHapticEventWithEventTypeParametersRelativeTime(type_ obj.Object, eventParams []*HapticEventParameter, time_ float64) *HapticEvent
- func NewHapticEventWithEventTypeParametersRelativeTimeDuration(type_ obj.Object, eventParams []*HapticEventParameter, time_ float64, ...) *HapticEvent
- func (he *HapticEvent) Description() string
- func (he *HapticEvent) Duration() float64
- func (he *HapticEvent) EventParameters() []*HapticEventParameter
- func (he *HapticEvent) IsEqual(other obj.Object) bool
- func (he *HapticEvent) IsKind(className string) bool
- func (he *HapticEvent) RelativeTime() float64
- func (he *HapticEvent) String() string
- func (he *HapticEvent) Type() *foundation.String
- func (he *HapticEvent) WithDuration(duration float64) *HapticEvent
- func (he *HapticEvent) WithRelativeTime(relativeTime float64) *HapticEvent
- type HapticEventParameter
- func (hep *HapticEventParameter) Description() string
- func (hep *HapticEventParameter) IsEqual(other obj.Object) bool
- func (hep *HapticEventParameter) IsKind(className string) bool
- func (hep *HapticEventParameter) ParameterID() *foundation.String
- func (hep *HapticEventParameter) String() string
- func (hep *HapticEventParameter) Value() float32
- func (hep *HapticEventParameter) WithValue(value float32) *HapticEventParameter
- type HapticParameterAttributes
- type HapticParameterCurve
- func (hpc *HapticParameterCurve) ControlPoints() []*HapticParameterCurveControlPoint
- func (hpc *HapticParameterCurve) Description() string
- func (hpc *HapticParameterCurve) IsEqual(other obj.Object) bool
- func (hpc *HapticParameterCurve) IsKind(className string) bool
- func (hpc *HapticParameterCurve) ParameterID() *foundation.String
- func (hpc *HapticParameterCurve) RelativeTime() float64
- func (hpc *HapticParameterCurve) String() string
- func (hpc *HapticParameterCurve) WithRelativeTime(relativeTime float64) *HapticParameterCurve
- type HapticParameterCurveControlPoint
- func (hpccp *HapticParameterCurveControlPoint) Description() string
- func (hpccp *HapticParameterCurveControlPoint) IsEqual(other obj.Object) bool
- func (hpccp *HapticParameterCurveControlPoint) IsKind(className string) bool
- func (hpccp *HapticParameterCurveControlPoint) RelativeTime() float64
- func (hpccp *HapticParameterCurveControlPoint) String() string
- func (hpccp *HapticParameterCurveControlPoint) Value() float32
- func (hpccp *HapticParameterCurveControlPoint) WithRelativeTime(relativeTime float64) *HapticParameterCurveControlPoint
- func (hpccp *HapticParameterCurveControlPoint) WithValue(value float32) *HapticParameterCurveControlPoint
- type HapticPattern
- func HapticPatternFromID(id objc.ID) *HapticPattern
- func NewHapticPatternWithContentsOfURL(ahapURL string) (result *HapticPattern, err error)
- func NewHapticPatternWithDictionary(patternDict obj.Object) (result *HapticPattern, err error)
- func NewHapticPatternWithEventsParameterCurves(events []*HapticEvent, parameterCurves []*HapticParameterCurve) (result *HapticPattern, err error)
- func NewHapticPatternWithEventsParameters(events []*HapticEvent, parameters []*HapticDynamicParameter) (result *HapticPattern, err error)
- func (hp *HapticPattern) Description() string
- func (hp *HapticPattern) Duration() float64
- func (hp *HapticPattern) ExportDictionary() (result obj.Object, err error)
- func (hp *HapticPattern) IsEqual(other obj.Object) bool
- func (hp *HapticPattern) IsKind(className string) bool
- func (hp *HapticPattern) String() string
- type HapticPatternPlayer
- type Idtype
- type PtrauthKey
Constants ¶
This section is empty.
Variables ¶
var ErrCodeBadEventEntry = errkit.New("CHHapticErrorDomain", -4830)
ErrCodeBadEventEntry matches the CoreHaptics error CHHapticErrorCodeBadEventEntry.
var ErrCodeBadParameterEntry = errkit.New("CHHapticErrorDomain", -4831)
ErrCodeBadParameterEntry matches the CoreHaptics error CHHapticErrorCodeBadParameterEntry.
var ErrCodeEngineNotRunning = errkit.New("CHHapticErrorDomain", -4805)
ErrCodeEngineNotRunning matches the CoreHaptics error CHHapticErrorCodeEngineNotRunning.
var ErrCodeEngineStartTimeout = errkit.New("CHHapticErrorDomain", -4808)
ErrCodeEngineStartTimeout matches the CoreHaptics error CHHapticErrorCodeEngineStartTimeout.
var ErrCodeFileNotFound = errkit.New("CHHapticErrorDomain", -4851)
ErrCodeFileNotFound matches the CoreHaptics error CHHapticErrorCodeFileNotFound.
var ErrCodeInsufficientPower = errkit.New("CHHapticErrorDomain", -4897)
ErrCodeInsufficientPower matches the CoreHaptics error CHHapticErrorCodeInsufficientPower.
var ErrCodeInvalidAudioResource = errkit.New("CHHapticErrorDomain", -4824)
ErrCodeInvalidAudioResource matches the CoreHaptics error CHHapticErrorCodeInvalidAudioResource.
var ErrCodeInvalidAudioSession = errkit.New("CHHapticErrorDomain", -4815)
ErrCodeInvalidAudioSession matches the CoreHaptics error CHHapticErrorCodeInvalidAudioSession.
var ErrCodeInvalidEngineParameter = errkit.New("CHHapticErrorDomain", -4816)
ErrCodeInvalidEngineParameter matches the CoreHaptics error CHHapticErrorCodeInvalidEngineParameter.
var ErrCodeInvalidEventDuration = errkit.New("CHHapticErrorDomain", -4823)
ErrCodeInvalidEventDuration matches the CoreHaptics error CHHapticErrorCodeInvalidEventDuration.
var ErrCodeInvalidEventTime = errkit.New("CHHapticErrorDomain", -4822)
ErrCodeInvalidEventTime matches the CoreHaptics error CHHapticErrorCodeInvalidEventTime.
var ErrCodeInvalidEventType = errkit.New("CHHapticErrorDomain", -4821)
ErrCodeInvalidEventType matches the CoreHaptics error CHHapticErrorCodeInvalidEventType.
var ErrCodeInvalidParameterType = errkit.New("CHHapticErrorDomain", -4820)
ErrCodeInvalidParameterType matches the CoreHaptics error CHHapticErrorCodeInvalidParameterType.
var ErrCodeInvalidPatternData = errkit.New("CHHapticErrorDomain", -4813)
ErrCodeInvalidPatternData matches the CoreHaptics error CHHapticErrorCodeInvalidPatternData.
var ErrCodeInvalidPatternDictionary = errkit.New("CHHapticErrorDomain", -4814)
ErrCodeInvalidPatternDictionary matches the CoreHaptics error CHHapticErrorCodeInvalidPatternDictionary.
var ErrCodeInvalidPatternPlayer = errkit.New("CHHapticErrorDomain", -4812)
ErrCodeInvalidPatternPlayer matches the CoreHaptics error CHHapticErrorCodeInvalidPatternPlayer.
var ErrCodeInvalidTime = errkit.New("CHHapticErrorDomain", -4840)
ErrCodeInvalidTime matches the CoreHaptics error CHHapticErrorCodeInvalidTime.
var ErrCodeMemoryError = errkit.New("CHHapticErrorDomain", -4899)
ErrCodeMemoryError matches the CoreHaptics error CHHapticErrorCodeMemoryError.
var ErrCodeNotSupported = errkit.New("CHHapticErrorDomain", -4809)
ErrCodeNotSupported matches the CoreHaptics error CHHapticErrorCodeNotSupported.
var ErrCodeOperationNotPermitted = errkit.New("CHHapticErrorDomain", -4806)
ErrCodeOperationNotPermitted matches the CoreHaptics error CHHapticErrorCodeOperationNotPermitted.
var ErrCodeResourceNotAvailable = errkit.New("CHHapticErrorDomain", -4825)
ErrCodeResourceNotAvailable matches the CoreHaptics error CHHapticErrorCodeResourceNotAvailable.
var ErrCodeServerInitFailed = errkit.New("CHHapticErrorDomain", -4810)
ErrCodeServerInitFailed matches the CoreHaptics error CHHapticErrorCodeServerInitFailed.
var ErrCodeServerInterrupted = errkit.New("CHHapticErrorDomain", -4811)
ErrCodeServerInterrupted matches the CoreHaptics error CHHapticErrorCodeServerInterrupted.
var ErrCodeUnknownError = errkit.New("CHHapticErrorDomain", -4898)
ErrCodeUnknownError matches the CoreHaptics error CHHapticErrorCodeUnknownError.
Functions ¶
func CHHapticAudioResourceKeyLoopEnabled ¶
CHHapticAudioResourceKeyLoopEnabled returns the string constant CHHapticAudioResourceKeyLoopEnabled, for use as a dictionary key or argument.
func CHHapticAudioResourceKeyUseVolumeEnvelope ¶
CHHapticAudioResourceKeyUseVolumeEnvelope returns the string constant CHHapticAudioResourceKeyUseVolumeEnvelope, for use as a dictionary key or argument.
func CHHapticDynamicParameterIDAudioAttackTimeControl ¶
CHHapticDynamicParameterIDAudioAttackTimeControl returns the string constant CHHapticDynamicParameterIDAudioAttackTimeControl, for use as a dictionary key or argument.
func CHHapticDynamicParameterIDAudioBrightnessControl ¶
CHHapticDynamicParameterIDAudioBrightnessControl returns the string constant CHHapticDynamicParameterIDAudioBrightnessControl, for use as a dictionary key or argument.
func CHHapticDynamicParameterIDAudioDecayTimeControl ¶
CHHapticDynamicParameterIDAudioDecayTimeControl returns the string constant CHHapticDynamicParameterIDAudioDecayTimeControl, for use as a dictionary key or argument.
func CHHapticDynamicParameterIDAudioPanControl ¶
CHHapticDynamicParameterIDAudioPanControl returns the string constant CHHapticDynamicParameterIDAudioPanControl, for use as a dictionary key or argument.
func CHHapticDynamicParameterIDAudioPitchControl ¶
CHHapticDynamicParameterIDAudioPitchControl returns the string constant CHHapticDynamicParameterIDAudioPitchControl, for use as a dictionary key or argument.
func CHHapticDynamicParameterIDAudioReleaseTimeControl ¶
CHHapticDynamicParameterIDAudioReleaseTimeControl returns the string constant CHHapticDynamicParameterIDAudioReleaseTimeControl, for use as a dictionary key or argument.
func CHHapticDynamicParameterIDAudioVolumeControl ¶
CHHapticDynamicParameterIDAudioVolumeControl returns the string constant CHHapticDynamicParameterIDAudioVolumeControl, for use as a dictionary key or argument.
func CHHapticDynamicParameterIDHapticAttackTimeControl ¶
CHHapticDynamicParameterIDHapticAttackTimeControl returns the string constant CHHapticDynamicParameterIDHapticAttackTimeControl, for use as a dictionary key or argument.
func CHHapticDynamicParameterIDHapticDecayTimeControl ¶
CHHapticDynamicParameterIDHapticDecayTimeControl returns the string constant CHHapticDynamicParameterIDHapticDecayTimeControl, for use as a dictionary key or argument.
func CHHapticDynamicParameterIDHapticIntensityControl ¶
CHHapticDynamicParameterIDHapticIntensityControl returns the string constant CHHapticDynamicParameterIDHapticIntensityControl, for use as a dictionary key or argument.
func CHHapticDynamicParameterIDHapticReleaseTimeControl ¶
CHHapticDynamicParameterIDHapticReleaseTimeControl returns the string constant CHHapticDynamicParameterIDHapticReleaseTimeControl, for use as a dictionary key or argument.
func CHHapticDynamicParameterIDHapticSharpnessControl ¶
CHHapticDynamicParameterIDHapticSharpnessControl returns the string constant CHHapticDynamicParameterIDHapticSharpnessControl, for use as a dictionary key or argument.
func CHHapticEventParameterIDAttackTime ¶
CHHapticEventParameterIDAttackTime returns the string constant CHHapticEventParameterIDAttackTime, for use as a dictionary key or argument.
func CHHapticEventParameterIDAudioBrightness ¶
CHHapticEventParameterIDAudioBrightness returns the string constant CHHapticEventParameterIDAudioBrightness, for use as a dictionary key or argument.
func CHHapticEventParameterIDAudioPan ¶
CHHapticEventParameterIDAudioPan returns the string constant CHHapticEventParameterIDAudioPan, for use as a dictionary key or argument.
func CHHapticEventParameterIDAudioPitch ¶
CHHapticEventParameterIDAudioPitch returns the string constant CHHapticEventParameterIDAudioPitch, for use as a dictionary key or argument.
func CHHapticEventParameterIDAudioVolume ¶
CHHapticEventParameterIDAudioVolume returns the string constant CHHapticEventParameterIDAudioVolume, for use as a dictionary key or argument.
func CHHapticEventParameterIDDecayTime ¶
CHHapticEventParameterIDDecayTime returns the string constant CHHapticEventParameterIDDecayTime, for use as a dictionary key or argument.
func CHHapticEventParameterIDHapticIntensity ¶
CHHapticEventParameterIDHapticIntensity returns the string constant CHHapticEventParameterIDHapticIntensity, for use as a dictionary key or argument.
func CHHapticEventParameterIDHapticSharpness ¶
CHHapticEventParameterIDHapticSharpness returns the string constant CHHapticEventParameterIDHapticSharpness, for use as a dictionary key or argument.
func CHHapticEventParameterIDReleaseTime ¶
CHHapticEventParameterIDReleaseTime returns the string constant CHHapticEventParameterIDReleaseTime, for use as a dictionary key or argument.
func CHHapticEventParameterIDSustained ¶
CHHapticEventParameterIDSustained returns the string constant CHHapticEventParameterIDSustained, for use as a dictionary key or argument.
func CHHapticEventTypeAudioContinuous ¶
CHHapticEventTypeAudioContinuous returns the string constant CHHapticEventTypeAudioContinuous, for use as a dictionary key or argument.
func CHHapticEventTypeAudioCustom ¶
CHHapticEventTypeAudioCustom returns the string constant CHHapticEventTypeAudioCustom, for use as a dictionary key or argument.
func CHHapticEventTypeHapticContinuous ¶
CHHapticEventTypeHapticContinuous returns the string constant CHHapticEventTypeHapticContinuous, for use as a dictionary key or argument.
func CHHapticEventTypeHapticTransient ¶
CHHapticEventTypeHapticTransient returns the string constant CHHapticEventTypeHapticTransient, for use as a dictionary key or argument.
func CHHapticPatternKeyEvent ¶
CHHapticPatternKeyEvent returns the string constant CHHapticPatternKeyEvent, for use as a dictionary key or argument.
func CHHapticPatternKeyEventDuration ¶
CHHapticPatternKeyEventDuration returns the string constant CHHapticPatternKeyEventDuration, for use as a dictionary key or argument.
func CHHapticPatternKeyEventParameters ¶
CHHapticPatternKeyEventParameters returns the string constant CHHapticPatternKeyEventParameters, for use as a dictionary key or argument.
func CHHapticPatternKeyEventType ¶
CHHapticPatternKeyEventType returns the string constant CHHapticPatternKeyEventType, for use as a dictionary key or argument.
func CHHapticPatternKeyEventWaveformLoopEnabled ¶
CHHapticPatternKeyEventWaveformLoopEnabled returns the string constant CHHapticPatternKeyEventWaveformLoopEnabled, for use as a dictionary key or argument.
func CHHapticPatternKeyEventWaveformPath ¶
CHHapticPatternKeyEventWaveformPath returns the string constant CHHapticPatternKeyEventWaveformPath, for use as a dictionary key or argument.
func CHHapticPatternKeyEventWaveformUseVolumeEnvelope ¶
CHHapticPatternKeyEventWaveformUseVolumeEnvelope returns the string constant CHHapticPatternKeyEventWaveformUseVolumeEnvelope, for use as a dictionary key or argument.
func CHHapticPatternKeyParameter ¶
CHHapticPatternKeyParameter returns the string constant CHHapticPatternKeyParameter, for use as a dictionary key or argument.
func CHHapticPatternKeyParameterCurve ¶
CHHapticPatternKeyParameterCurve returns the string constant CHHapticPatternKeyParameterCurve, for use as a dictionary key or argument.
func CHHapticPatternKeyParameterCurveControlPoints ¶
CHHapticPatternKeyParameterCurveControlPoints returns the string constant CHHapticPatternKeyParameterCurveControlPoints, for use as a dictionary key or argument.
func CHHapticPatternKeyParameterID ¶
CHHapticPatternKeyParameterID returns the string constant CHHapticPatternKeyParameterID, for use as a dictionary key or argument.
func CHHapticPatternKeyParameterValue ¶
CHHapticPatternKeyParameterValue returns the string constant CHHapticPatternKeyParameterValue, for use as a dictionary key or argument.
func CHHapticPatternKeyPattern ¶
CHHapticPatternKeyPattern returns the string constant CHHapticPatternKeyPattern, for use as a dictionary key or argument.
func CHHapticPatternKeyTime ¶
CHHapticPatternKeyTime returns the string constant CHHapticPatternKeyTime, for use as a dictionary key or argument.
func CHHapticPatternKeyVersion ¶
CHHapticPatternKeyVersion returns the string constant CHHapticPatternKeyVersion, for use as a dictionary key or argument.
Types ¶
type HapticAdvancedPatternPlayer ¶ added in v0.17.0
type HapticAdvancedPatternPlayer interface {
PauseAtTimeError(time_ float64) bool
ResumeAtTimeError(time_ float64) bool
SeekToOffsetError(offsetTime float64) bool
LoopEnabled() bool
SetLoopEnabled(loopEnabled bool)
LoopEnd() float64
SetLoopEnd(loopEnd float64)
PlaybackRate() float32
SetPlaybackRate(playbackRate float32)
IsMuted() bool
SetIsMuted(isMuted bool)
CompletionHandler() obj.Object
SetCompletionHandler(completionHandler func(unsafe.Pointer))
}
HapticAdvancedPatternPlayer is the Go form of the Objective-C protocol CHHapticAdvancedPatternPlayer.
type HapticDeviceCapability ¶ added in v0.17.0
type HapticDeviceCapability interface {
}
HapticDeviceCapability is the Go form of the Objective-C protocol CHHapticDeviceCapability.
type HapticDynamicParameter ¶ added in v0.17.0
HapticDynamicParameter is an idiomatic wrapper over the Objective-C class CHHapticDynamicParameter.
A value that you send to a haptic pattern player to alter a property value during playback.
func HapticDynamicParameterFromID ¶ added in v0.17.0
func HapticDynamicParameterFromID(id objc.ID) *HapticDynamicParameter
HapticDynamicParameterFromID adopts an existing Objective-C object as a HapticDynamicParameter (nil for 0), retaining it and registering a release finalizer.
func NewHapticDynamicParameterWithParameterIDValueRelativeTime ¶ added in v0.17.0
func NewHapticDynamicParameterWithParameterIDValueRelativeTime(parameterID obj.Object, value float32, time_ float64) *HapticDynamicParameter
NewHapticDynamicParameterWithParameterIDValueRelativeTime creates a dynamic parameter from its ID, value, and start time.
func (*HapticDynamicParameter) Description ¶ added in v0.17.0
func (hdp *HapticDynamicParameter) Description() string
Description returns the object's -description text.
func (*HapticDynamicParameter) IsEqual ¶ added in v0.17.0
func (hdp *HapticDynamicParameter) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*HapticDynamicParameter) IsKind ¶ added in v0.17.0
func (hdp *HapticDynamicParameter) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*HapticDynamicParameter) ParameterID ¶ added in v0.17.0
func (hdp *HapticDynamicParameter) ParameterID() *foundation.String
ParameterID returns the parameter ID.
func (*HapticDynamicParameter) RelativeTime ¶ added in v0.17.0
func (hdp *HapticDynamicParameter) RelativeTime() float64
RelativeTime returns the relative time.
func (*HapticDynamicParameter) String ¶ added in v0.17.0
func (hdp *HapticDynamicParameter) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*HapticDynamicParameter) Value ¶ added in v0.17.0
func (hdp *HapticDynamicParameter) Value() float32
Value returns the value.
func (*HapticDynamicParameter) WithRelativeTime ¶ added in v0.17.0
func (hdp *HapticDynamicParameter) WithRelativeTime(relativeTime float64) *HapticDynamicParameter
WithRelativeTime sets the time at which this dynamic parameter is applied, relative to the start time of the pattern.
func (*HapticDynamicParameter) WithValue ¶ added in v0.17.0
func (hdp *HapticDynamicParameter) WithValue(value float32) *HapticDynamicParameter
WithValue sets the value of the dynamic parameter.
type HapticEngine ¶ added in v0.17.0
HapticEngine is an idiomatic wrapper over the Objective-C class CHHapticEngine.
An object that represents the connection to the haptic server.
func HapticEngineFromID ¶ added in v0.17.0
func HapticEngineFromID(id objc.ID) *HapticEngine
HapticEngineFromID adopts an existing Objective-C object as a HapticEngine (nil for 0), retaining it and registering a release finalizer.
func NewHapticEngine ¶ added in v0.17.0
func NewHapticEngine() *HapticEngine
NewHapticEngine creates a new HapticEngine.
func NewHapticEngineWithAudioSession ¶ added in v0.17.0
func NewHapticEngineWithAudioSession(audioSession obj.Object) (result *HapticEngine, err error)
NewHapticEngineWithAudioSession creates a haptic engine from an audio session.
func (*HapticEngine) CurrentTime ¶ added in v0.17.0
func (he *HapticEngine) CurrentTime() float64
CurrentTime returns the current time.
func (*HapticEngine) Description ¶ added in v0.17.0
func (he *HapticEngine) Description() string
Description returns the object's -description text.
func (*HapticEngine) IsAutoShutdownEnabled ¶ added in v0.17.0
func (he *HapticEngine) IsAutoShutdownEnabled() bool
IsAutoShutdownEnabled reports whether when auto shutdown is enabled, the haptic engine can start and stop the hardware dynamically, to conserve power. To conserve power, it is advised that the client stop the haptic engine when not in use. But when auto shutdown is enabled, the haptic engine will stop the hardware if it was running idle for a certain duration, and restart it later when required. Note that, because this operation is dynamic, it may affect the start times of the pattern players (e.g. `CHHapticPatternplayer`), if the engine has to resume from its shutdown state. This feature is disabled by default, but the client can enable it if needed.
func (*HapticEngine) IsEqual ¶ added in v0.17.0
func (he *HapticEngine) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*HapticEngine) IsKind ¶ added in v0.17.0
func (he *HapticEngine) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*HapticEngine) IsMutedForAudio ¶ added in v0.17.0
func (he *HapticEngine) IsMutedForAudio() bool
IsMutedForAudio reports whether default is false.
func (*HapticEngine) IsMutedForHaptics ¶ added in v0.17.0
func (he *HapticEngine) IsMutedForHaptics() bool
IsMutedForHaptics reports whether default is false.
func (*HapticEngine) NotifyWhenPlayersFinished ¶ added in v0.18.0
func (he *HapticEngine) NotifyWhenPlayersFinished(finishedHandler func(unsafe.Pointer) int)
NotifyWhenPlayersFinished notifies you when all haptic pattern players have finished playing their haptic patterns.
func (*HapticEngine) PlayPatternFromData ¶ added in v0.17.0
func (he *HapticEngine) PlayPatternFromData(data []byte) error
PlayPatternFromData plays a pattern from the specified data.
func (*HapticEngine) PlayPatternFromURL ¶ added in v0.17.0
func (he *HapticEngine) PlayPatternFromURL(fileURL string) error
PlayPatternFromURL plays a pattern that’s defined in a file at the specified URL.
func (*HapticEngine) PlaysAudioOnly ¶ added in v0.17.0
func (he *HapticEngine) PlaysAudioOnly() bool
PlaysAudioOnly reports whether this behavior change will only take effect after the engine is stopped and restarted. The default is false.
func (*HapticEngine) PlaysHapticsOnly ¶ added in v0.17.0
func (he *HapticEngine) PlaysHapticsOnly() bool
PlaysHapticsOnly reports whether this behavior change will only take effect after the engine is stopped and restarted. The default is false.
func (*HapticEngine) RegisterAudioResourceOptions ¶ added in v0.17.0
func (he *HapticEngine) RegisterAudioResourceOptions(resourceURL string, options obj.Object) (result int, err error)
RegisterAudioResourceOptions registers an external audio to use as a custom waveform.
func (*HapticEngine) StartAndReturnError ¶ added in v0.17.0
func (he *HapticEngine) StartAndReturnError() error
StartAndReturnError synchronously starts the haptic engine.
StartAndReturnError returns an error if the operation did not succeed.
func (*HapticEngine) StartWithCompletionHandler ¶ added in v0.18.0
func (he *HapticEngine) StartWithCompletionHandler(completionHandler func(unsafe.Pointer))
StartWithCompletionHandler asynchronously starts the haptic engine.
func (*HapticEngine) StopWithCompletionHandler ¶ added in v0.18.0
func (he *HapticEngine) StopWithCompletionHandler(completionHandler func(unsafe.Pointer))
StopWithCompletionHandler asynchronously stops the haptic engine and executes the completion handler once the engine has stopped.
func (*HapticEngine) String ¶ added in v0.17.0
func (he *HapticEngine) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*HapticEngine) UnregisterAudioResource ¶ added in v0.17.0
func (he *HapticEngine) UnregisterAudioResource(resourceID int) error
UnregisterAudioResource unregisters an external audio file that you previously registered with the engine.
func (*HapticEngine) WithAutoShutdownEnabled ¶ added in v0.17.0
func (he *HapticEngine) WithAutoShutdownEnabled(autoShutdownEnabled bool) *HapticEngine
WithAutoShutdownEnabled sets a Boolean value that indicates whether the haptic engine starts and stops automatically on request from one of its pattern players, or when idle.
func (*HapticEngine) WithIsMutedForAudio ¶ added in v0.17.0
func (he *HapticEngine) WithIsMutedForAudio(isMutedForAudio bool) *HapticEngine
WithIsMutedForAudio sets a Boolean value that indicates whether the engine mutes audio.
func (*HapticEngine) WithIsMutedForHaptics ¶ added in v0.17.0
func (he *HapticEngine) WithIsMutedForHaptics(isMutedForHaptics bool) *HapticEngine
WithIsMutedForHaptics sets a Boolean value that indicates whether the engine mutes haptics.
func (*HapticEngine) WithPlaysAudioOnly ¶ added in v0.17.0
func (he *HapticEngine) WithPlaysAudioOnly(playsAudioOnly bool) *HapticEngine
WithPlaysAudioOnly sets a Boolean value that indicates whether the engine ignores haptic events and plays audio events only.
func (*HapticEngine) WithPlaysHapticsOnly ¶ added in v0.17.0
func (he *HapticEngine) WithPlaysHapticsOnly(playsHapticsOnly bool) *HapticEngine
WithPlaysHapticsOnly sets a Boolean value that indicates whether the engine ignores audio events.
func (*HapticEngine) WithResetHandler ¶ added in v0.17.0
func (he *HapticEngine) WithResetHandler(resetHandler func()) *HapticEngine
WithResetHandler sets a block that the haptic engine calls after recovering from a haptic server error.
func (*HapticEngine) WithStoppedHandler ¶ added in v0.18.0
func (he *HapticEngine) WithStoppedHandler(stoppedHandler func(HapticEngineStoppedReason)) *HapticEngine
WithStoppedHandler sets a closure the haptic engine calls when it stops due to external causes.
type HapticEngineFinishedAction ¶ added in v0.17.0
type HapticEngineFinishedAction int64
Possible actions to take after the haptic engine finishes execution.
const ( HapticEngineFinishedActionStopEngine HapticEngineFinishedAction = 1 HapticEngineFinishedActionLeaveEngineRunning HapticEngineFinishedAction = 2 )
func (HapticEngineFinishedAction) String ¶ added in v0.17.0
func (e HapticEngineFinishedAction) String() string
String returns the HapticEngineFinishedAction constant's name, or its numeric form when the value is not a known constant.
type HapticEngineStoppedReason ¶ added in v0.17.0
type HapticEngineStoppedReason int64
The enumeration of reasons the haptic engine stopped running.
const ( HapticEngineStoppedReasonAudioSessionInterrupt HapticEngineStoppedReason = 1 HapticEngineStoppedReasonApplicationSuspended HapticEngineStoppedReason = 2 HapticEngineStoppedReasonIdleTimeout HapticEngineStoppedReason = 3 HapticEngineStoppedReasonNotifyWhenFinished HapticEngineStoppedReason = 4 HapticEngineStoppedReasonEngineDestroyed HapticEngineStoppedReason = 5 HapticEngineStoppedReasonGameControllerDisconnect HapticEngineStoppedReason = 6 HapticEngineStoppedReasonSystemError HapticEngineStoppedReason = -1 )
func (HapticEngineStoppedReason) String ¶ added in v0.17.0
func (e HapticEngineStoppedReason) String() string
String returns the HapticEngineStoppedReason constant's name, or its numeric form when the value is not a known constant.
type HapticErrorCode ¶ added in v0.17.0
type HapticErrorCode int64
Error codes for framework operations.
const ( HapticErrorCodeEngineNotRunning HapticErrorCode = -4805 HapticErrorCodeOperationNotPermitted HapticErrorCode = -4806 HapticErrorCodeEngineStartTimeout HapticErrorCode = -4808 HapticErrorCodeNotSupported HapticErrorCode = -4809 HapticErrorCodeServerInitFailed HapticErrorCode = -4810 HapticErrorCodeServerInterrupted HapticErrorCode = -4811 HapticErrorCodeInvalidPatternPlayer HapticErrorCode = -4812 HapticErrorCodeInvalidPatternData HapticErrorCode = -4813 HapticErrorCodeInvalidPatternDictionary HapticErrorCode = -4814 HapticErrorCodeInvalidAudioSession HapticErrorCode = -4815 HapticErrorCodeInvalidEngineParameter HapticErrorCode = -4816 HapticErrorCodeInvalidParameterType HapticErrorCode = -4820 HapticErrorCodeInvalidEventType HapticErrorCode = -4821 HapticErrorCodeInvalidEventTime HapticErrorCode = -4822 HapticErrorCodeInvalidEventDuration HapticErrorCode = -4823 HapticErrorCodeInvalidAudioResource HapticErrorCode = -4824 HapticErrorCodeResourceNotAvailable HapticErrorCode = -4825 HapticErrorCodeBadEventEntry HapticErrorCode = -4830 HapticErrorCodeBadParameterEntry HapticErrorCode = -4831 HapticErrorCodeInvalidTime HapticErrorCode = -4840 HapticErrorCodeFileNotFound HapticErrorCode = -4851 HapticErrorCodeInsufficientPower HapticErrorCode = -4897 HapticErrorCodeUnknownError HapticErrorCode = -4898 HapticErrorCodeMemoryError HapticErrorCode = -4899 )
func (HapticErrorCode) String ¶ added in v0.17.0
func (e HapticErrorCode) String() string
String returns the HapticErrorCode constant's name, or its numeric form when the value is not a known constant.
type HapticEvent ¶ added in v0.17.0
HapticEvent is an idiomatic wrapper over the Objective-C class CHHapticEvent.
An object that describes a single haptic or audio event.
func HapticEventFromID ¶ added in v0.17.0
func HapticEventFromID(id objc.ID) *HapticEvent
HapticEventFromID adopts an existing Objective-C object as a HapticEvent (nil for 0), retaining it and registering a release finalizer.
func NewHapticEventWithAudioResourceIDParametersRelativeTime ¶ added in v0.17.0
func NewHapticEventWithAudioResourceIDParametersRelativeTime(resID int, eventParams []*HapticEventParameter, time_ float64) *HapticEvent
NewHapticEventWithAudioResourceIDParametersRelativeTime initializes a haptic event from a previously loaded audio resource, specifying event parameters and start time.
func NewHapticEventWithAudioResourceIDParametersRelativeTimeDuration ¶ added in v0.17.0
func NewHapticEventWithAudioResourceIDParametersRelativeTimeDuration(resID int, eventParams []*HapticEventParameter, time_ float64, duration float64) *HapticEvent
NewHapticEventWithAudioResourceIDParametersRelativeTimeDuration initializes a haptic event from a previously loaded audio resource, specifying event parameters, start time, and duration.
func NewHapticEventWithEventTypeParametersRelativeTime ¶ added in v0.17.0
func NewHapticEventWithEventTypeParametersRelativeTime(type_ obj.Object, eventParams []*HapticEventParameter, time_ float64) *HapticEvent
NewHapticEventWithEventTypeParametersRelativeTime initializes a haptic event of the specified type, parameters, and start time.
func NewHapticEventWithEventTypeParametersRelativeTimeDuration ¶ added in v0.17.0
func NewHapticEventWithEventTypeParametersRelativeTimeDuration(type_ obj.Object, eventParams []*HapticEventParameter, time_ float64, duration float64) *HapticEvent
NewHapticEventWithEventTypeParametersRelativeTimeDuration initializes a haptic event of the specified type, parameters, start time, and duration.
func (*HapticEvent) Description ¶ added in v0.17.0
func (he *HapticEvent) Description() string
Description returns the object's -description text.
func (*HapticEvent) Duration ¶ added in v0.17.0
func (he *HapticEvent) Duration() float64
Duration returns the duration.
func (*HapticEvent) EventParameters ¶ added in v0.17.0
func (he *HapticEvent) EventParameters() []*HapticEventParameter
EventParameters returns the event parameters.
EventParameters returns the collection as a Go slice.
func (*HapticEvent) IsEqual ¶ added in v0.17.0
func (he *HapticEvent) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*HapticEvent) IsKind ¶ added in v0.17.0
func (he *HapticEvent) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*HapticEvent) RelativeTime ¶ added in v0.17.0
func (he *HapticEvent) RelativeTime() float64
RelativeTime returns the relative time.
func (*HapticEvent) String ¶ added in v0.17.0
func (he *HapticEvent) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*HapticEvent) Type ¶ added in v0.17.0
func (he *HapticEvent) Type() *foundation.String
Type returns the type.
func (*HapticEvent) WithDuration ¶ added in v0.17.0
func (he *HapticEvent) WithDuration(duration float64) *HapticEvent
WithDuration sets the duration of the haptic event.
func (*HapticEvent) WithRelativeTime ¶ added in v0.17.0
func (he *HapticEvent) WithRelativeTime(relativeTime float64) *HapticEvent
WithRelativeTime sets the start time of the event, relative to other events in the same pattern.
type HapticEventParameter ¶ added in v0.17.0
HapticEventParameter is an idiomatic wrapper over the Objective-C class CHHapticEventParameter.
A static parameter value that represents a single property of the haptic pattern.
func HapticEventParameterFromID ¶ added in v0.17.0
func HapticEventParameterFromID(id objc.ID) *HapticEventParameter
HapticEventParameterFromID adopts an existing Objective-C object as a HapticEventParameter (nil for 0), retaining it and registering a release finalizer.
func NewHapticEventParameterWithParameterIDValue ¶ added in v0.17.0
func NewHapticEventParameterWithParameterIDValue(parameterID obj.Object, value float32) *HapticEventParameter
NewHapticEventParameterWithParameterIDValue creates a haptic event parameter from its ID and value.
func (*HapticEventParameter) Description ¶ added in v0.17.0
func (hep *HapticEventParameter) Description() string
Description returns the object's -description text.
func (*HapticEventParameter) IsEqual ¶ added in v0.17.0
func (hep *HapticEventParameter) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*HapticEventParameter) IsKind ¶ added in v0.17.0
func (hep *HapticEventParameter) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*HapticEventParameter) ParameterID ¶ added in v0.17.0
func (hep *HapticEventParameter) ParameterID() *foundation.String
ParameterID returns the parameter ID.
func (*HapticEventParameter) String ¶ added in v0.17.0
func (hep *HapticEventParameter) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*HapticEventParameter) Value ¶ added in v0.17.0
func (hep *HapticEventParameter) Value() float32
Value returns the value.
func (*HapticEventParameter) WithValue ¶ added in v0.17.0
func (hep *HapticEventParameter) WithValue(value float32) *HapticEventParameter
WithValue sets the value of the parameter.
type HapticParameterAttributes ¶ added in v0.17.0
type HapticParameterAttributes interface {
MinValue() float32
MaxValue() float32
DefaultValue() float32
}
HapticParameterAttributes is the Go form of the Objective-C protocol CHHapticParameterAttributes.
type HapticParameterCurve ¶ added in v0.17.0
HapticParameterCurve is an idiomatic wrapper over the Objective-C class CHHapticParameterCurve.
A curve that you send to a haptic pattern player to alter a property value gradually during playback.
func HapticParameterCurveFromID ¶ added in v0.17.0
func HapticParameterCurveFromID(id objc.ID) *HapticParameterCurve
HapticParameterCurveFromID adopts an existing Objective-C object as a HapticParameterCurve (nil for 0), retaining it and registering a release finalizer.
func NewHapticParameterCurveWithParameterIDControlPointsRelativeTime ¶ added in v0.17.0
func NewHapticParameterCurveWithParameterIDControlPointsRelativeTime(parameterID obj.Object, controlPoints []*HapticParameterCurveControlPoint, relativeTime float64) *HapticParameterCurve
NewHapticParameterCurveWithParameterIDControlPointsRelativeTime creates a parameter curve from its parameter ID, control points, and start time.
func (*HapticParameterCurve) ControlPoints ¶ added in v0.17.0
func (hpc *HapticParameterCurve) ControlPoints() []*HapticParameterCurveControlPoint
ControlPoints returns the control points.
ControlPoints returns the collection as a Go slice.
func (*HapticParameterCurve) Description ¶ added in v0.17.0
func (hpc *HapticParameterCurve) Description() string
Description returns the object's -description text.
func (*HapticParameterCurve) IsEqual ¶ added in v0.17.0
func (hpc *HapticParameterCurve) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*HapticParameterCurve) IsKind ¶ added in v0.17.0
func (hpc *HapticParameterCurve) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*HapticParameterCurve) ParameterID ¶ added in v0.17.0
func (hpc *HapticParameterCurve) ParameterID() *foundation.String
ParameterID returns the parameter ID.
func (*HapticParameterCurve) RelativeTime ¶ added in v0.17.0
func (hpc *HapticParameterCurve) RelativeTime() float64
RelativeTime returns the relative time.
func (*HapticParameterCurve) String ¶ added in v0.17.0
func (hpc *HapticParameterCurve) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*HapticParameterCurve) WithRelativeTime ¶ added in v0.17.0
func (hpc *HapticParameterCurve) WithRelativeTime(relativeTime float64) *HapticParameterCurve
WithRelativeTime sets the time at which this parameter curve is applied, relative to the start time of the pattern.
type HapticParameterCurveControlPoint ¶ added in v0.17.0
HapticParameterCurveControlPoint is an idiomatic wrapper over the Objective-C class CHHapticParameterCurveControlPoint.
A single control point in a parameter curve.
func HapticParameterCurveControlPointFromID ¶ added in v0.17.0
func HapticParameterCurveControlPointFromID(id objc.ID) *HapticParameterCurveControlPoint
HapticParameterCurveControlPointFromID adopts an existing Objective-C object as a HapticParameterCurveControlPoint (nil for 0), retaining it and registering a release finalizer.
func NewHapticParameterCurveControlPointWithRelativeTimeValue ¶ added in v0.17.0
func NewHapticParameterCurveControlPointWithRelativeTimeValue(time_ float64, value float32) *HapticParameterCurveControlPoint
NewHapticParameterCurveControlPointWithRelativeTimeValue initialize a CHHapticParameterCurveControlPoint with a relative time and value.
func (*HapticParameterCurveControlPoint) Description ¶ added in v0.17.0
func (hpccp *HapticParameterCurveControlPoint) Description() string
Description returns the object's -description text.
func (*HapticParameterCurveControlPoint) IsEqual ¶ added in v0.17.0
func (hpccp *HapticParameterCurveControlPoint) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*HapticParameterCurveControlPoint) IsKind ¶ added in v0.17.0
func (hpccp *HapticParameterCurveControlPoint) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*HapticParameterCurveControlPoint) RelativeTime ¶ added in v0.17.0
func (hpccp *HapticParameterCurveControlPoint) RelativeTime() float64
RelativeTime returns the relative time.
func (*HapticParameterCurveControlPoint) String ¶ added in v0.17.0
func (hpccp *HapticParameterCurveControlPoint) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*HapticParameterCurveControlPoint) Value ¶ added in v0.17.0
func (hpccp *HapticParameterCurveControlPoint) Value() float32
Value returns the value.
func (*HapticParameterCurveControlPoint) WithRelativeTime ¶ added in v0.17.0
func (hpccp *HapticParameterCurveControlPoint) WithRelativeTime(relativeTime float64) *HapticParameterCurveControlPoint
WithRelativeTime sets the relative time.
func (*HapticParameterCurveControlPoint) WithValue ¶ added in v0.17.0
func (hpccp *HapticParameterCurveControlPoint) WithValue(value float32) *HapticParameterCurveControlPoint
WithValue sets the value.
type HapticPattern ¶ added in v0.17.0
HapticPattern is an idiomatic wrapper over the Objective-C class CHHapticPattern.
An object representing a haptic waveform.
func HapticPatternFromID ¶ added in v0.17.0
func HapticPatternFromID(id objc.ID) *HapticPattern
HapticPatternFromID adopts an existing Objective-C object as a HapticPattern (nil for 0), retaining it and registering a release finalizer.
func NewHapticPatternWithContentsOfURL ¶ added in v0.17.0
func NewHapticPatternWithContentsOfURL(ahapURL string) (result *HapticPattern, err error)
NewHapticPatternWithContentsOfURL creates a haptic pattern with the contents of an AHAP file.
func NewHapticPatternWithDictionary ¶ added in v0.17.0
func NewHapticPatternWithDictionary(patternDict obj.Object) (result *HapticPattern, err error)
NewHapticPatternWithDictionary creates a haptic pattern from a property list dictionary.
func NewHapticPatternWithEventsParameterCurves ¶ added in v0.17.0
func NewHapticPatternWithEventsParameterCurves(events []*HapticEvent, parameterCurves []*HapticParameterCurve) (result *HapticPattern, err error)
NewHapticPatternWithEventsParameterCurves constructs a haptic pattern from a series of events and parameter curves.
func NewHapticPatternWithEventsParameters ¶ added in v0.17.0
func NewHapticPatternWithEventsParameters(events []*HapticEvent, parameters []*HapticDynamicParameter) (result *HapticPattern, err error)
NewHapticPatternWithEventsParameters constructs a haptic pattern from a series of events and parameters.
func (*HapticPattern) Description ¶ added in v0.17.0
func (hp *HapticPattern) Description() string
Description returns the object's -description text.
func (*HapticPattern) Duration ¶ added in v0.17.0
func (hp *HapticPattern) Duration() float64
Duration returns the duration.
func (*HapticPattern) ExportDictionary ¶ added in v0.17.0
func (hp *HapticPattern) ExportDictionary() (result obj.Object, err error)
ExportDictionary returns the dictionary representation of the haptic pattern.
func (*HapticPattern) IsEqual ¶ added in v0.17.0
func (hp *HapticPattern) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*HapticPattern) IsKind ¶ added in v0.17.0
func (hp *HapticPattern) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*HapticPattern) String ¶ added in v0.17.0
func (hp *HapticPattern) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type HapticPatternPlayer ¶ added in v0.17.0
type HapticPatternPlayer interface {
StartAtTimeError(time_ float64) bool
StopAtTimeError(time_ float64) bool
SendParametersAtTimeError(parameters []*HapticDynamicParameter, time_ float64) bool
ScheduleParameterCurveAtTimeError(parameterCurve *HapticParameterCurve, time_ float64) bool
CancelAndReturnError() bool
IsMuted() bool
SetIsMuted(isMuted bool)
}
HapticPatternPlayer is the Go form of the Objective-C protocol CHHapticPatternPlayer.
type PtrauthKey ¶ added in v0.17.0
type PtrauthKey int32
const ( Ptrauth_key_none PtrauthKey = -1 Ptrauth_key_asia PtrauthKey = 0 Ptrauth_key_asib PtrauthKey = 1 Ptrauth_key_asda PtrauthKey = 2 Ptrauth_key_asdb PtrauthKey = 3 Ptrauth_key_process_independent_code PtrauthKey = 0 Ptrauth_key_process_dependent_code PtrauthKey = 1 Ptrauth_key_process_independent_data PtrauthKey = 2 Ptrauth_key_process_dependent_data PtrauthKey = 3 Ptrauth_key_return_address PtrauthKey = 1 Ptrauth_key_frame_pointer PtrauthKey = 3 Ptrauth_key_function_pointer PtrauthKey = 0 Ptrauth_key_block_function PtrauthKey = 0 Ptrauth_key_cxx_vtable_pointer PtrauthKey = 2 Ptrauth_key_method_list_pointer PtrauthKey = 2 Ptrauth_key_objc_isa_pointer PtrauthKey = 2 Ptrauth_key_objc_super_pointer PtrauthKey = 2 Ptrauth_key_objc_sel_pointer PtrauthKey = 3 Ptrauth_key_objc_class_ro_pointer PtrauthKey = 2 Ptrauth_key_block_descriptor_pointer PtrauthKey = 2 Ptrauth_key_init_fini_pointer PtrauthKey = 0 )
func (PtrauthKey) String ¶ added in v0.17.0
func (e PtrauthKey) String() string
String returns the PtrauthKey constant's name, or its numeric form when the value is not a known constant.
Source Files
¶
- CHHapticDynamicParameter_generated.go
- CHHapticEngine_generated.go
- CHHapticEventParameter_generated.go
- CHHapticEvent_generated.go
- CHHapticParameterCurveControlPoint_generated.go
- CHHapticParameterCurve_generated.go
- CHHapticPattern_generated.go
- corehaptics_constants_generated.go
- corehaptics_enums_generated.go
- corehaptics_errors_generated.go
- corehaptics_protocols_generated.go
- corehaptics_runtime_generated.go
- doc.go