Package apple.corehaptics
Class CHHapticEngine
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.corehaptics.CHHapticEngine
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCHHapticEngine.Block_notifyWhenPlayersFinishedstatic interfaceCHHapticEngine.Block_resetHandler_retstatic interfaceCHHapticEngine.Block_setResetHandlerstatic interfaceCHHapticEngine.Block_setStoppedHandlerstatic interfaceCHHapticEngine.Block_startWithCompletionHandlerstatic interfaceCHHapticEngine.Block_stoppedHandler_retstatic interfaceCHHapticEngine.Block_stopWithCompletionHandler-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Block_accessibilityActivateBlock_ret, NSObject.Block_accessibilityActivationPointBlock_ret, NSObject.Block_accessibilityAttributedHintBlock_ret, NSObject.Block_accessibilityAttributedLabelBlock_ret, NSObject.Block_accessibilityAttributedUserInputLabelsBlock_ret, NSObject.Block_accessibilityAttributedValueBlock_ret, NSObject.Block_accessibilityContainerTypeBlock_ret, NSObject.Block_accessibilityCustomActionsBlock_ret, NSObject.Block_accessibilityCustomRotorsBlock_ret, NSObject.Block_accessibilityDecrementBlock_ret, NSObject.Block_accessibilityElementsBlock_ret, NSObject.Block_accessibilityElementsHiddenBlock_ret, NSObject.Block_accessibilityFrameBlock_ret, NSObject.Block_accessibilityHeaderElementsBlock_ret, NSObject.Block_accessibilityHintBlock_ret, NSObject.Block_accessibilityIdentifierBlock_ret, NSObject.Block_accessibilityIncrementBlock_ret, NSObject.Block_accessibilityLabelBlock_ret, NSObject.Block_accessibilityLanguageBlock_ret, NSObject.Block_accessibilityMagicTapBlock_ret, NSObject.Block_accessibilityNavigationStyleBlock_ret, NSObject.Block_accessibilityPathBlock_ret, NSObject.Block_accessibilityPerformEscapeBlock_ret, NSObject.Block_accessibilityRespondsToUserInteractionBlock_ret, NSObject.Block_accessibilityShouldGroupAccessibilityChildrenBlock_ret, NSObject.Block_accessibilityTextualContextBlock_ret, NSObject.Block_accessibilityTraitsBlock_ret, NSObject.Block_accessibilityUserInputLabelsBlock_ret, NSObject.Block_accessibilityValueBlock_ret, NSObject.Block_accessibilityViewIsModalBlock_ret, NSObject.Block_automationElementsBlock_ret, NSObject.Block_isAccessibilityElementBlock_ret, NSObject.Block_setAccessibilityActivateBlock, NSObject.Block_setAccessibilityActivationPointBlock, NSObject.Block_setAccessibilityAttributedHintBlock, NSObject.Block_setAccessibilityAttributedLabelBlock, NSObject.Block_setAccessibilityAttributedUserInputLabelsBlock, NSObject.Block_setAccessibilityAttributedValueBlock, NSObject.Block_setAccessibilityContainerTypeBlock, NSObject.Block_setAccessibilityCustomActionsBlock, NSObject.Block_setAccessibilityCustomRotorsBlock, NSObject.Block_setAccessibilityDecrementBlock, NSObject.Block_setAccessibilityElementsBlock, NSObject.Block_setAccessibilityElementsHiddenBlock, NSObject.Block_setAccessibilityFrameBlock, NSObject.Block_setAccessibilityHeaderElementsBlock, NSObject.Block_setAccessibilityHintBlock, NSObject.Block_setAccessibilityIdentifierBlock, NSObject.Block_setAccessibilityIncrementBlock, NSObject.Block_setAccessibilityLabelBlock, NSObject.Block_setAccessibilityLanguageBlock, NSObject.Block_setAccessibilityMagicTapBlock, NSObject.Block_setAccessibilityNavigationStyleBlock, NSObject.Block_setAccessibilityPathBlock, NSObject.Block_setAccessibilityPerformEscapeBlock, NSObject.Block_setAccessibilityRespondsToUserInteractionBlock, NSObject.Block_setAccessibilityShouldGroupAccessibilityChildrenBlock, NSObject.Block_setAccessibilityTextualContextBlock, NSObject.Block_setAccessibilityTraitsBlock, NSObject.Block_setAccessibilityUserInputLabelsBlock, NSObject.Block_setAccessibilityValueBlock, NSObject.Block_setAccessibilityViewIsModalBlock, NSObject.Block_setAutomationElementsBlock, NSObject.Block_setIsAccessibilityElementBlock, NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCHHapticEngine(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static CHHapticEnginealloc()static CHHapticEngineallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(@NotNull java.lang.String key)static voidcancelPreviousPerformRequestsWithTarget(@NotNull java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull java.lang.Object aTarget, @NotNull org.moe.natj.objc.SEL aSelector, @Nullable java.lang.Object anArgument)static @NotNull CHHapticDeviceCapabilitycapabilitiesForHardware()capabilitiesForHardware Get the protocol that describes haptic and audio capabilities on this device.static @NotNull NSArray<java.lang.String>classFallbacksForKeyedArchiver()static @NotNull org.moe.natj.objc.ClassclassForKeyedUnarchiver()@Nullable CHHapticAdvancedPatternPlayercreateAdvancedPlayerWithPatternError(@NotNull CHHapticPattern pattern, @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)createAdvancedPlayerWithPattern:error Factory method for creating a CHHapticAdvancedPatternPlayer from a CHHapticPattern.@Nullable CHHapticPatternPlayercreatePlayerWithPatternError(@NotNull CHHapticPattern pattern, @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)createPlayerWithPattern:error Factory method for creating a CHHapticPatternPlayer from a CHHapticPattern.doublecurrentTime()[@property] currentTime The absolute time from which all current and future event times may be calculated.static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()static longhash_static()CHHapticEngineinit()CHHapticEngineinitAndReturnError(@Nullable org.moe.natj.general.ptr.Ptr<NSError> error)initAndReturnError: Create an instance of the CHHapticEngine.CHHapticEngineinitWithAudioSessionError(@Nullable AVAudioSession audioSession, @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)initWithAudioSession:error Create an instance of an CHHapticEngine and associate it with an audio session.static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)booleanisAutoShutdownEnabled()[@property] autoShutdownEnabled When auto shutdown is enabled, the haptic engine can start and stop the hardware dynamically, to conserve power.booleanisMutedForAudio()[@property] isMutedForAudio When set to YES, the CHHapticEngine mutes audio playback from its players.booleanisMutedForHaptics()[@property] isMutedForHaptics When set to YES, the CHHapticEngine mutes haptic playback from its players.static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static @NotNull NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(@NotNull java.lang.String key)static CHHapticEnginenew_objc()voidnotifyWhenPlayersFinished(@NotNull CHHapticEngine.Block_notifyWhenPlayersFinished finishedHandler)notifyWhenPlayersFinished: Tell the engine to asynchronously call the passed-in handler when all active pattern players associated with this engine have stopped.booleanplayPatternFromDataError(@NotNull NSData data, @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)playPatternFromData:error Simple one-shot call to play a pattern specified by NSData.booleanplayPatternFromURLError(@NotNull NSURL fileURL, @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)playPatternFromURL:error Simple one-shot call to play a pattern specified by a URL.booleanplaysAudioOnly()[@property] playsAudioOnly If set to YES, the CHHapticEngine will ignore all events of type CHHapticEventTypeHaptic and play only audio events.booleanplaysHapticsOnly()[@property] playsHapticsOnly If set to YES, the CHHapticEngine will ignore all events of type CHHapticEventTypeAudio and play only haptic events.longregisterAudioResourceOptionsError(@NotNull NSURL resourceURL, @NotNull NSDictionary<?,?> options, @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)registerAudioResource:options:error Register an external audio file for use as a custom waveform.@NotNull CHHapticEngine.Block_resetHandler_retresetHandler()[@property] resetHandler This block will called asynchronously if the haptic engine has to reset itself after a server failure.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsetAutoShutdownEnabled(boolean value)[@property] autoShutdownEnabled When auto shutdown is enabled, the haptic engine can start and stop the hardware dynamically, to conserve power.voidsetIsMutedForAudio(boolean value)[@property] isMutedForAudio When set to YES, the CHHapticEngine mutes audio playback from its players.voidsetIsMutedForHaptics(boolean value)[@property] isMutedForHaptics When set to YES, the CHHapticEngine mutes haptic playback from its players.voidsetPlaysAudioOnly(boolean value)[@property] playsAudioOnly If set to YES, the CHHapticEngine will ignore all events of type CHHapticEventTypeHaptic and play only audio events.voidsetPlaysHapticsOnly(boolean value)[@property] playsHapticsOnly If set to YES, the CHHapticEngine will ignore all events of type CHHapticEventTypeAudio and play only haptic events.voidsetResetHandler(@NotNull CHHapticEngine.Block_setResetHandler value)[@property] resetHandler This block will called asynchronously if the haptic engine has to reset itself after a server failure.voidsetStoppedHandler(@NotNull CHHapticEngine.Block_setStoppedHandler value)[@property] stoppedHandler The engine will call this block when it has stopped due to external causes (such as an audio session interruption or the app going into the background).static voidsetVersion_static(long aVersion)booleanstartAndReturnError(@Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)startAndReturnError: Start the engine and block until the engine has started.voidstartWithCompletionHandler(@Nullable CHHapticEngine.Block_startWithCompletionHandler completionHandler)startWithCompletionHandler: Asynchronously start the engine.@NotNull CHHapticEngine.Block_stoppedHandler_retstoppedHandler()[@property] stoppedHandler The engine will call this block when it has stopped due to external causes (such as an audio session interruption or the app going into the background).voidstopWithCompletionHandler(@Nullable CHHapticEngine.Block_stopWithCompletionHandler completionHandler)stopWithCompletionHandler: Asynchronously stop the engine.static org.moe.natj.objc.Classsuperclass_static()booleanunregisterAudioResourceError(long resourceID, @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)unregisterAudioResource:error Unregister and remove a previously-registered audio resource.static booleanuseStoredAccessor()Deprecated.static longversion_static()-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivateBlock, accessibilityActivationPoint, accessibilityActivationPointBlock, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedHintBlock, accessibilityAttributedLabel, accessibilityAttributedLabelBlock, accessibilityAttributedUserInputLabels, accessibilityAttributedUserInputLabelsBlock, accessibilityAttributedValue, accessibilityAttributedValueBlock, accessibilityContainerType, accessibilityContainerTypeBlock, accessibilityCustomActions, accessibilityCustomActionsBlock, accessibilityCustomRotors, accessibilityCustomRotorsBlock, accessibilityDecrement, accessibilityDecrementBlock, accessibilityDirectTouchOptions, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsBlock, accessibilityElementsHidden, accessibilityElementsHiddenBlock, accessibilityFrame, accessibilityFrameBlock, accessibilityHeaderElementsBlock, accessibilityHint, accessibilityHintBlock, accessibilityIdentifierBlock, accessibilityIncrement, accessibilityIncrementBlock, accessibilityLabel, accessibilityLabelBlock, accessibilityLanguage, accessibilityLanguageBlock, accessibilityMagicTapBlock, accessibilityNavigationStyle, accessibilityNavigationStyleBlock, accessibilityPath, accessibilityPathBlock, accessibilityPerformEscape, accessibilityPerformEscapeBlock, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityRespondsToUserInteractionBlock, accessibilityScroll, accessibilityShouldGroupAccessibilityChildrenBlock, accessibilityTextualContext, accessibilityTextualContextBlock, accessibilityTraits, accessibilityTraitsBlock, accessibilityUserInputLabels, accessibilityUserInputLabelsBlock, accessibilityValue, accessibilityValueBlock, accessibilityViewIsModal, accessibilityViewIsModalBlock, accessibilityZoomInAtPoint, accessibilityZoomOutAtPoint, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, automationElements, automationElementsBlock, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hash, indexOfAccessibilityElement, isAccessibilityElement, isAccessibilityElementBlock, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivateBlock, setAccessibilityActivationPoint, setAccessibilityActivationPointBlock, setAccessibilityAttributedHint, setAccessibilityAttributedHintBlock, setAccessibilityAttributedLabel, setAccessibilityAttributedLabelBlock, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedUserInputLabelsBlock, setAccessibilityAttributedValue, setAccessibilityAttributedValueBlock, setAccessibilityContainerType, setAccessibilityContainerTypeBlock, setAccessibilityCustomActions, setAccessibilityCustomActionsBlock, setAccessibilityCustomRotors, setAccessibilityCustomRotorsBlock, setAccessibilityDecrementBlock, setAccessibilityDirectTouchOptions, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsBlock, setAccessibilityElementsHidden, setAccessibilityElementsHiddenBlock, setAccessibilityFrame, setAccessibilityFrameBlock, setAccessibilityHeaderElementsBlock, setAccessibilityHint, setAccessibilityHintBlock, setAccessibilityIdentifierBlock, setAccessibilityIncrementBlock, setAccessibilityLabel, setAccessibilityLabelBlock, setAccessibilityLanguage, setAccessibilityLanguageBlock, setAccessibilityMagicTapBlock, setAccessibilityNavigationStyle, setAccessibilityNavigationStyleBlock, setAccessibilityPath, setAccessibilityPathBlock, setAccessibilityPerformEscapeBlock, setAccessibilityRespondsToUserInteraction, setAccessibilityRespondsToUserInteractionBlock, setAccessibilityShouldGroupAccessibilityChildrenBlock, setAccessibilityTextualContext, setAccessibilityTextualContextBlock, setAccessibilityTraits, setAccessibilityTraitsBlock, setAccessibilityUserInputLabels, setAccessibilityUserInputLabelsBlock, setAccessibilityValue, setAccessibilityValueBlock, setAccessibilityViewIsModal, setAccessibilityViewIsModalBlock, setAutomationElements, setAutomationElementsBlock, setIsAccessibilityElement, setIsAccessibilityElementBlock, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, storedValueForKey, superclass, takeStoredValueForKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, unableToSetNilForKey, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, valuesForKeys, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static CHHapticEngine alloc()
-
allocWithZone
public static CHHapticEngine allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(@NotNull @NotNull java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(@NotNull @NotNull java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull @NotNull java.lang.Object aTarget, @NotNull @NotNull org.moe.natj.objc.SEL aSelector, @Nullable @Nullable java.lang.Object anArgument)
-
capabilitiesForHardware
@NotNull public static @NotNull CHHapticDeviceCapability capabilitiesForHardware()
capabilitiesForHardware Get the protocol that describes haptic and audio capabilities on this device. Detailed description on the capability protocol is in CHHapticDeviceCapability.h.
-
classFallbacksForKeyedArchiver
@NotNull public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
@NotNull public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
-
createAdvancedPlayerWithPatternError
@Nullable public @Nullable CHHapticAdvancedPatternPlayer createAdvancedPlayerWithPatternError(@NotNull @NotNull CHHapticPattern pattern, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)
createAdvancedPlayerWithPattern:error Factory method for creating a CHHapticAdvancedPatternPlayer from a CHHapticPattern.- Parameters:
pattern- The pattern to be played.
-
createPlayerWithPatternError
@Nullable public @Nullable CHHapticPatternPlayer createPlayerWithPatternError(@NotNull @NotNull CHHapticPattern pattern, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)
createPlayerWithPattern:error Factory method for creating a CHHapticPatternPlayer from a CHHapticPattern.- Parameters:
pattern- The pattern to be played.
-
currentTime
public double currentTime()
[@property] currentTime The absolute time from which all current and future event times may be calculated. The units are seconds.
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
hash_static
public static long hash_static()
-
init
public CHHapticEngine init()
-
initAndReturnError
public CHHapticEngine initAndReturnError(@Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
initAndReturnError: Create an instance of the CHHapticEngine. More than one instance may exist within a process. Each will function independently of the others. CHHapticEngines created using this method will be associated with the device's internal haptics hardware system, if one exists. For systems without internal haptics, this method will fail with the error `CHHapticErrorCodeNotSupported`. To access engine instances associated with external game controllers, see the GameController framework documentation for the `hapticEngines` property on the GCController class.
-
initWithAudioSessionError
public CHHapticEngine initWithAudioSessionError(@Nullable @Nullable AVAudioSession audioSession, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
initWithAudioSession:error Create an instance of an CHHapticEngine and associate it with an audio session. If 'audioSession' is nil, the engine will create its own. More than one instance may exist within a process. Each will function independently of the others, but all CHHapticEngines which share an audio session will have identical audio behavior with regard to interruptions, etc. CHHapticEngines created using this method will be associated with the device's internal haptics hardware system, if one exists. For systems without internal haptics, this method will fail with the error `CHHapticErrorCodeNotSupported`. To access engine instances associated with external game controllers, see the GameController framework documentation for the `hapticEngines` property on the GCController class.
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isAutoShutdownEnabled
public boolean isAutoShutdownEnabled()
[@property] autoShutdownEnabled 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.
-
isMutedForAudio
public boolean isMutedForAudio()
[@property] isMutedForAudio When set to YES, the CHHapticEngine mutes audio playback from its players. Default is NO.
-
isMutedForHaptics
public boolean isMutedForHaptics()
[@property] isMutedForHaptics When set to YES, the CHHapticEngine mutes haptic playback from its players. Default is NO.
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
@NotNull public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(@NotNull @NotNull java.lang.String key)
-
new_objc
public static CHHapticEngine new_objc()
-
notifyWhenPlayersFinished
public void notifyWhenPlayersFinished(@NotNull @NotNull CHHapticEngine.Block_notifyWhenPlayersFinished finishedHandler)notifyWhenPlayersFinished: Tell the engine to asynchronously call the passed-in handler when all active pattern players associated with this engine have stopped. If additional players are started after this call is made, they will delay the callback. If no players are active or the engine is stopped, the callback will happen immediately.- Parameters:
finishedHandler- The block that will be called asynchronously. The return value of this block determines the action the engine will take when the block finishes (see `CHHapticEngineFinishedHandler`).
-
playPatternFromDataError
public boolean playPatternFromDataError(@NotNull @NotNull NSData data, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)playPatternFromData:error Simple one-shot call to play a pattern specified by NSData. The engine should be started prior to calling this method if low latency is desired. If this is not done, this method will start it, which can cause a significant delay.- Parameters:
data- The NSData containing a haptic/audio pattern dictionary.outError- If the operation fails, this will be set to a valid NSError describing the error.
-
playPatternFromURLError
public boolean playPatternFromURLError(@NotNull @NotNull NSURL fileURL, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)playPatternFromURL:error Simple one-shot call to play a pattern specified by a URL. The engine should be started prior to calling this method if low latency is desired. If this is not done, this method will start it, which can cause a significant delay.- Parameters:
fileURL- The URL of the file containing a haptic/audio pattern dictionary.outError- If the operation fails, this will be set to a valid NSError describing the error.
-
playsHapticsOnly
public boolean playsHapticsOnly()
[@property] playsHapticsOnly If set to YES, the CHHapticEngine will ignore all events of type CHHapticEventTypeAudio and play only haptic events. This behavior change will only take effect after the engine is stopped and restarted. The default is NO.
-
registerAudioResourceOptionsError
public long registerAudioResourceOptionsError(@NotNull @NotNull NSURL resourceURL, @NotNull @NotNull NSDictionary<?,?> options, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)registerAudioResource:options:error Register an external audio file for use as a custom waveform.- Parameters:
resourceURL- A URL referencing the location of the audio file to be registered.options- A dictionary containing CHHapticAudioResourceKey/value pairs describing how this resource should be played.outError- If register operation fails, this will be set to a valid NSError describing the error.
-
resetHandler
@NotNull public @NotNull CHHapticEngine.Block_resetHandler_ret resetHandler()
[@property] resetHandler This block will called asynchronously if the haptic engine has to reset itself after a server failure. In response to this handler being called, the client must release all haptic pattern players and recreate them. All CHHapticPattern objects and CHHapticEngine properties will have been preserved. In general, callbacks arrive on a non-main thread and it is the client's responsibility to handle it in a thread-safe manner.
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setAutoShutdownEnabled
public void setAutoShutdownEnabled(boolean value)
[@property] autoShutdownEnabled 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.
-
setIsMutedForAudio
public void setIsMutedForAudio(boolean value)
[@property] isMutedForAudio When set to YES, the CHHapticEngine mutes audio playback from its players. Default is NO.
-
setIsMutedForHaptics
public void setIsMutedForHaptics(boolean value)
[@property] isMutedForHaptics When set to YES, the CHHapticEngine mutes haptic playback from its players. Default is NO.
-
setPlaysHapticsOnly
public void setPlaysHapticsOnly(boolean value)
[@property] playsHapticsOnly If set to YES, the CHHapticEngine will ignore all events of type CHHapticEventTypeAudio and play only haptic events. This behavior change will only take effect after the engine is stopped and restarted. The default is NO.
-
setResetHandler
public void setResetHandler(@NotNull @NotNull CHHapticEngine.Block_setResetHandler value)[@property] resetHandler This block will called asynchronously if the haptic engine has to reset itself after a server failure. In response to this handler being called, the client must release all haptic pattern players and recreate them. All CHHapticPattern objects and CHHapticEngine properties will have been preserved. In general, callbacks arrive on a non-main thread and it is the client's responsibility to handle it in a thread-safe manner.
-
setStoppedHandler
public void setStoppedHandler(@NotNull @NotNull CHHapticEngine.Block_setStoppedHandler value)[@property] stoppedHandler The engine will call this block when it has stopped due to external causes (such as an audio session interruption or the app going into the background). It will NOT be called if the client calls stopWithCompletionHandler:. In general, callbacks arrive on a non-main thread and it is the client's responsibility to handle it in a thread-safe manner.
-
setVersion_static
public static void setVersion_static(long aVersion)
-
startAndReturnError
public boolean startAndReturnError(@Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)startAndReturnError: Start the engine and block until the engine has started. This method will return NO upon failure, and outError will be set to a valid NSError describing the error.
-
startWithCompletionHandler
public void startWithCompletionHandler(@Nullable @Nullable CHHapticEngine.Block_startWithCompletionHandler completionHandler)startWithCompletionHandler: Asynchronously start the engine. The handler will be called when the operation completes. The handler is guaranteed to be called on either success or failure.
-
stopWithCompletionHandler
public void stopWithCompletionHandler(@Nullable @Nullable CHHapticEngine.Block_stopWithCompletionHandler completionHandler)stopWithCompletionHandler: Asynchronously stop the engine. The handler will be called when the operation completes. The handler is guaranteed to be called on either success or failure.
-
stoppedHandler
@NotNull public @NotNull CHHapticEngine.Block_stoppedHandler_ret stoppedHandler()
[@property] stoppedHandler The engine will call this block when it has stopped due to external causes (such as an audio session interruption or the app going into the background). It will NOT be called if the client calls stopWithCompletionHandler:. In general, callbacks arrive on a non-main thread and it is the client's responsibility to handle it in a thread-safe manner.
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
unregisterAudioResourceError
public boolean unregisterAudioResourceError(long resourceID, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)unregisterAudioResource:error Unregister and remove a previously-registered audio resource.- Parameters:
resourceID- The resource ID that was returned when the resource was registered.outError- If the unregister operation fails, this will be set to a valid NSError describing the error.
-
version_static
public static long version_static()
-
playsAudioOnly
public boolean playsAudioOnly()
[@property] playsAudioOnly If set to YES, the CHHapticEngine will ignore all events of type CHHapticEventTypeHaptic and play only audio events. This behavior change will only take effect after the engine is stopped and restarted. The default is NO. API-Since: 16.0
-
setPlaysAudioOnly
public void setPlaysAudioOnly(boolean value)
[@property] playsAudioOnly If set to YES, the CHHapticEngine will ignore all events of type CHHapticEventTypeHaptic and play only audio events. This behavior change will only take effect after the engine is stopped and restarted. The default is NO. API-Since: 16.0
-
useStoredAccessor
@Deprecated public static boolean useStoredAccessor()
Deprecated.
-
-