| Modifier and Type | Class and Description |
|---|---|
static interface |
CHHapticEngine.Block_notifyWhenPlayersFinished |
static interface |
CHHapticEngine.Block_resetHandler_ret |
static interface |
CHHapticEngine.Block_setResetHandler |
static interface |
CHHapticEngine.Block_setStoppedHandler |
static interface |
CHHapticEngine.Block_startWithCompletionHandler |
static interface |
CHHapticEngine.Block_stoppedHandler_ret |
static interface |
CHHapticEngine.Block_stopWithCompletionHandler |
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
CHHapticEngine(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
static CHHapticEngine |
alloc() |
static CHHapticEngine |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
static CHHapticDeviceCapability |
capabilitiesForHardware()
capabilitiesForHardware
|
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
CHHapticAdvancedPatternPlayer |
createAdvancedPlayerWithPatternError(CHHapticPattern pattern,
org.moe.natj.general.ptr.Ptr<NSError> outError)
createAdvancedPlayerWithPattern:error
|
CHHapticPatternPlayer |
createPlayerWithPatternError(CHHapticPattern pattern,
org.moe.natj.general.ptr.Ptr<NSError> outError)
createPlayerWithPattern:error
|
double |
currentTime()
[@property] currentTime
The absolute time from which all current and future event times may be calculated.
|
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
static long |
hash_static() |
CHHapticEngine |
init() |
CHHapticEngine |
initAndReturnError(org.moe.natj.general.ptr.Ptr<NSError> error)
initAndReturnError:
|
CHHapticEngine |
initWithAudioSessionError(AVAudioSession audioSession,
org.moe.natj.general.ptr.Ptr<NSError> error)
initWithAudioSession:error
|
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
boolean |
isAutoShutdownEnabled()
[@property] autoShutdownEnabled
|
boolean |
isMutedForAudio()
[@property] isMutedForAudio
When set to YES, the CHHapticEngine mutes audio playback from its players.
|
boolean |
isMutedForHaptics()
[@property] isMutedForHaptics
When set to YES, the CHHapticEngine mutes haptic playback from its players.
|
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
static CHHapticEngine |
new_objc() |
void |
notifyWhenPlayersFinished(CHHapticEngine.Block_notifyWhenPlayersFinished finishedHandler)
notifyWhenPlayersFinished:
|
boolean |
playPatternFromDataError(NSData data,
org.moe.natj.general.ptr.Ptr<NSError> outError)
playPatternFromData:error
|
boolean |
playPatternFromURLError(NSURL fileURL,
org.moe.natj.general.ptr.Ptr<NSError> outError)
playPatternFromURL:error
|
boolean |
playsHapticsOnly()
[@property] playsHapticsOnly
If set to YES, the CHHapticEngine will ignore all events of type CHHapticEventTypeAudio and play only haptic events.
|
long |
registerAudioResourceOptionsError(NSURL resourceURL,
NSDictionary<?,?> options,
org.moe.natj.general.ptr.Ptr<NSError> outError)
registerAudioResource:options:error
|
CHHapticEngine.Block_resetHandler_ret |
resetHandler()
[@property] resetHandler
|
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
void |
setAutoShutdownEnabled(boolean value)
[@property] autoShutdownEnabled
|
void |
setIsMutedForAudio(boolean value)
[@property] isMutedForAudio
When set to YES, the CHHapticEngine mutes audio playback from its players.
|
void |
setIsMutedForHaptics(boolean value)
[@property] isMutedForHaptics
When set to YES, the CHHapticEngine mutes haptic playback from its players.
|
void |
setPlaysHapticsOnly(boolean value)
[@property] playsHapticsOnly
If set to YES, the CHHapticEngine will ignore all events of type CHHapticEventTypeAudio and play only haptic events.
|
void |
setResetHandler(CHHapticEngine.Block_setResetHandler value)
[@property] resetHandler
|
void |
setStoppedHandler(CHHapticEngine.Block_setStoppedHandler value)
[@property] stoppedHandler
|
static void |
setVersion_static(long aVersion) |
boolean |
startAndReturnError(org.moe.natj.general.ptr.Ptr<NSError> outError)
startAndReturnError:
|
void |
startWithCompletionHandler(CHHapticEngine.Block_startWithCompletionHandler completionHandler)
startWithCompletionHandler:
|
CHHapticEngine.Block_stoppedHandler_ret |
stoppedHandler()
[@property] stoppedHandler
|
void |
stopWithCompletionHandler(CHHapticEngine.Block_stopWithCompletionHandler completionHandler)
stopWithCompletionHandler:
|
static org.moe.natj.objc.Class |
superclass_static() |
boolean |
unregisterAudioResourceError(long resourceID,
org.moe.natj.general.ptr.Ptr<NSError> outError)
unregisterAudioResource:error
|
static long |
version_static() |
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, 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, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static CHHapticEngine alloc()
public static CHHapticEngine allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static CHHapticDeviceCapability capabilitiesForHardware()
Get the protocol that describes haptic and audio capabilities on this device.
Detailed description on the capability protocol is in CHHapticDeviceCapability.h.
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public CHHapticAdvancedPatternPlayer createAdvancedPlayerWithPatternError(CHHapticPattern pattern, org.moe.natj.general.ptr.Ptr<NSError> outError)
Factory method for creating a CHHapticAdvancedPatternPlayer from a CHHapticPattern.
pattern - The pattern to be played.public CHHapticPatternPlayer createPlayerWithPatternError(CHHapticPattern pattern, org.moe.natj.general.ptr.Ptr<NSError> outError)
Factory method for creating a CHHapticPatternPlayer from a CHHapticPattern.
pattern - The pattern to be played.public double currentTime()
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public static long hash_static()
public CHHapticEngine init()
public CHHapticEngine initAndReturnError(org.moe.natj.general.ptr.Ptr<NSError> error)
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.
public CHHapticEngine initWithAudioSessionError(AVAudioSession audioSession, org.moe.natj.general.ptr.Ptr<NSError> 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.
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public boolean isAutoShutdownEnabled()
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.
public boolean isMutedForAudio()
Default is NO.
public boolean isMutedForHaptics()
Default is NO.
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static CHHapticEngine new_objc()
public void notifyWhenPlayersFinished(CHHapticEngine.Block_notifyWhenPlayersFinished finishedHandler)
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.
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`).public boolean playPatternFromDataError(NSData data, org.moe.natj.general.ptr.Ptr<NSError> outError)
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.
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.public boolean playPatternFromURLError(NSURL fileURL, org.moe.natj.general.ptr.Ptr<NSError> outError)
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.
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.public boolean playsHapticsOnly()
This behavior change will only take effect after the engine is stopped and restarted. The default is NO.
public long registerAudioResourceOptionsError(NSURL resourceURL, NSDictionary<?,?> options, org.moe.natj.general.ptr.Ptr<NSError> outError)
Register an external audio file for use as a custom waveform.
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.public CHHapticEngine.Block_resetHandler_ret 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.
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public void setAutoShutdownEnabled(boolean value)
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.
public void setIsMutedForAudio(boolean value)
Default is NO.
public void setIsMutedForHaptics(boolean value)
Default is NO.
public void setPlaysHapticsOnly(boolean value)
This behavior change will only take effect after the engine is stopped and restarted. The default is NO.
public void setResetHandler(CHHapticEngine.Block_setResetHandler value)
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.
public void setStoppedHandler(CHHapticEngine.Block_setStoppedHandler value)
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.
public static void setVersion_static(long aVersion)
public boolean startAndReturnError(org.moe.natj.general.ptr.Ptr<NSError> outError)
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.
public void startWithCompletionHandler(CHHapticEngine.Block_startWithCompletionHandler completionHandler)
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.
public void stopWithCompletionHandler(CHHapticEngine.Block_stopWithCompletionHandler completionHandler)
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.
public CHHapticEngine.Block_stoppedHandler_ret 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.
public static org.moe.natj.objc.Class superclass_static()
public boolean unregisterAudioResourceError(long resourceID,
org.moe.natj.general.ptr.Ptr<NSError> outError)
Unregister and remove a previously-registered audio resource.
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.public static long version_static()