Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CoreHaptics] Add support for Xcode 14 beta 1,2, & 3 #15523

Merged
merged 5 commits into from
Jul 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/corehaptics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ interface CHHapticAdvancedPatternPlayer : CHHapticPatternPlayer {
[DisableDefaultCtor]
interface CHHapticEngine
{

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: withespace

[Static]
[Export ("capabilitiesForHardware")]
ICHHapticDeviceCapability GetHardwareCapabilities ();
Expand Down Expand Up @@ -309,6 +310,10 @@ interface CHHapticEngine

[Export ("playPatternFromData:error:")]
bool PlayPattern (NSData data, [NullAllowed] out NSError outError);

[TV (16,0), NoWatch, MacCatalyst (16,0), Mac (13,0), iOS (16,0)]
[Export ("playsAudioOnly")]
bool PlaysAudioOnly { get; set; }
}

[Static]
Expand Down Expand Up @@ -357,6 +362,10 @@ partial interface CHHapticPatternDefinitionKeys {
[TV (15,0), NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Field ("CHHapticPatternKeyEventWaveformUseVolumeEnvelope")]
NSString EventWaveformUseVolumeEnvelopeKey { get; }

[TV (16,0), NoWatch, MacCatalyst (16,0), Mac (13,0), iOS (16,0)]
[Field ("CHHapticPatternKeyEventWaveformLoopEnabled")]
NSString EventWaveformLoopEnabledKey { get; }
}

[Mac (10,15), iOS (13,0), TV (14, 0)]
Expand Down Expand Up @@ -405,6 +414,10 @@ interface CHHapticPattern {
[Wrap ("this (patternDefinition.GetDictionary ()!, out outError)")]
NativeHandle Constructor (CHHapticPatternDefinition patternDefinition, [NullAllowed] out NSError outError);

[TV (16,0), NoWatch, MacCatalyst (16,0), Mac (13,0), iOS (16,0)]
[Export ("initWithContentsOfURL:error:")]
NativeHandle Constructor (NSUrl url, [NullAllowed] out NSError error);

[Internal]
[Export ("exportDictionaryAndReturnError:")]
[return: NullAllowed]
Expand All @@ -421,13 +434,21 @@ interface CHHapticPattern {
partial interface CHHapticAudioResourceKeys {
[Field ("CHHapticAudioResourceKeyUseVolumeEnvelope")]
NSString UseVolumeEnvelopeKey { get; }

[TV (16,0), NoWatch, MacCatalyst (16, 0), Mac (13,0), iOS (16, 0)]
[Field ("CHHapticAudioResourceKeyLoopEnabled")]
NSString LoopEnabledKey { 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; }

[Advice ("The default value is false.")]
bool LoopEnabled { get; set; }
}

}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,8 @@
!missing-type! CHHapticPattern not bound
!missing-field! CHHapticAudioResourceKeyUseVolumeEnvelope not bound
!missing-field! CHHapticPatternKeyEventWaveformUseVolumeEnvelope not bound
!missing-field! CHHapticAudioResourceKeyLoopEnabled not bound
!missing-field! CHHapticPatternKeyEventWaveformLoopEnabled not bound
!missing-selector! CHHapticEngine::playsAudioOnly not bound
!missing-selector! CHHapticEngine::setPlaysAudioOnly: not bound
!missing-selector! CHHapticPattern::initWithContentsOfURL:error: not bound

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions tests/xtro-sharpie/iOS-CoreHaptics.todo

This file was deleted.

5 changes: 5 additions & 0 deletions tests/xtro-sharpie/macOS-CoreHaptics.ignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,8 @@
!missing-type! CHHapticPattern not bound
!missing-field! CHHapticAudioResourceKeyUseVolumeEnvelope not bound
!missing-field! CHHapticPatternKeyEventWaveformUseVolumeEnvelope not bound
!missing-field! CHHapticAudioResourceKeyLoopEnabled not bound
!missing-field! CHHapticPatternKeyEventWaveformLoopEnabled not bound
!missing-selector! CHHapticEngine::playsAudioOnly not bound
!missing-selector! CHHapticEngine::setPlaysAudioOnly: not bound
!missing-selector! CHHapticPattern::initWithContentsOfURL:error: not bound
5 changes: 0 additions & 5 deletions tests/xtro-sharpie/macOS-CoreHaptics.todo

This file was deleted.

5 changes: 0 additions & 5 deletions tests/xtro-sharpie/tvOS-CoreHaptics.todo

This file was deleted.