pub unsafe trait CHHapticDeviceCapability {
// Provided methods
unsafe fn supportsHaptics(&self) -> bool
where Self: Sized + Message { ... }
unsafe fn supportsAudio(&self) -> bool
where Self: Sized + Message { ... }
unsafe fn attributesForEventParameter_eventType_error(
&self,
in_parameter: &CHHapticEventParameterID,
type: &CHHapticEventType,
) -> Result<Retained<ProtocolObject<dyn CHHapticParameterAttributes>>, Retained<NSError>>
where Self: Sized + Message { ... }
unsafe fn attributesForDynamicParameter_error(
&self,
in_parameter: &CHHapticDynamicParameterID,
) -> Result<Retained<ProtocolObject<dyn CHHapticParameterAttributes>>, Retained<NSError>>
where Self: Sized + Message { ... }
}CHHapticDeviceCapability only.Expand description
A protocol which defines properties describing haptics and audio capabilities for a particular device. These properties include limitations and ranges of parameters.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn supportsHaptics(&self) -> bool
unsafe fn supportsHaptics(&self) -> bool
Returns YES if the hardware supports haptic event playback.
Sourceunsafe fn supportsAudio(&self) -> bool
unsafe fn supportsAudio(&self) -> bool
Returns YES if the hardware supports audio event playback.
Sourceunsafe fn attributesForEventParameter_eventType_error(
&self,
in_parameter: &CHHapticEventParameterID,
type: &CHHapticEventType,
) -> Result<Retained<ProtocolObject<dyn CHHapticParameterAttributes>>, Retained<NSError>>
Available on crate features CHHapticEvent and CHHapticParameter only.
unsafe fn attributesForEventParameter_eventType_error( &self, in_parameter: &CHHapticEventParameterID, type: &CHHapticEventType, ) -> Result<Retained<ProtocolObject<dyn CHHapticParameterAttributes>>, Retained<NSError>>
CHHapticEvent and CHHapticParameter only.Return information about the given CHHapticEventParameter as it applies to the specified event type.
Parameter inParameter: A CHHapticEventParameter to be queried.
Parameter type: A CHHapticEventType to be queried.
Parameter outError: If the operation fails, this will be set to a valid NSError describing the error.
These values may vary across different device types.
Sourceunsafe fn attributesForDynamicParameter_error(
&self,
in_parameter: &CHHapticDynamicParameterID,
) -> Result<Retained<ProtocolObject<dyn CHHapticParameterAttributes>>, Retained<NSError>>
Available on crate feature CHHapticParameter only.
unsafe fn attributesForDynamicParameter_error( &self, in_parameter: &CHHapticDynamicParameterID, ) -> Result<Retained<ProtocolObject<dyn CHHapticParameterAttributes>>, Retained<NSError>>
CHHapticParameter only.Return information about the given CHHapticDynamicParameter.
Parameter inParameter: A CHHapticDynamicParameter to be queried.
Parameter outError: If the operation fails, this will be set to a valid NSError describing the error.
These values may vary across different device types.