diff --git a/src/CoreHaptics/Enums.cs b/src/CoreHaptics/Enums.cs index 9fc009c2ce..0d5a20160a 100644 --- a/src/CoreHaptics/Enums.cs +++ b/src/CoreHaptics/Enums.cs @@ -112,6 +112,7 @@ namespace CoreHaptics { InvalidPatternData = -4813, InvalidPatternDictionary = -4814, InvalidAudioSession = -4815, + InvalidEngineParameter = -4816, InvalidParameterType = -4820, InvalidEventType = -4821, InvalidEventTime = -4822, @@ -121,6 +122,8 @@ namespace CoreHaptics { BadEventEntry = -4830, BadParameterEntry = -4831, InvalidTime = -4840, + FileNotFound = -4851, + InsufficientPower = -4897, UnknownError = -4898, MemoryError = -4899, } @@ -145,4 +148,4 @@ namespace CoreHaptics { GameControllerDisconnect = 6, SystemError = -1, } -} \ No newline at end of file +} diff --git a/src/corehaptics.cs b/src/corehaptics.cs index 797f439632..6b38ddc1f9 100644 --- a/src/corehaptics.cs +++ b/src/corehaptics.cs @@ -349,6 +349,10 @@ namespace CoreHaptics { [Field ("CHHapticPatternKeyParameterCurveControlPoints")] NSString ParameterCurveControlPointsKey { get; } + + [TV (15,0), NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0)] + [Field ("CHHapticPatternKeyEventWaveformUseVolumeEnvelope")] + NSString EventWaveformUseVolumeEnvelopeKey { get; } } [Mac (10,15), iOS (13,0), TV (14, 0)] @@ -373,6 +377,9 @@ namespace CoreHaptics { NSObject WeakParameterCurve { get; set; } [Export ("ParameterCurveControlPointsKey")] NSObject WeakParameterCurveControlPoints { get; set; } + [Advice ("The default value is true.")] + [TV (15,0), NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0)] + bool EventWaveformUseVolumeEnvelope { get; set; } } [Mac (10,15), iOS (13,0), TV (14, 0)] @@ -403,4 +410,20 @@ namespace CoreHaptics { [return: NullAllowed] CHHapticPatternDefinition Export ([NullAllowed] out NSError outError); } -} \ No newline at end of file + + [Static] + [Internal] + [Mac (12,0), iOS (15,0), TV (15,0), MacCatalyst (15,0), NoWatch] + partial interface CHHapticAudioResourceKeys { + [Field ("CHHapticAudioResourceKeyUseVolumeEnvelope")] + NSString UseVolumeEnvelopeKey { get; } + } + + [Mac (12,0), iOS (15,0), TV (15,0), MacCatalyst (15,0), NoWatch] + [StrongDictionary ("CHHapticAudioResourceKeys")] + partial interface CHHapticAudioResourceDefinition { + [Advice ("The default value is true.")] + bool UseVolumeEnvelope { get; set; } + } + +} diff --git a/tests/xtro-sharpie/MacCatalyst-CoreHaptics.todo b/tests/xtro-sharpie/MacCatalyst-CoreHaptics.todo deleted file mode 100644 index 5d37587ddc..0000000000 --- a/tests/xtro-sharpie/MacCatalyst-CoreHaptics.todo +++ /dev/null @@ -1,5 +0,0 @@ -!missing-enum-value! CHHapticErrorCode native value CHHapticErrorCodeFileNotFound = -4851 not bound -!missing-enum-value! CHHapticErrorCode native value CHHapticErrorCodeInsufficientPower = -4897 not bound -!missing-enum-value! CHHapticErrorCode native value CHHapticErrorCodeInvalidEngineParameter = -4816 not bound -!missing-field! CHHapticAudioResourceKeyUseVolumeEnvelope not bound -!missing-field! CHHapticPatternKeyEventWaveformUseVolumeEnvelope not bound diff --git a/tests/xtro-sharpie/iOS-CoreHaptics.todo b/tests/xtro-sharpie/iOS-CoreHaptics.todo deleted file mode 100644 index 5d37587ddc..0000000000 --- a/tests/xtro-sharpie/iOS-CoreHaptics.todo +++ /dev/null @@ -1,5 +0,0 @@ -!missing-enum-value! CHHapticErrorCode native value CHHapticErrorCodeFileNotFound = -4851 not bound -!missing-enum-value! CHHapticErrorCode native value CHHapticErrorCodeInsufficientPower = -4897 not bound -!missing-enum-value! CHHapticErrorCode native value CHHapticErrorCodeInvalidEngineParameter = -4816 not bound -!missing-field! CHHapticAudioResourceKeyUseVolumeEnvelope not bound -!missing-field! CHHapticPatternKeyEventWaveformUseVolumeEnvelope not bound diff --git a/tests/xtro-sharpie/macOS-CoreHaptics.ignore b/tests/xtro-sharpie/macOS-CoreHaptics.ignore index bc2497ff6f..ec7aba5f84 100644 --- a/tests/xtro-sharpie/macOS-CoreHaptics.ignore +++ b/tests/xtro-sharpie/macOS-CoreHaptics.ignore @@ -113,3 +113,5 @@ !missing-type! CHHapticParameterCurve not bound !missing-type! CHHapticParameterCurveControlPoint not bound !missing-type! CHHapticPattern not bound +!missing-field! CHHapticAudioResourceKeyUseVolumeEnvelope not bound +!missing-field! CHHapticPatternKeyEventWaveformUseVolumeEnvelope not bound diff --git a/tests/xtro-sharpie/macOS-CoreHaptics.todo b/tests/xtro-sharpie/macOS-CoreHaptics.todo deleted file mode 100644 index f9deeb8342..0000000000 --- a/tests/xtro-sharpie/macOS-CoreHaptics.todo +++ /dev/null @@ -1,2 +0,0 @@ -!missing-field! CHHapticAudioResourceKeyUseVolumeEnvelope not bound -!missing-field! CHHapticPatternKeyEventWaveformUseVolumeEnvelope not bound diff --git a/tests/xtro-sharpie/tvOS-CoreHaptics.todo b/tests/xtro-sharpie/tvOS-CoreHaptics.todo deleted file mode 100644 index 5d37587ddc..0000000000 --- a/tests/xtro-sharpie/tvOS-CoreHaptics.todo +++ /dev/null @@ -1,5 +0,0 @@ -!missing-enum-value! CHHapticErrorCode native value CHHapticErrorCodeFileNotFound = -4851 not bound -!missing-enum-value! CHHapticErrorCode native value CHHapticErrorCodeInsufficientPower = -4897 not bound -!missing-enum-value! CHHapticErrorCode native value CHHapticErrorCodeInvalidEngineParameter = -4816 not bound -!missing-field! CHHapticAudioResourceKeyUseVolumeEnvelope not bound -!missing-field! CHHapticPatternKeyEventWaveformUseVolumeEnvelope not bound