pub unsafe trait CHHapticPatternPlayer: NSObjectProtocol {
// Provided methods
unsafe fn startAtTime_error(
&self,
time: NSTimeInterval,
) -> Result<(), Retained<NSError>>
where Self: Sized + Message { ... }
unsafe fn stopAtTime_error(
&self,
time: NSTimeInterval,
) -> Result<(), Retained<NSError>>
where Self: Sized + Message { ... }
unsafe fn sendParameters_atTime_error(
&self,
parameters: &NSArray<CHHapticDynamicParameter>,
time: NSTimeInterval,
) -> Result<(), Retained<NSError>>
where Self: Sized + Message { ... }
unsafe fn scheduleParameterCurve_atTime_error(
&self,
parameter_curve: &CHHapticParameterCurve,
time: NSTimeInterval,
) -> Result<(), Retained<NSError>>
where Self: Sized + Message { ... }
unsafe fn cancelAndReturnError(&self) -> Result<(), Retained<NSError>>
where Self: Sized + Message { ... }
unsafe fn isMuted(&self) -> bool
where Self: Sized + Message { ... }
unsafe fn setIsMuted(&self, is_muted: bool)
where Self: Sized + Message { ... }
}CHHapticPatternPlayer only.Expand description
A protocol which defines operations for starting, stopping, and sending parameters to a pattern player.
Instances of these objects are created via the factory methods such as
CHHapticEngine(createPlayerWithPattern:error).
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn startAtTime_error(
&self,
time: NSTimeInterval,
) -> Result<(), Retained<NSError>>
unsafe fn startAtTime_error( &self, time: NSTimeInterval, ) -> Result<(), Retained<NSError>>
Start playing the pattern at the specified time (see CHHapticEngine(currentTime)).
If ‘time’ is set to CHHapticTimeImmediate, the pattern is started as soon as possible.
Sourceunsafe fn stopAtTime_error(
&self,
time: NSTimeInterval,
) -> Result<(), Retained<NSError>>
unsafe fn stopAtTime_error( &self, time: NSTimeInterval, ) -> Result<(), Retained<NSError>>
Stop playing the pattern at the specified time (see CHHapticEngine(currentTime)).
If ‘time’ is set to CHHapticTimeImmediate, the pattern is stopped as soon as possible.
Sourceunsafe fn sendParameters_atTime_error(
&self,
parameters: &NSArray<CHHapticDynamicParameter>,
time: NSTimeInterval,
) -> Result<(), Retained<NSError>>
Available on crate feature CHHapticParameter only.
unsafe fn sendParameters_atTime_error( &self, parameters: &NSArray<CHHapticDynamicParameter>, time: NSTimeInterval, ) -> Result<(), Retained<NSError>>
CHHapticParameter only.Send an array of CHHapticDynamicParameters, starting at the specified time (see CHHapticEngine(currentTime)).
If ‘time’ is set to CHHapticTimeImmediate, the parameters are sent as soon as possible.
Sourceunsafe fn scheduleParameterCurve_atTime_error(
&self,
parameter_curve: &CHHapticParameterCurve,
time: NSTimeInterval,
) -> Result<(), Retained<NSError>>
Available on crate feature CHHapticParameter only.
unsafe fn scheduleParameterCurve_atTime_error( &self, parameter_curve: &CHHapticParameterCurve, time: NSTimeInterval, ) -> Result<(), Retained<NSError>>
CHHapticParameter only.Schedule a CHHapticParameterCurve, starting at the specified time (see CHHapticEngine(currentTime)).
If ‘time’ is set to CHHapticTimeImmediate, the parameter curve is scheduled as soon as possible.
This method overrides the relativeTime property of the passed-in CHHapticParameterCurve, setting it to this method’s ‘time’ argument. All the curve’s control point times will then be calculated relative to that time.
Sourceunsafe fn cancelAndReturnError(&self) -> Result<(), Retained<NSError>>
unsafe fn cancelAndReturnError(&self) -> Result<(), Retained<NSError>>
Removes all pending commands and stops the player as soon as possible.