[CoreHaptics] Add support for the new framework up to beta 7. (#6943)
This commit is contained in:
Родитель
62018fdab4
Коммит
b5a85a115b
|
@ -142,5 +142,6 @@ namespace MonoTouch {
|
|||
public const string QuickLookThumbnailingLibrary = "/System/Library/Frameworks/QuickLookThumbnailing.framework/QuickLookThumbnailing";
|
||||
public const string LinkPresentationLibrary = "/System/Library/Frameworks/LinkPresentation.framework/LinkPresentation";
|
||||
public const string VisionKitLibrary = "/System/Library/Frameworks/VisionKit.framework/VisionKit";
|
||||
public const string CoreHapticsLibrary = "/System/Library/Frameworks/CoreHaptics.framework/CoreHaptics";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -167,5 +167,6 @@ namespace MonoMac {
|
|||
public const string PencilKitLibrary = "/System/Library/Frameworks/PencilKit.framework/PencilKit";
|
||||
public const string SpeechLibrary = "/System/Library/Frameworks/Speech.framework/Speech";
|
||||
public const string LinkPresentationLibrary = "/System/Library/Frameworks/LinkPresentation.framework/LinkPresentation";
|
||||
public const string CoreHapticsLibrary = "/System/Library/Frameworks/CoreHaptics.framework/CoreHaptics";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,144 @@
|
|||
//
|
||||
// CoreHaptics C# bindings
|
||||
//
|
||||
// Authors:
|
||||
// Manuel de la Pena Saenz <mandel@microsoft.com>
|
||||
//
|
||||
// Copyright 2019 Microsoft Corporation All rights reserved.
|
||||
//
|
||||
using System;
|
||||
using Foundation;
|
||||
using ObjCRuntime;
|
||||
|
||||
namespace CoreHaptics {
|
||||
|
||||
[Mac (10, 15), iOS (13, 0)]
|
||||
public enum CHHapticEventParameterId {
|
||||
[Field ("CHHapticEventParameterIDHapticIntensity")]
|
||||
HapticIntensity,
|
||||
|
||||
[Field ("CHHapticEventParameterIDHapticSharpness")]
|
||||
HapticSharpness,
|
||||
|
||||
[Field ("CHHapticEventParameterIDAttackTime")]
|
||||
AttackTime,
|
||||
|
||||
[Field ("CHHapticEventParameterIDDecayTime")]
|
||||
DecayTime,
|
||||
|
||||
[Field ("CHHapticEventParameterIDReleaseTime")]
|
||||
ReleaseTime,
|
||||
|
||||
[Field ("CHHapticEventParameterIDSustained")]
|
||||
Sustained,
|
||||
|
||||
[Field ("CHHapticEventParameterIDAudioVolume")]
|
||||
AudioVolume,
|
||||
|
||||
[Field ("CHHapticEventParameterIDAudioPitch")]
|
||||
AudioPitch,
|
||||
|
||||
[Field ("CHHapticEventParameterIDAudioPan")]
|
||||
AudioPan,
|
||||
|
||||
[Field ("CHHapticEventParameterIDAudioBrightness")]
|
||||
AudioBrightness,
|
||||
}
|
||||
|
||||
[Mac (10, 15), iOS (13, 0)]
|
||||
public enum CHHapticDynamicParameterId {
|
||||
[Field ("CHHapticDynamicParameterIDHapticIntensityControl")]
|
||||
HapticIntensityControl,
|
||||
|
||||
[Field ("CHHapticDynamicParameterIDHapticSharpnessControl")]
|
||||
HapticSharpnessControl,
|
||||
|
||||
[Field ("CHHapticDynamicParameterIDHapticAttackTimeControl")]
|
||||
HapticAttackTimeControl,
|
||||
|
||||
[Field ("CHHapticDynamicParameterIDHapticDecayTimeControl")]
|
||||
HapticDecayTimeControl,
|
||||
|
||||
[Field ("CHHapticDynamicParameterIDHapticReleaseTimeControl")]
|
||||
HapticReleaseTimeControl,
|
||||
|
||||
[Field ("CHHapticDynamicParameterIDAudioVolumeControl")]
|
||||
AudioVolumeControl,
|
||||
|
||||
[Field ("CHHapticDynamicParameterIDAudioPanControl")]
|
||||
AudioPanControl,
|
||||
|
||||
[Field ("CHHapticDynamicParameterIDAudioBrightnessControl")]
|
||||
AudioBrightnessControl,
|
||||
|
||||
[Field ("CHHapticDynamicParameterIDAudioPitchControl")]
|
||||
AudioPitchControl,
|
||||
|
||||
[Field ("CHHapticDynamicParameterIDAudioAttackTimeControl")]
|
||||
AudioAttackTimeControl,
|
||||
|
||||
[Field ("CHHapticDynamicParameterIDAudioDecayTimeControl")]
|
||||
AudioDecayTimeControl,
|
||||
|
||||
[Field ("CHHapticDynamicParameterIDAudioReleaseTimeControl")]
|
||||
AudioReleaseTimeControl,
|
||||
}
|
||||
|
||||
[Mac (10, 15), iOS (13, 0)]
|
||||
public enum CHHapticEventType {
|
||||
[Field ("CHHapticEventTypeHapticTransient")]
|
||||
HapticTransient,
|
||||
|
||||
[Field ("CHHapticEventTypeHapticContinuous")]
|
||||
HapticContinuous,
|
||||
|
||||
[Field ("CHHapticEventTypeAudioContinuous")]
|
||||
AudioContinuous,
|
||||
|
||||
[Field ("CHHapticEventTypeAudioCustom")]
|
||||
AudioCustom,
|
||||
}
|
||||
|
||||
[Mac (10,15), iOS (13,0)]
|
||||
[Native]
|
||||
public enum CHHapticErrorCode : long {
|
||||
EngineNotRunning = -4805,
|
||||
OperationNotPermitted = -4806,
|
||||
EngineStartTimeout = -4808,
|
||||
NotSupported = -4809,
|
||||
ServerInitFailed = -4810,
|
||||
ServerInterrupted = -4811,
|
||||
InvalidPatternPlayer = -4812,
|
||||
InvalidPatternData = -4813,
|
||||
InvalidPatternDictionary = -4814,
|
||||
InvalidAudioSession = -4815,
|
||||
InvalidParameterType = -4820,
|
||||
InvalidEventType = -4821,
|
||||
InvalidEventTime = -4822,
|
||||
InvalidEventDuration = -4823,
|
||||
InvalidAudioResource = -4824,
|
||||
ResourceNotAvailable = -4825,
|
||||
BadEventEntry = -4830,
|
||||
BadParameterEntry = -4831,
|
||||
InvalidTime = -4840,
|
||||
UnknownError = -4898,
|
||||
MemoryError = -4899,
|
||||
}
|
||||
|
||||
[Mac (10,15), iOS (13,0)]
|
||||
[Native]
|
||||
public enum CHHapticEngineFinishedAction : long {
|
||||
StopEngine = 1,
|
||||
LeaveEngineRunning = 2,
|
||||
}
|
||||
|
||||
[Mac (10,15), iOS (13,0)]
|
||||
[Native]
|
||||
public enum CHHapticEngineStoppedReason : long {
|
||||
AudioSessionInterrupt = 1,
|
||||
ApplicationSuspended = 2,
|
||||
IdleTimeout = 3,
|
||||
NotifyWhenFinished = 4,
|
||||
SystemError = -1,
|
||||
}
|
||||
}
|
|
@ -0,0 +1,401 @@
|
|||
//
|
||||
// CoreHaptics C# bindings
|
||||
//
|
||||
// Authors:
|
||||
// Manuel de la Pena Saenz <mandel@microsoft.com>
|
||||
//
|
||||
// Copyright 2019 Microsoft Corporation All rights reserved.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
using AVFoundation;
|
||||
using CoreFoundation;
|
||||
using Foundation;
|
||||
using ObjCRuntime;
|
||||
|
||||
namespace CoreHaptics {
|
||||
|
||||
// we are not binding the API on Mac OS X yet due to an issue on Apples side: https://github.com/xamarin/maccore/issues/1951
|
||||
#if MONOMAC
|
||||
interface AVAudioSession {}
|
||||
#endif
|
||||
|
||||
[Mac (10,15), iOS (13,0)]
|
||||
[BaseType (typeof(NSObject))]
|
||||
[DisableDefaultCtor]
|
||||
interface CHHapticEventParameter {
|
||||
[BindAs (typeof (CHHapticEventParameterId))]
|
||||
[Export ("parameterID")]
|
||||
NSString ParameterId { get; }
|
||||
|
||||
[Export ("value")]
|
||||
float Value { get; set; }
|
||||
|
||||
[Export ("initWithParameterID:value:")]
|
||||
[DesignatedInitializer]
|
||||
IntPtr Constructor ([BindAs (typeof (CHHapticEventParameterId))] NSString parameterId, float value);
|
||||
}
|
||||
|
||||
[Mac (10,15), iOS (13,0)]
|
||||
[BaseType (typeof(NSObject))]
|
||||
[DisableDefaultCtor]
|
||||
interface CHHapticDynamicParameter {
|
||||
[BindAs (typeof (CHHapticDynamicParameterId))]
|
||||
[Export ("parameterID")]
|
||||
NSString ParameterId { get; }
|
||||
|
||||
[Export ("value")]
|
||||
float Value { get; set; }
|
||||
|
||||
[Export ("relativeTime")]
|
||||
double RelativeTime { get; set; }
|
||||
|
||||
[Export ("initWithParameterID:value:relativeTime:")]
|
||||
[DesignatedInitializer]
|
||||
IntPtr Constructor ([BindAs (typeof (CHHapticDynamicParameterId))] NSString parameterId, float value, double time);
|
||||
}
|
||||
|
||||
[Mac (10,15), iOS (13,0)]
|
||||
[BaseType (typeof(NSObject))]
|
||||
[DisableDefaultCtor]
|
||||
interface CHHapticParameterCurveControlPoint {
|
||||
[Export ("relativeTime")]
|
||||
double RelativeTime { get; set; }
|
||||
|
||||
[Export ("value")]
|
||||
float Value { get; set; }
|
||||
|
||||
[Export ("initWithRelativeTime:value:")]
|
||||
[DesignatedInitializer]
|
||||
IntPtr Constructor (double time, float value);
|
||||
}
|
||||
|
||||
[Mac (10,15), iOS (13,0)]
|
||||
[BaseType (typeof(NSObject))]
|
||||
[DisableDefaultCtor]
|
||||
interface CHHapticParameterCurve {
|
||||
[BindAs (typeof (CHHapticDynamicParameterId))]
|
||||
[Export ("parameterID")]
|
||||
NSString ParameterId { get; }
|
||||
|
||||
[Export ("relativeTime")]
|
||||
double RelativeTime { get; set; }
|
||||
|
||||
[Export ("controlPoints")]
|
||||
CHHapticParameterCurveControlPoint[] ControlPoints { get; }
|
||||
|
||||
[Export ("initWithParameterID:controlPoints:relativeTime:")]
|
||||
[DesignatedInitializer]
|
||||
IntPtr Constructor ([BindAs (typeof (CHHapticDynamicParameterId))]NSString parameterId, CHHapticParameterCurveControlPoint[] controlPoints, double relativeTime);
|
||||
}
|
||||
|
||||
[Mac (10,15), iOS (13,0)]
|
||||
[BaseType (typeof(NSObject))]
|
||||
[DisableDefaultCtor]
|
||||
interface CHHapticEvent {
|
||||
[BindAs (typeof (CHHapticEventType))]
|
||||
[Export ("type")]
|
||||
NSString Type { get; }
|
||||
|
||||
[Export ("eventParameters")]
|
||||
CHHapticEventParameter[] EventParameters { get; }
|
||||
|
||||
[Export ("relativeTime")]
|
||||
double RelativeTime { get; set; }
|
||||
|
||||
[Export ("duration")]
|
||||
double Duration { get; set; }
|
||||
|
||||
[Export ("initWithEventType:parameters:relativeTime:")]
|
||||
IntPtr Constructor ([BindAs (typeof (CHHapticEventType))] NSString type, CHHapticEventParameter[] eventParams, double time);
|
||||
|
||||
[Export ("initWithEventType:parameters:relativeTime:duration:")]
|
||||
IntPtr Constructor ([BindAs (typeof (CHHapticEventType))] NSString type, CHHapticEventParameter[] eventParams, double time, double duration);
|
||||
|
||||
[Export ("initWithAudioResourceID:parameters:relativeTime:")]
|
||||
IntPtr Constructor (nuint resourceId, CHHapticEventParameter[] eventParams, double time);
|
||||
|
||||
[Export ("initWithAudioResourceID:parameters:relativeTime:duration:")]
|
||||
IntPtr Constructor (nuint resourceId, CHHapticEventParameter[] eventParams, double time, double duration);
|
||||
}
|
||||
|
||||
interface ICHHapticParameterAttributes { }
|
||||
|
||||
[Mac (10,15), iOS (13,0)]
|
||||
[Protocol]
|
||||
interface CHHapticParameterAttributes {
|
||||
[Abstract]
|
||||
[Export ("minValue")]
|
||||
float MinValue { get; }
|
||||
|
||||
[Abstract]
|
||||
[Export ("maxValue")]
|
||||
float MaxValue { get; }
|
||||
|
||||
[Abstract]
|
||||
[Export ("defaultValue")]
|
||||
float DefaultValue { get; }
|
||||
}
|
||||
|
||||
interface ICHHapticDeviceCapability { }
|
||||
|
||||
[iOS (13,0)][NoMac]
|
||||
[Protocol]
|
||||
interface CHHapticDeviceCapability {
|
||||
[Abstract]
|
||||
[Export ("supportsHaptics")]
|
||||
bool SupportsHaptics { get; }
|
||||
|
||||
[Abstract]
|
||||
[Export ("supportsAudio")]
|
||||
bool SupportsAudio { get; }
|
||||
|
||||
// Protocols do not like BindAs yet we know is the enum CHHapticEventType
|
||||
[Abstract]
|
||||
[Export ("attributesForEventParameter:eventType:error:")]
|
||||
[return: NullAllowed]
|
||||
ICHHapticParameterAttributes GetAttributes (NSString eventParameter, string type, [NullAllowed] out NSError outError);
|
||||
|
||||
// Protocols do not like BindAs yet we know is the enum CHHapticEventType
|
||||
[Abstract]
|
||||
[Export ("attributesForDynamicParameter:error:")]
|
||||
[return: NullAllowed]
|
||||
ICHHapticParameterAttributes GetAttributes (NSString eventParameter, [NullAllowed] out NSError outError);
|
||||
}
|
||||
|
||||
interface ICHHapticPatternPlayer { }
|
||||
|
||||
[Mac (10,15), iOS (13,0)]
|
||||
[Protocol]
|
||||
interface CHHapticPatternPlayer {
|
||||
[Abstract]
|
||||
[Export ("startAtTime:error:")]
|
||||
bool Start (double time, [NullAllowed] out NSError outError);
|
||||
|
||||
[Abstract]
|
||||
[Export ("stopAtTime:error:")]
|
||||
bool Stop (double time, [NullAllowed] out NSError outError);
|
||||
|
||||
[Abstract]
|
||||
[Export ("sendParameters:atTime:error:")]
|
||||
bool Send (CHHapticDynamicParameter[] parameters, double time, [NullAllowed] out NSError outError);
|
||||
|
||||
[Abstract]
|
||||
[Export ("scheduleParameterCurve:atTime:error:")]
|
||||
bool Schedule (CHHapticParameterCurve parameterCurve, double time, [NullAllowed] out NSError outError);
|
||||
|
||||
[Abstract]
|
||||
[Export ("cancelAndReturnError:")]
|
||||
bool Cancel ([NullAllowed] out NSError outError);
|
||||
|
||||
[Abstract]
|
||||
[Export ("isMuted")]
|
||||
bool IsMuted { get; set; }
|
||||
}
|
||||
|
||||
interface ICHHapticAdvancedPatternPlayer {}
|
||||
|
||||
[Mac (10,15), iOS (13,0)]
|
||||
[Protocol]
|
||||
interface CHHapticAdvancedPatternPlayer : CHHapticPatternPlayer {
|
||||
[Abstract]
|
||||
[Export ("pauseAtTime:error:")]
|
||||
bool Pause (double time, [NullAllowed] out NSError outError);
|
||||
|
||||
[Abstract]
|
||||
[Export ("resumeAtTime:error:")]
|
||||
bool Resume (double time, [NullAllowed] out NSError outError);
|
||||
|
||||
[Abstract]
|
||||
[Export ("seekToOffset:error:")]
|
||||
bool Seek (double offsetTime, [NullAllowed] out NSError outError);
|
||||
|
||||
[Abstract]
|
||||
[Export ("loopEnabled")]
|
||||
bool LoopEnabled { get; set; }
|
||||
|
||||
[Abstract]
|
||||
[Export ("loopEnd")]
|
||||
double LoopEnd { get; set; }
|
||||
|
||||
[Abstract]
|
||||
[Export ("playbackRate")]
|
||||
float PlaybackRate { get; set; }
|
||||
|
||||
[Abstract]
|
||||
[Export ("completionHandler", ArgumentSemantic.Assign)]
|
||||
Action<NSError> CompletionHandler { get; set; }
|
||||
}
|
||||
|
||||
[Mac (10,15), iOS (13,0)]
|
||||
[BaseType (typeof(NSObject))]
|
||||
[DisableDefaultCtor]
|
||||
interface CHHapticEngine
|
||||
{
|
||||
[Static]
|
||||
[Export ("capabilitiesForHardware")]
|
||||
ICHHapticDeviceCapability GetHardwareCapabilities ();
|
||||
|
||||
[Export ("currentTime")]
|
||||
double CurrentTime { get; }
|
||||
|
||||
[Export ("stoppedHandler", ArgumentSemantic.Assign)]
|
||||
Action<CHHapticEngineStoppedReason> StoppedHandler { get; set; }
|
||||
|
||||
[Export ("resetHandler", ArgumentSemantic.Assign)]
|
||||
Action ResetHandler { get; set; }
|
||||
|
||||
[Export ("playsHapticsOnly")]
|
||||
bool PlaysHapticsOnly { get; set; }
|
||||
|
||||
[Export ("isMutedForAudio")]
|
||||
bool IsMutedForAudio { get; set; }
|
||||
|
||||
[Export ("isMutedForHaptics")]
|
||||
bool IsMutedForHaptics { get; set; }
|
||||
|
||||
[Export ("autoShutdownEnabled")]
|
||||
bool AutoShutdownEnabled { [Bind ("isAutoShutdownEnabled")] get; set; }
|
||||
|
||||
[Export ("initAndReturnError:")]
|
||||
[DesignatedInitializer]
|
||||
IntPtr Constructor ([NullAllowed] out NSError error);
|
||||
|
||||
[NoMac]
|
||||
[Export ("initWithAudioSession:error:")]
|
||||
[DesignatedInitializer]
|
||||
IntPtr Constructor ([NullAllowed] AVAudioSession audioSession, [NullAllowed] out NSError error);
|
||||
|
||||
[Async]
|
||||
[Export ("startWithCompletionHandler:")]
|
||||
void Start ([NullAllowed] Action<NSError> completionHandler);
|
||||
|
||||
[Export ("startAndReturnError:")]
|
||||
bool Start ([NullAllowed] out NSError outError);
|
||||
|
||||
[Async]
|
||||
[Export ("stopWithCompletionHandler:")]
|
||||
void Stop ([NullAllowed] Action<NSError> completionHandler);
|
||||
|
||||
[Async]
|
||||
[Export ("notifyWhenPlayersFinished:")]
|
||||
void NotifyWhenPlayersFinished (Action<NSError> finishedHandler);
|
||||
|
||||
[Export ("createPlayerWithPattern:error:")]
|
||||
[return: NullAllowed]
|
||||
ICHHapticPatternPlayer CreatePlayer (CHHapticPattern pattern, [NullAllowed] out NSError outError);
|
||||
|
||||
[Export ("createAdvancedPlayerWithPattern:error:")]
|
||||
[return: NullAllowed]
|
||||
ICHHapticAdvancedPatternPlayer CreateAdvancedPlayer (CHHapticPattern pattern, [NullAllowed] out NSError outError);
|
||||
|
||||
[Export ("registerAudioResource:options:error:")]
|
||||
nuint RegisterAudioResource (NSUrl resourceUrl, NSDictionary options, [NullAllowed] out NSError outError);
|
||||
|
||||
[Export ("unregisterAudioResource:error:")]
|
||||
bool UnregisterAudioResource (nuint resourceId, [NullAllowed] out NSError outError);
|
||||
|
||||
[Export ("playPatternFromURL:error:")]
|
||||
bool PlayPattern (NSUrl fileUrl, [NullAllowed] out NSError outError);
|
||||
|
||||
[Export ("playPatternFromData:error:")]
|
||||
bool PlayPattern (NSData data, [NullAllowed] out NSError outError);
|
||||
}
|
||||
|
||||
[Static]
|
||||
[Internal]
|
||||
[Mac (10,15), iOS (13,0)]
|
||||
partial interface CHHapticPatternDefinitionKeys {
|
||||
[Field ("CHHapticPatternKeyVersion")]
|
||||
NSString VersionKey { get; }
|
||||
|
||||
[Field ("CHHapticPatternKeyPattern")]
|
||||
NSString PatternKey { get; }
|
||||
|
||||
[Field ("CHHapticPatternKeyEvent")]
|
||||
NSString EventKey { get; }
|
||||
|
||||
[Field ("CHHapticPatternKeyEventType")]
|
||||
NSString EventTypeKey { get; }
|
||||
|
||||
[Field ("CHHapticPatternKeyTime")]
|
||||
NSString TimeKey { get; }
|
||||
|
||||
[Field ("CHHapticPatternKeyEventDuration")]
|
||||
NSString EventDurationKey { get; }
|
||||
|
||||
[Field ("CHHapticPatternKeyEventWaveformPath")]
|
||||
NSString EventWaveformPathKey { get; }
|
||||
|
||||
[Field ("CHHapticPatternKeyEventParameters")]
|
||||
NSString EventParametersKey { get; }
|
||||
|
||||
[Field ("CHHapticPatternKeyParameter")]
|
||||
NSString ParameterKey { get; }
|
||||
|
||||
[Field ("CHHapticPatternKeyParameterID")]
|
||||
NSString ParameterIdKey { get; }
|
||||
|
||||
[Field ("CHHapticPatternKeyParameterValue")]
|
||||
NSString ParameterValueKey { get; }
|
||||
|
||||
[Field ("CHHapticPatternKeyParameterCurve")]
|
||||
NSString ParameterCurveKey { get; }
|
||||
|
||||
[Field ("CHHapticPatternKeyParameterCurveControlPoints")]
|
||||
NSString ParameterCurveControlPointsKey { get; }
|
||||
}
|
||||
|
||||
[Mac (10,15), iOS (13,0)]
|
||||
[StrongDictionary ("CHHapticPatternDefinitionKeys")]
|
||||
partial interface CHHapticPatternDefinition {
|
||||
double Version { get; set; }
|
||||
NSArray Pattern { get; set; }
|
||||
NSDictionary Event { get; set; }
|
||||
CHHapticEventType EventType { get; set; }
|
||||
double Time { get; set; }
|
||||
double EventDuration { get; set; }
|
||||
NSString EventWaveformPath { get; set; }
|
||||
NSArray EventParameters { get; set; }
|
||||
NSDictionary Parameter { get; set; }
|
||||
// we need to do a NSString because it can be a CHHapticEventParameterID or a CHHapticDynamicParameterID
|
||||
// which are two different enums. User will have to do the conversion
|
||||
[Advice ("Value can be either a CHHapticEventParameterId or a CHHapticDynamicParameterId. A check is needed against both enums.")]
|
||||
NSString ParameterId { get; set; }
|
||||
double ParameterValue { get; set; }
|
||||
// we do not have docs or header information about the exact type
|
||||
[Export ("ParameterCurveKey")]
|
||||
NSObject WeakParameterCurve { get; set; }
|
||||
[Export ("ParameterCurveControlPointsKey")]
|
||||
NSObject WeakParameterCurveControlPoints { get; set; }
|
||||
}
|
||||
|
||||
[Mac (10,15), iOS (13,0)]
|
||||
[BaseType (typeof(NSObject))]
|
||||
[DisableDefaultCtor]
|
||||
interface CHHapticPattern {
|
||||
[Export ("duration")]
|
||||
double Duration { get; }
|
||||
|
||||
[Export ("initWithEvents:parameters:error:")]
|
||||
IntPtr Constructor (CHHapticEvent[] events, CHHapticDynamicParameter[] parameters, [NullAllowed] out NSError outError);
|
||||
|
||||
[Export ("initWithEvents:parameterCurves:error:")]
|
||||
IntPtr Constructor (CHHapticEvent[] events, CHHapticParameterCurve[] parameterCurves, [NullAllowed] out NSError outError);
|
||||
|
||||
[Export ("initWithDictionary:error:")]
|
||||
IntPtr Constructor (NSDictionary patternDict, [NullAllowed] out NSError outError);
|
||||
|
||||
[Wrap ("this (patternDefinition?.Dictionary, out outError)")]
|
||||
IntPtr Constructor (CHHapticPatternDefinition patternDefinition, [NullAllowed] out NSError outError);
|
||||
|
||||
[Internal]
|
||||
[Export ("exportDictionaryAndReturnError:")]
|
||||
[return: NullAllowed]
|
||||
NSDictionary<NSString, NSObject> _ExportDictionary ([NullAllowed] out NSError outError);
|
||||
|
||||
[Wrap ("new CHHapticPatternDefinition (_ExportDictionary (out outError))")]
|
||||
CHHapticPatternDefinition Export ([NullAllowed] out NSError outError);
|
||||
}
|
||||
}
|
|
@ -487,7 +487,12 @@ COREGRAPHICS_SOURCES = \
|
|||
CoreGraphics/CGPDFStream.cs \
|
||||
CoreGraphics/CGPDFString.cs \
|
||||
CoreGraphics/CGShading.cs \
|
||||
|
||||
|
||||
# CoreHaptics
|
||||
|
||||
COREHAPTICS_API_SOURCES = \
|
||||
CoreHaptics/Enums.cs \
|
||||
|
||||
# CoreImage
|
||||
|
||||
COREIMAGE_CORE_SOURCES = \
|
||||
|
@ -1885,6 +1890,7 @@ IOS_FRAMEWORKS = \
|
|||
CoreAnimation \
|
||||
CoreAudioKit \
|
||||
CoreGraphics \
|
||||
CoreHaptics \
|
||||
CoreImage \
|
||||
CoreLocation \
|
||||
CoreMIDI \
|
||||
|
|
|
@ -53,6 +53,8 @@ namespace Introspection {
|
|||
case "UIViewControllerPreviewingWrapper":
|
||||
return property.Name == "WeakDelegate";
|
||||
#endif
|
||||
case "CHHapticPatternDefinition":
|
||||
return property.Name == "WeakParameterCurve" || property.Name == "WeakParameterCurveControlPoints";
|
||||
}
|
||||
return base.Skip (property);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
# addedvia inheritance from CHHapticPatternPlayer
|
||||
!missing-protocol-member! CHHapticAdvancedPatternPlayer::isMuted not found
|
||||
!missing-protocol-member! CHHapticAdvancedPatternPlayer::setIsMuted: not found
|
|
@ -1,114 +0,0 @@
|
|||
!missing-enum! CHHapticEngineFinishedAction not bound
|
||||
!missing-enum! CHHapticEngineStoppedReason not bound
|
||||
!missing-enum! CHHapticErrorCode not bound
|
||||
!missing-field! CHHapticDynamicParameterIDAudioAttackTimeControl not bound
|
||||
!missing-field! CHHapticDynamicParameterIDAudioBrightnessControl not bound
|
||||
!missing-field! CHHapticDynamicParameterIDAudioDecayTimeControl not bound
|
||||
!missing-field! CHHapticDynamicParameterIDAudioPanControl not bound
|
||||
!missing-field! CHHapticDynamicParameterIDAudioPitchControl not bound
|
||||
!missing-field! CHHapticDynamicParameterIDAudioReleaseTimeControl not bound
|
||||
!missing-field! CHHapticDynamicParameterIDAudioVolumeControl not bound
|
||||
!missing-field! CHHapticDynamicParameterIDHapticAttackTimeControl not bound
|
||||
!missing-field! CHHapticDynamicParameterIDHapticDecayTimeControl not bound
|
||||
!missing-field! CHHapticDynamicParameterIDHapticIntensityControl not bound
|
||||
!missing-field! CHHapticDynamicParameterIDHapticReleaseTimeControl not bound
|
||||
!missing-field! CHHapticDynamicParameterIDHapticSharpnessControl not bound
|
||||
!missing-field! CHHapticEventParameterIDAttackTime not bound
|
||||
!missing-field! CHHapticEventParameterIDAudioBrightness not bound
|
||||
!missing-field! CHHapticEventParameterIDAudioPan not bound
|
||||
!missing-field! CHHapticEventParameterIDAudioPitch not bound
|
||||
!missing-field! CHHapticEventParameterIDAudioVolume not bound
|
||||
!missing-field! CHHapticEventParameterIDDecayTime not bound
|
||||
!missing-field! CHHapticEventParameterIDHapticIntensity not bound
|
||||
!missing-field! CHHapticEventParameterIDHapticSharpness not bound
|
||||
!missing-field! CHHapticEventParameterIDReleaseTime not bound
|
||||
!missing-field! CHHapticEventParameterIDSustained not bound
|
||||
!missing-field! CHHapticEventTypeAudioContinuous not bound
|
||||
!missing-field! CHHapticEventTypeAudioCustom not bound
|
||||
!missing-field! CHHapticEventTypeHapticContinuous not bound
|
||||
!missing-field! CHHapticEventTypeHapticTransient not bound
|
||||
!missing-field! CHHapticPatternKeyEvent not bound
|
||||
!missing-field! CHHapticPatternKeyEventDuration not bound
|
||||
!missing-field! CHHapticPatternKeyEventParameters not bound
|
||||
!missing-field! CHHapticPatternKeyEventType not bound
|
||||
!missing-field! CHHapticPatternKeyEventWaveformPath not bound
|
||||
!missing-field! CHHapticPatternKeyParameter not bound
|
||||
!missing-field! CHHapticPatternKeyParameterCurve not bound
|
||||
!missing-field! CHHapticPatternKeyParameterCurveControlPoints not bound
|
||||
!missing-field! CHHapticPatternKeyParameterID not bound
|
||||
!missing-field! CHHapticPatternKeyParameterValue not bound
|
||||
!missing-field! CHHapticPatternKeyPattern not bound
|
||||
!missing-field! CHHapticPatternKeyTime not bound
|
||||
!missing-field! CHHapticPatternKeyVersion not bound
|
||||
!missing-protocol! CHHapticAdvancedPatternPlayer not bound
|
||||
!missing-protocol! CHHapticDeviceCapability not bound
|
||||
!missing-protocol! CHHapticParameterAttributes not bound
|
||||
!missing-protocol! CHHapticPatternPlayer not bound
|
||||
!missing-selector! +CHHapticEngine::capabilitiesForHardware not bound
|
||||
!missing-selector! CHHapticDynamicParameter::initWithParameterID:value:relativeTime: not bound
|
||||
!missing-selector! CHHapticDynamicParameter::parameterID not bound
|
||||
!missing-selector! CHHapticDynamicParameter::relativeTime not bound
|
||||
!missing-selector! CHHapticDynamicParameter::setRelativeTime: not bound
|
||||
!missing-selector! CHHapticDynamicParameter::setValue: not bound
|
||||
!missing-selector! CHHapticDynamicParameter::value not bound
|
||||
!missing-selector! CHHapticEngine::createAdvancedPlayerWithPattern:error: not bound
|
||||
!missing-selector! CHHapticEngine::createPlayerWithPattern:error: not bound
|
||||
!missing-selector! CHHapticEngine::currentTime not bound
|
||||
!missing-selector! CHHapticEngine::initAndReturnError: not bound
|
||||
!missing-selector! CHHapticEngine::initWithAudioSession:error: not bound
|
||||
!missing-selector! CHHapticEngine::isAutoShutdownEnabled not bound
|
||||
!missing-selector! CHHapticEngine::isMutedForAudio not bound
|
||||
!missing-selector! CHHapticEngine::isMutedForHaptics not bound
|
||||
!missing-selector! CHHapticEngine::notifyWhenPlayersFinished: not bound
|
||||
!missing-selector! CHHapticEngine::playPatternFromData:error: not bound
|
||||
!missing-selector! CHHapticEngine::playPatternFromURL:error: not bound
|
||||
!missing-selector! CHHapticEngine::playsHapticsOnly not bound
|
||||
!missing-selector! CHHapticEngine::registerAudioResource:options:error: not bound
|
||||
!missing-selector! CHHapticEngine::resetHandler not bound
|
||||
!missing-selector! CHHapticEngine::setAutoShutdownEnabled: not bound
|
||||
!missing-selector! CHHapticEngine::setIsMutedForAudio: not bound
|
||||
!missing-selector! CHHapticEngine::setIsMutedForHaptics: not bound
|
||||
!missing-selector! CHHapticEngine::setPlaysHapticsOnly: not bound
|
||||
!missing-selector! CHHapticEngine::setResetHandler: not bound
|
||||
!missing-selector! CHHapticEngine::setStoppedHandler: not bound
|
||||
!missing-selector! CHHapticEngine::startAndReturnError: not bound
|
||||
!missing-selector! CHHapticEngine::startWithCompletionHandler: not bound
|
||||
!missing-selector! CHHapticEngine::stoppedHandler not bound
|
||||
!missing-selector! CHHapticEngine::stopWithCompletionHandler: not bound
|
||||
!missing-selector! CHHapticEngine::unregisterAudioResource:error: not bound
|
||||
!missing-selector! CHHapticEvent::duration not bound
|
||||
!missing-selector! CHHapticEvent::eventParameters not bound
|
||||
!missing-selector! CHHapticEvent::initWithAudioResourceID:parameters:relativeTime: not bound
|
||||
!missing-selector! CHHapticEvent::initWithAudioResourceID:parameters:relativeTime:duration: not bound
|
||||
!missing-selector! CHHapticEvent::initWithEventType:parameters:relativeTime: not bound
|
||||
!missing-selector! CHHapticEvent::initWithEventType:parameters:relativeTime:duration: not bound
|
||||
!missing-selector! CHHapticEvent::relativeTime not bound
|
||||
!missing-selector! CHHapticEvent::setDuration: not bound
|
||||
!missing-selector! CHHapticEvent::setRelativeTime: not bound
|
||||
!missing-selector! CHHapticEvent::type not bound
|
||||
!missing-selector! CHHapticEventParameter::initWithParameterID:value: not bound
|
||||
!missing-selector! CHHapticEventParameter::parameterID not bound
|
||||
!missing-selector! CHHapticEventParameter::setValue: not bound
|
||||
!missing-selector! CHHapticEventParameter::value not bound
|
||||
!missing-selector! CHHapticParameterCurve::controlPoints not bound
|
||||
!missing-selector! CHHapticParameterCurve::initWithParameterID:controlPoints:relativeTime: not bound
|
||||
!missing-selector! CHHapticParameterCurve::parameterID not bound
|
||||
!missing-selector! CHHapticParameterCurve::relativeTime not bound
|
||||
!missing-selector! CHHapticParameterCurve::setRelativeTime: not bound
|
||||
!missing-selector! CHHapticParameterCurveControlPoint::initWithRelativeTime:value: not bound
|
||||
!missing-selector! CHHapticParameterCurveControlPoint::relativeTime not bound
|
||||
!missing-selector! CHHapticParameterCurveControlPoint::setRelativeTime: not bound
|
||||
!missing-selector! CHHapticParameterCurveControlPoint::setValue: not bound
|
||||
!missing-selector! CHHapticParameterCurveControlPoint::value not bound
|
||||
!missing-selector! CHHapticPattern::duration not bound
|
||||
!missing-selector! CHHapticPattern::exportDictionaryAndReturnError: not bound
|
||||
!missing-selector! CHHapticPattern::initWithDictionary:error: not bound
|
||||
!missing-selector! CHHapticPattern::initWithEvents:parameterCurves:error: not bound
|
||||
!missing-selector! CHHapticPattern::initWithEvents:parameters:error: not bound
|
||||
!missing-type! CHHapticDynamicParameter not bound
|
||||
!missing-type! CHHapticEngine not bound
|
||||
!missing-type! CHHapticEvent not bound
|
||||
!missing-type! CHHapticEventParameter not bound
|
||||
!missing-type! CHHapticParameterCurve not bound
|
||||
!missing-type! CHHapticParameterCurveControlPoint not bound
|
||||
!missing-type! CHHapticPattern not bound
|
|
@ -188,6 +188,7 @@ public class Frameworks : Dictionary <string, Framework>
|
|||
{ "PencilKit", "PencilKit", 10,15 },
|
||||
{ "Speech", "Speech", 10,15 },
|
||||
{ "LinkPresentation", "LinkPresentation", 10,15 },
|
||||
{ "CoreHaptics", "CoreHaptics", 10,15 },
|
||||
};
|
||||
}
|
||||
return mac_frameworks;
|
||||
|
@ -314,6 +315,7 @@ public class Frameworks : Dictionary <string, Framework>
|
|||
{ "Network", "Network", 12, 0 },
|
||||
|
||||
{ "BackgroundTasks", "BackgroundTasks", 13, 0 },
|
||||
{ "CoreHaptics", "CoreHaptics", 13, 0 },
|
||||
{ "LinkPresentation", "LinkPresentation", 13, 0 },
|
||||
{ "PencilKit", "PencilKit", 13, 0 },
|
||||
{ "QuickLookThumbnailing", "QuickLookThumbnailing", 13,0 },
|
||||
|
|
|
@ -146,8 +146,11 @@ SIMLAUNCHER_FRAMEWORKS = \
|
|||
-weak_framework IdentityLookupUI \
|
||||
-weak_framework NaturalLanguage \
|
||||
-weak_framework Network \
|
||||
-weak_framework IdentityLookupUI \
|
||||
-weak_framework VisionKit \
|
||||
\
|
||||
-weak_framework BackgroundTasks \
|
||||
-weak_framework CoreHaptics \
|
||||
-weak_framework LinkPresentation \
|
||||
-weak_framework PencilKit \
|
||||
-weak_framework QuickLookThumbnailing \
|
||||
|
|
Загрузка…
Ссылка в новой задаче