diff --git a/packages/types-minimal/package.json b/packages/types-minimal/package.json index a32a55ced..e29aa78ed 100644 --- a/packages/types-minimal/package.json +++ b/packages/types-minimal/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/types-minimal", - "version": "8.2.0", + "version": "8.2.2", "description": "NativeScript 'Minimal' Types for only the latest Android and iOS sdks.", "homepage": "https://nativescript.org", "repository": { diff --git a/packages/types-minimal/src/lib/ios/ios.d.ts b/packages/types-minimal/src/lib/ios/ios.d.ts index f64bb4237..92e10d4c0 100644 --- a/packages/types-minimal/src/lib/ios/ios.d.ts +++ b/packages/types-minimal/src/lib/ios/ios.d.ts @@ -1,5 +1,10 @@ /// +/// +/// /// /// /// +/// +/// /// +/// diff --git a/packages/types-minimal/src/lib/ios/objc-x86_64/objc!ARKit.d.ts b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!ARKit.d.ts new file mode 100644 index 000000000..617f0c51f --- /dev/null +++ b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!ARKit.d.ts @@ -0,0 +1,1990 @@ + +declare const enum ARAltitudeSource { + + Unknown = 0, + + Coarse = 1, + + Precise = 2, + + UserDefined = 3 +} + +declare class ARAnchor extends NSObject implements ARAnchorCopying, NSSecureCoding { + + static alloc(): ARAnchor; // inherited from NSObject + + static new(): ARAnchor; // inherited from NSObject + + readonly identifier: NSUUID; + + readonly name: string; + + readonly sessionIdentifier: NSUUID; + + readonly transform: simd_float4x4; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { anchor: ARAnchor; }); // inherited from ARAnchorCopying + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + constructor(o: { name: string; transform: simd_float4x4; }); + + constructor(o: { transform: simd_float4x4; }); + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + encodeWithCoder(coder: NSCoder): void; + + initWithAnchor(anchor: ARAnchor): this; + + initWithCoder(coder: NSCoder): this; + + initWithNameTransform(name: string, transform: simd_float4x4): this; + + initWithTransform(transform: simd_float4x4): this; +} + +interface ARAnchorCopying extends NSCopying { + + initWithAnchor?(anchor: ARAnchor): ARAnchorCopying; +} +declare var ARAnchorCopying: { + + prototype: ARAnchorCopying; +}; + +declare class ARAppClipCodeAnchor extends ARAnchor implements ARTrackable { + + static alloc(): ARAppClipCodeAnchor; // inherited from NSObject + + static new(): ARAppClipCodeAnchor; // inherited from NSObject + + readonly radius: number; + + readonly url: NSURL; + + readonly urlDecodingState: ARAppClipCodeURLDecodingState; + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + readonly hash: number; // inherited from NSObjectProtocol + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + readonly isTracked: boolean; // inherited from ARTrackable + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + readonly // inherited from NSObjectProtocol + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; +} + +declare const enum ARAppClipCodeURLDecodingState { + + Decoding = 0, + + Failed = 1, + + Decoded = 2 +} + +declare var ARBlendShapeLocationBrowDownLeft: string; + +declare var ARBlendShapeLocationBrowDownRight: string; + +declare var ARBlendShapeLocationBrowInnerUp: string; + +declare var ARBlendShapeLocationBrowOuterUpLeft: string; + +declare var ARBlendShapeLocationBrowOuterUpRight: string; + +declare var ARBlendShapeLocationCheekPuff: string; + +declare var ARBlendShapeLocationCheekSquintLeft: string; + +declare var ARBlendShapeLocationCheekSquintRight: string; + +declare var ARBlendShapeLocationEyeBlinkLeft: string; + +declare var ARBlendShapeLocationEyeBlinkRight: string; + +declare var ARBlendShapeLocationEyeLookDownLeft: string; + +declare var ARBlendShapeLocationEyeLookDownRight: string; + +declare var ARBlendShapeLocationEyeLookInLeft: string; + +declare var ARBlendShapeLocationEyeLookInRight: string; + +declare var ARBlendShapeLocationEyeLookOutLeft: string; + +declare var ARBlendShapeLocationEyeLookOutRight: string; + +declare var ARBlendShapeLocationEyeLookUpLeft: string; + +declare var ARBlendShapeLocationEyeLookUpRight: string; + +declare var ARBlendShapeLocationEyeSquintLeft: string; + +declare var ARBlendShapeLocationEyeSquintRight: string; + +declare var ARBlendShapeLocationEyeWideLeft: string; + +declare var ARBlendShapeLocationEyeWideRight: string; + +declare var ARBlendShapeLocationJawForward: string; + +declare var ARBlendShapeLocationJawLeft: string; + +declare var ARBlendShapeLocationJawOpen: string; + +declare var ARBlendShapeLocationJawRight: string; + +declare var ARBlendShapeLocationMouthClose: string; + +declare var ARBlendShapeLocationMouthDimpleLeft: string; + +declare var ARBlendShapeLocationMouthDimpleRight: string; + +declare var ARBlendShapeLocationMouthFrownLeft: string; + +declare var ARBlendShapeLocationMouthFrownRight: string; + +declare var ARBlendShapeLocationMouthFunnel: string; + +declare var ARBlendShapeLocationMouthLeft: string; + +declare var ARBlendShapeLocationMouthLowerDownLeft: string; + +declare var ARBlendShapeLocationMouthLowerDownRight: string; + +declare var ARBlendShapeLocationMouthPressLeft: string; + +declare var ARBlendShapeLocationMouthPressRight: string; + +declare var ARBlendShapeLocationMouthPucker: string; + +declare var ARBlendShapeLocationMouthRight: string; + +declare var ARBlendShapeLocationMouthRollLower: string; + +declare var ARBlendShapeLocationMouthRollUpper: string; + +declare var ARBlendShapeLocationMouthShrugLower: string; + +declare var ARBlendShapeLocationMouthShrugUpper: string; + +declare var ARBlendShapeLocationMouthSmileLeft: string; + +declare var ARBlendShapeLocationMouthSmileRight: string; + +declare var ARBlendShapeLocationMouthStretchLeft: string; + +declare var ARBlendShapeLocationMouthStretchRight: string; + +declare var ARBlendShapeLocationMouthUpperUpLeft: string; + +declare var ARBlendShapeLocationMouthUpperUpRight: string; + +declare var ARBlendShapeLocationNoseSneerLeft: string; + +declare var ARBlendShapeLocationNoseSneerRight: string; + +declare var ARBlendShapeLocationTongueOut: string; + +declare class ARBody2D extends NSObject { + + static alloc(): ARBody2D; // inherited from NSObject + + static new(): ARBody2D; // inherited from NSObject + + readonly skeleton: ARSkeleton2D; +} + +declare class ARBodyAnchor extends ARAnchor implements ARTrackable { + + static alloc(): ARBodyAnchor; // inherited from NSObject + + static new(): ARBodyAnchor; // inherited from NSObject + + readonly estimatedScaleFactor: number; + + readonly skeleton: ARSkeleton3D; + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + readonly hash: number; // inherited from NSObjectProtocol + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + readonly isTracked: boolean; // inherited from ARTrackable + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + readonly // inherited from NSObjectProtocol + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; +} + +declare class ARBodyTrackingConfiguration extends ARConfiguration { + + static alloc(): ARBodyTrackingConfiguration; // inherited from NSObject + + static new(): ARBodyTrackingConfiguration; // inherited from NSObject + + appClipCodeTrackingEnabled: boolean; + + autoFocusEnabled: boolean; + + automaticImageScaleEstimationEnabled: boolean; + + automaticSkeletonScaleEstimationEnabled: boolean; + + detectionImages: NSSet; + + environmentTexturing: AREnvironmentTexturing; + + initialWorldMap: ARWorldMap; + + maximumNumberOfTrackedImages: number; + + planeDetection: ARPlaneDetection; + + wantsHDREnvironmentTextures: boolean; + + static readonly supportsAppClipCodeTracking: boolean; +} + +declare class ARCamera extends NSObject implements NSCopying { + + static alloc(): ARCamera; // inherited from NSObject + + static new(): ARCamera; // inherited from NSObject + + readonly eulerAngles: interop.Reference; + + readonly exposureDuration: number; + + readonly exposureOffset: number; + + readonly imageResolution: CGSize; + + readonly intrinsics: simd_float3x3; + + readonly projectionMatrix: simd_float4x4; + + readonly trackingState: ARTrackingState; + + readonly trackingStateReason: ARTrackingStateReason; + + readonly transform: simd_float4x4; + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + projectPointOrientationViewportSize(point: interop.Reference, orientation: UIInterfaceOrientation, viewportSize: CGSize): CGPoint; + + projectionMatrixForOrientationViewportSizeZNearZFar(orientation: UIInterfaceOrientation, viewportSize: CGSize, zNear: number, zFar: number): simd_float4x4; + + unprojectPointOntoPlaneWithTransformOrientationViewportSize(point: CGPoint, planeTransform: simd_float4x4, orientation: UIInterfaceOrientation, viewportSize: CGSize): interop.Reference; + + viewMatrixForOrientation(orientation: UIInterfaceOrientation): simd_float4x4; +} + +declare const enum ARCoachingGoal { + + Tracking = 0, + + HorizontalPlane = 1, + + VerticalPlane = 2, + + AnyPlane = 3, + + GeoTracking = 4 +} + +declare class ARCoachingOverlayView extends UIView { + + static alloc(): ARCoachingOverlayView; // inherited from NSObject + + static appearance(): ARCoachingOverlayView; // inherited from UIAppearance + + static appearanceForTraitCollection(trait: UITraitCollection): ARCoachingOverlayView; // inherited from UIAppearance + + static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): ARCoachingOverlayView; // inherited from UIAppearance + + static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray | typeof NSObject[]): ARCoachingOverlayView; // inherited from UIAppearance + + static appearanceWhenContainedIn(ContainerClass: typeof NSObject): ARCoachingOverlayView; // inherited from UIAppearance + + static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray | typeof NSObject[]): ARCoachingOverlayView; // inherited from UIAppearance + + static new(): ARCoachingOverlayView; // inherited from NSObject + + activatesAutomatically: boolean; + + delegate: ARCoachingOverlayViewDelegate; + + goal: ARCoachingGoal; + + readonly isActive: boolean; + + session: ARSession; + + sessionProvider: NSObject; + + setActiveAnimated(active: boolean, animated: boolean): void; +} + +interface ARCoachingOverlayViewDelegate extends NSObjectProtocol { + + coachingOverlayViewDidDeactivate?(coachingOverlayView: ARCoachingOverlayView): void; + + coachingOverlayViewDidRequestSessionReset?(coachingOverlayView: ARCoachingOverlayView): void; + + coachingOverlayViewWillActivate?(coachingOverlayView: ARCoachingOverlayView): void; +} +declare var ARCoachingOverlayViewDelegate: { + + prototype: ARCoachingOverlayViewDelegate; +}; + +declare class ARCollaborationData extends NSObject implements NSSecureCoding { + + static alloc(): ARCollaborationData; // inherited from NSObject + + static new(): ARCollaborationData; // inherited from NSObject + + readonly priority: ARCollaborationDataPriority; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} + +declare const enum ARCollaborationDataPriority { + + Critical = 0, + + Optional = 1 +} + +declare const enum ARConfidenceLevel { + + Low = 0, + + Medium = 1, + + High = 2 +} + +declare class ARConfiguration extends NSObject implements NSCopying { + + static alloc(): ARConfiguration; // inherited from NSObject + + static new(): ARConfiguration; // inherited from NSObject + + static supportsFrameSemantics(frameSemantics: ARFrameSemantics): boolean; + + frameSemantics: ARFrameSemantics; + + lightEstimationEnabled: boolean; + + providesAudioData: boolean; + + videoFormat: ARVideoFormat; + + worldAlignment: ARWorldAlignment; + + static readonly isSupported: boolean; + + static readonly supportedVideoFormats: NSArray; + + copyWithZone(zone: interop.Pointer | interop.Reference): any; +} + +declare class ARDepthData extends NSObject { + + static alloc(): ARDepthData; // inherited from NSObject + + static new(): ARDepthData; // inherited from NSObject + + readonly confidenceMap: any; + + readonly depthMap: any; +} + +declare class ARDirectionalLightEstimate extends ARLightEstimate { + + static alloc(): ARDirectionalLightEstimate; // inherited from NSObject + + static new(): ARDirectionalLightEstimate; // inherited from NSObject + + readonly primaryLightDirection: interop.Reference; + + readonly primaryLightIntensity: number; + + readonly sphericalHarmonicsCoefficients: NSData; +} + +declare class AREnvironmentProbeAnchor extends ARAnchor { + + static alloc(): AREnvironmentProbeAnchor; // inherited from NSObject + + static new(): AREnvironmentProbeAnchor; // inherited from NSObject + + readonly environmentTexture: MTLTexture; + + readonly extent: interop.Reference; + + constructor(o: { name: string; transform: simd_float4x4; extent: interop.Reference; }); + + constructor(o: { transform: simd_float4x4; extent: interop.Reference; }); + + initWithNameTransformExtent(name: string, transform: simd_float4x4, extent: interop.Reference): this; + + initWithTransformExtent(transform: simd_float4x4, extent: interop.Reference): this; +} + +declare const enum AREnvironmentTexturing { + + None = 0, + + Manual = 1, + + Automatic = 2 +} + +declare const enum ARErrorCode { + + UnsupportedConfiguration = 100, + + SensorUnavailable = 101, + + SensorFailed = 102, + + CameraUnauthorized = 103, + + MicrophoneUnauthorized = 104, + + LocationUnauthorized = 105, + + WorldTrackingFailed = 200, + + GeoTrackingNotAvailableAtLocation = 201, + + GeoTrackingFailed = 202, + + InvalidReferenceImage = 300, + + InvalidReferenceObject = 301, + + InvalidWorldMap = 302, + + InvalidConfiguration = 303, + + InvalidCollaborationData = 304, + + InsufficientFeatures = 400, + + ObjectMergeFailed = 401, + + FileIOFailed = 500, + + RequestFailed = 501 +} + +declare var ARErrorDomain: string; + +declare class ARFaceAnchor extends ARAnchor implements ARTrackable { + + static alloc(): ARFaceAnchor; // inherited from NSObject + + static new(): ARFaceAnchor; // inherited from NSObject + + readonly blendShapes: NSDictionary; + + readonly geometry: ARFaceGeometry; + + readonly leftEyeTransform: simd_float4x4; + + readonly lookAtPoint: interop.Reference; + + readonly rightEyeTransform: simd_float4x4; + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + readonly hash: number; // inherited from NSObjectProtocol + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + readonly isTracked: boolean; // inherited from ARTrackable + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + readonly // inherited from NSObjectProtocol + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; +} + +declare class ARFaceGeometry extends NSObject implements NSCopying, NSSecureCoding { + + static alloc(): ARFaceGeometry; // inherited from NSObject + + static new(): ARFaceGeometry; // inherited from NSObject + + readonly textureCoordinateCount: number; + + readonly textureCoordinates: interop.Pointer | interop.Reference>; + + readonly triangleCount: number; + + readonly triangleIndices: interop.Pointer | interop.Reference; + + readonly vertexCount: number; + + readonly vertices: interop.Pointer | interop.Reference>; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { blendShapes: NSDictionary; }); + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + encodeWithCoder(coder: NSCoder): void; + + initWithBlendShapes(blendShapes: NSDictionary): this; + + initWithCoder(coder: NSCoder): this; +} + +declare class ARFaceTrackingConfiguration extends ARConfiguration { + + static alloc(): ARFaceTrackingConfiguration; // inherited from NSObject + + static new(): ARFaceTrackingConfiguration; // inherited from NSObject + + maximumNumberOfTrackedFaces: number; + + worldTrackingEnabled: boolean; + + static readonly supportedNumberOfTrackedFaces: number; + + static readonly supportsWorldTracking: boolean; +} + +declare class ARFrame extends NSObject implements NSCopying { + + static alloc(): ARFrame; // inherited from NSObject + + static new(): ARFrame; // inherited from NSObject + + readonly anchors: NSArray; + + readonly camera: ARCamera; + + readonly cameraGrainIntensity: number; + + readonly cameraGrainTexture: MTLTexture; + + readonly capturedDepthData: AVDepthData; + + readonly capturedDepthDataTimestamp: number; + + readonly capturedImage: any; + + readonly detectedBody: ARBody2D; + + readonly estimatedDepthData: any; + + readonly geoTrackingStatus: ARGeoTrackingStatus; + + readonly lightEstimate: ARLightEstimate; + + readonly rawFeaturePoints: ARPointCloud; + + readonly sceneDepth: ARDepthData; + + readonly segmentationBuffer: any; + + readonly smoothedSceneDepth: ARDepthData; + + readonly timestamp: number; + + readonly worldMappingStatus: ARWorldMappingStatus; + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + displayTransformForOrientationViewportSize(orientation: UIInterfaceOrientation, viewportSize: CGSize): CGAffineTransform; + + hitTestTypes(point: CGPoint, types: ARHitTestResultType): NSArray; + + raycastQueryFromPointAllowingTargetAlignment(point: CGPoint, target: ARRaycastTarget, alignment: ARRaycastTargetAlignment): ARRaycastQuery; +} + +declare const enum ARFrameSemantics { + + None = 0, + + PersonSegmentation = 1, + + PersonSegmentationWithDepth = 3, + + BodyDetection = 4, + + SceneDepth = 8, + + SmoothedSceneDepth = 16 +} + +declare class ARGeoAnchor extends ARAnchor implements ARTrackable { + + static alloc(): ARGeoAnchor; // inherited from NSObject + + static new(): ARGeoAnchor; // inherited from NSObject + + readonly altitude: number; + + readonly altitudeSource: ARAltitudeSource; + + readonly coordinate: CLLocationCoordinate2D; + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + readonly hash: number; // inherited from NSObjectProtocol + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + readonly isTracked: boolean; // inherited from ARTrackable + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + readonly // inherited from NSObjectProtocol + + constructor(o: { coordinate: CLLocationCoordinate2D; }); + + constructor(o: { coordinate: CLLocationCoordinate2D; altitude: number; }); + + constructor(o: { name: string; coordinate: CLLocationCoordinate2D; }); + + constructor(o: { name: string; coordinate: CLLocationCoordinate2D; altitude: number; }); + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + initWithCoordinate(coordinate: CLLocationCoordinate2D): this; + + initWithCoordinateAltitude(coordinate: CLLocationCoordinate2D, altitude: number): this; + + initWithNameCoordinate(name: string, coordinate: CLLocationCoordinate2D): this; + + initWithNameCoordinateAltitude(name: string, coordinate: CLLocationCoordinate2D, altitude: number): this; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; +} + +declare const enum ARGeoTrackingAccuracy { + + Undetermined = 0, + + Low = 1, + + Medium = 2, + + High = 3 +} + +declare class ARGeoTrackingConfiguration extends ARConfiguration { + + static alloc(): ARGeoTrackingConfiguration; // inherited from NSObject + + static checkAvailabilityAtCoordinateCompletionHandler(coordinate: CLLocationCoordinate2D, completionHandler: (p1: boolean, p2: NSError) => void): void; + + static checkAvailabilityWithCompletionHandler(completionHandler: (p1: boolean, p2: NSError) => void): void; + + static new(): ARGeoTrackingConfiguration; // inherited from NSObject + + appClipCodeTrackingEnabled: boolean; + + automaticImageScaleEstimationEnabled: boolean; + + detectionImages: NSSet; + + detectionObjects: NSSet; + + environmentTexturing: AREnvironmentTexturing; + + maximumNumberOfTrackedImages: number; + + planeDetection: ARPlaneDetection; + + wantsHDREnvironmentTextures: boolean; + + static readonly supportsAppClipCodeTracking: boolean; +} + +declare const enum ARGeoTrackingState { + + NotAvailable = 0, + + Initializing = 1, + + Localizing = 2, + + Localized = 3 +} + +declare const enum ARGeoTrackingStateReason { + + None = 0, + + NotAvailableAtLocation = 1, + + NeedLocationPermissions = 2, + + WorldTrackingUnstable = 3, + + WaitingForLocation = 4, + + WaitingForAvailabilityCheck = 5, + + GeoDataNotLoaded = 6, + + DevicePointedTooLow = 7, + + VisualLocalizationFailed = 8 +} + +declare class ARGeoTrackingStatus extends NSObject implements NSCopying, NSSecureCoding { + + static alloc(): ARGeoTrackingStatus; // inherited from NSObject + + static new(): ARGeoTrackingStatus; // inherited from NSObject + + readonly accuracy: ARGeoTrackingAccuracy; + + readonly state: ARGeoTrackingState; + + readonly stateReason: ARGeoTrackingStateReason; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} + +declare class ARGeometryElement extends NSObject implements NSSecureCoding { + + static alloc(): ARGeometryElement; // inherited from NSObject + + static new(): ARGeometryElement; // inherited from NSObject + + readonly buffer: MTLBuffer; + + readonly bytesPerIndex: number; + + readonly count: number; + + readonly indexCountPerPrimitive: number; + + readonly primitiveType: ARGeometryPrimitiveType; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} + +declare const enum ARGeometryPrimitiveType { + + Line = 0, + + Triangle = 1 +} + +declare class ARGeometrySource extends NSObject implements NSSecureCoding { + + static alloc(): ARGeometrySource; // inherited from NSObject + + static new(): ARGeometrySource; // inherited from NSObject + + readonly buffer: MTLBuffer; + + readonly componentsPerVector: number; + + readonly count: number; + + readonly format: MTLVertexFormat; + + readonly offset: number; + + readonly stride: number; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} + +declare class ARHitTestResult extends NSObject { + + static alloc(): ARHitTestResult; // inherited from NSObject + + static new(): ARHitTestResult; // inherited from NSObject + + readonly anchor: ARAnchor; + + readonly distance: number; + + readonly localTransform: simd_float4x4; + + readonly type: ARHitTestResultType; + + readonly worldTransform: simd_float4x4; +} + +declare const enum ARHitTestResultType { + + FeaturePoint = 1, + + EstimatedHorizontalPlane = 2, + + EstimatedVerticalPlane = 4, + + ExistingPlane = 8, + + ExistingPlaneUsingExtent = 16, + + ExistingPlaneUsingGeometry = 32 +} + +declare class ARImageAnchor extends ARAnchor implements ARTrackable { + + static alloc(): ARImageAnchor; // inherited from NSObject + + static new(): ARImageAnchor; // inherited from NSObject + + readonly estimatedScaleFactor: number; + + readonly referenceImage: ARReferenceImage; + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + readonly hash: number; // inherited from NSObjectProtocol + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + readonly isTracked: boolean; // inherited from ARTrackable + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + readonly // inherited from NSObjectProtocol + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; +} + +declare class ARImageTrackingConfiguration extends ARConfiguration { + + static alloc(): ARImageTrackingConfiguration; // inherited from NSObject + + static new(): ARImageTrackingConfiguration; // inherited from NSObject + + autoFocusEnabled: boolean; + + maximumNumberOfTrackedImages: number; + + trackingImages: NSSet; +} + +declare class ARLightEstimate extends NSObject { + + static alloc(): ARLightEstimate; // inherited from NSObject + + static new(): ARLightEstimate; // inherited from NSObject + + readonly ambientColorTemperature: number; + + readonly ambientIntensity: number; +} + +declare class ARMatteGenerator extends NSObject { + + static alloc(): ARMatteGenerator; // inherited from NSObject + + static new(): ARMatteGenerator; // inherited from NSObject + + constructor(o: { device: MTLDevice; matteResolution: ARMatteResolution; }); + + generateDilatedDepthFromFrameCommandBuffer(frame: ARFrame, commandBuffer: MTLCommandBuffer): MTLTexture; + + generateMatteFromFrameCommandBuffer(frame: ARFrame, commandBuffer: MTLCommandBuffer): MTLTexture; + + initWithDeviceMatteResolution(device: MTLDevice, matteResolution: ARMatteResolution): this; +} + +declare const enum ARMatteResolution { + + Full = 0, + + Half = 1 +} + +declare class ARMeshAnchor extends ARAnchor { + + static alloc(): ARMeshAnchor; // inherited from NSObject + + static new(): ARMeshAnchor; // inherited from NSObject + + readonly geometry: ARMeshGeometry; +} + +declare const enum ARMeshClassification { + + None = 0, + + Wall = 1, + + Floor = 2, + + Ceiling = 3, + + Table = 4, + + Seat = 5, + + Window = 6, + + Door = 7 +} + +declare class ARMeshGeometry extends NSObject implements NSSecureCoding { + + static alloc(): ARMeshGeometry; // inherited from NSObject + + static new(): ARMeshGeometry; // inherited from NSObject + + readonly classification: ARGeometrySource; + + readonly faces: ARGeometryElement; + + readonly normals: ARGeometrySource; + + readonly vertices: ARGeometrySource; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} + +declare class ARObjectAnchor extends ARAnchor { + + static alloc(): ARObjectAnchor; // inherited from NSObject + + static new(): ARObjectAnchor; // inherited from NSObject + + readonly referenceObject: ARReferenceObject; +} + +declare class ARObjectScanningConfiguration extends ARConfiguration { + + static alloc(): ARObjectScanningConfiguration; // inherited from NSObject + + static new(): ARObjectScanningConfiguration; // inherited from NSObject + + autoFocusEnabled: boolean; + + planeDetection: ARPlaneDetection; +} + +declare class AROrientationTrackingConfiguration extends ARConfiguration { + + static alloc(): AROrientationTrackingConfiguration; // inherited from NSObject + + static new(): AROrientationTrackingConfiguration; // inherited from NSObject + + autoFocusEnabled: boolean; +} + +declare class ARParticipantAnchor extends ARAnchor { + + static alloc(): ARParticipantAnchor; // inherited from NSObject + + static new(): ARParticipantAnchor; // inherited from NSObject +} + +declare class ARPlaneAnchor extends ARAnchor { + + static alloc(): ARPlaneAnchor; // inherited from NSObject + + static new(): ARPlaneAnchor; // inherited from NSObject + + readonly alignment: ARPlaneAnchorAlignment; + + readonly center: interop.Reference; + + readonly classification: ARPlaneClassification; + + readonly classificationStatus: ARPlaneClassificationStatus; + + readonly extent: interop.Reference; + + readonly geometry: ARPlaneGeometry; + + static readonly classificationSupported: boolean; +} + +declare const enum ARPlaneAnchorAlignment { + + Horizontal = 0, + + Vertical = 1 +} + +declare const enum ARPlaneClassification { + + None = 0, + + Wall = 1, + + Floor = 2, + + Ceiling = 3, + + Table = 4, + + Seat = 5, + + Window = 6, + + Door = 7 +} + +declare const enum ARPlaneClassificationStatus { + + NotAvailable = 0, + + Undetermined = 1, + + Unknown = 2, + + Known = 3 +} + +declare const enum ARPlaneDetection { + + None = 0, + + Horizontal = 1, + + Vertical = 2 +} + +declare class ARPlaneGeometry extends NSObject implements NSSecureCoding { + + static alloc(): ARPlaneGeometry; // inherited from NSObject + + static new(): ARPlaneGeometry; // inherited from NSObject + + readonly boundaryVertexCount: number; + + readonly boundaryVertices: interop.Pointer | interop.Reference>; + + readonly textureCoordinateCount: number; + + readonly textureCoordinates: interop.Pointer | interop.Reference>; + + readonly triangleCount: number; + + readonly triangleIndices: interop.Pointer | interop.Reference; + + readonly vertexCount: number; + + readonly vertices: interop.Pointer | interop.Reference>; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} + +declare class ARPointCloud extends NSObject implements NSSecureCoding { + + static alloc(): ARPointCloud; // inherited from NSObject + + static new(): ARPointCloud; // inherited from NSObject + + readonly count: number; + + readonly identifiers: interop.Pointer | interop.Reference; + + readonly points: interop.Pointer | interop.Reference>; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} + +declare class ARPositionalTrackingConfiguration extends ARConfiguration { + + static alloc(): ARPositionalTrackingConfiguration; // inherited from NSObject + + static new(): ARPositionalTrackingConfiguration; // inherited from NSObject + + initialWorldMap: ARWorldMap; + + planeDetection: ARPlaneDetection; +} + +declare class ARQuickLookPreviewItem extends NSObject implements QLPreviewItem { + + static alloc(): ARQuickLookPreviewItem; // inherited from NSObject + + static new(): ARQuickLookPreviewItem; // inherited from NSObject + + allowsContentScaling: boolean; + + canonicalWebPageURL: NSURL; + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + readonly hash: number; // inherited from NSObjectProtocol + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + readonly previewItemTitle: string; // inherited from QLPreviewItem + + readonly previewItemURL: NSURL; // inherited from QLPreviewItem + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + readonly // inherited from NSObjectProtocol + + constructor(o: { fileAtURL: NSURL; }); + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + initWithFileAtURL(url: NSURL): this; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; +} + +declare class ARRaycastQuery extends NSObject { + + static alloc(): ARRaycastQuery; // inherited from NSObject + + static new(): ARRaycastQuery; // inherited from NSObject + + readonly direction: interop.Reference; + + readonly origin: interop.Reference; + + readonly target: ARRaycastTarget; + + readonly targetAlignment: ARRaycastTargetAlignment; + + constructor(o: { origin: interop.Reference; direction: interop.Reference; allowingTarget: ARRaycastTarget; alignment: ARRaycastTargetAlignment; }); + + initWithOriginDirectionAllowingTargetAlignment(origin: interop.Reference, direction: interop.Reference, target: ARRaycastTarget, alignment: ARRaycastTargetAlignment): this; +} + +declare class ARRaycastResult extends NSObject { + + static alloc(): ARRaycastResult; // inherited from NSObject + + static new(): ARRaycastResult; // inherited from NSObject + + readonly anchor: ARAnchor; + + readonly target: ARRaycastTarget; + + readonly targetAlignment: ARRaycastTargetAlignment; + + readonly worldTransform: simd_float4x4; +} + +declare const enum ARRaycastTarget { + + ExistingPlaneGeometry = 0, + + ExistingPlaneInfinite = 1, + + EstimatedPlane = 2 +} + +declare const enum ARRaycastTargetAlignment { + + Horizontal = 0, + + Vertical = 1, + + Any = 2 +} + +declare class ARReferenceImage extends NSObject { + + static alloc(): ARReferenceImage; // inherited from NSObject + + static new(): ARReferenceImage; // inherited from NSObject + + static referenceImagesInGroupNamedBundle(name: string, bundle: NSBundle): NSSet; + + name: string; + + readonly physicalSize: CGSize; + + readonly resourceGroupName: string; + + constructor(o: { CGImage: any; orientation: CGImagePropertyOrientation; physicalWidth: number; }); + + constructor(o: { pixelBuffer: any; orientation: CGImagePropertyOrientation; physicalWidth: number; }); + + initWithCGImageOrientationPhysicalWidth(image: any, orientation: CGImagePropertyOrientation, physicalWidth: number): this; + + initWithPixelBufferOrientationPhysicalWidth(pixelBuffer: any, orientation: CGImagePropertyOrientation, physicalWidth: number): this; + + validateWithCompletionHandler(completionHandler: (p1: NSError) => void): void; +} + +declare class ARReferenceObject extends NSObject implements NSSecureCoding { + + static alloc(): ARReferenceObject; // inherited from NSObject + + static new(): ARReferenceObject; // inherited from NSObject + + static referenceObjectsInGroupNamedBundle(name: string, bundle: NSBundle): NSSet; + + readonly center: interop.Reference; + + readonly extent: interop.Reference; + + name: string; + + readonly rawFeaturePoints: ARPointCloud; + + readonly resourceGroupName: string; + + readonly scale: interop.Reference; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { archiveURL: NSURL; }); + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + encodeWithCoder(coder: NSCoder): void; + + exportObjectToURLPreviewImageError(url: NSURL, previewImage: UIImage): boolean; + + initWithArchiveURLError(url: NSURL): this; + + initWithCoder(coder: NSCoder): this; + + referenceObjectByApplyingTransform(transform: simd_float4x4): ARReferenceObject; + + referenceObjectByMergingObjectError(object: ARReferenceObject): ARReferenceObject; +} + +declare var ARReferenceObjectArchiveExtension: string; + +declare var ARSCNDebugOptionShowFeaturePoints: SCNDebugOptions; + +declare var ARSCNDebugOptionShowWorldOrigin: SCNDebugOptions; + +declare class ARSCNFaceGeometry extends SCNGeometry { + + static alloc(): ARSCNFaceGeometry; // inherited from NSObject + + static faceGeometryWithDevice(device: MTLDevice): ARSCNFaceGeometry; + + static faceGeometryWithDeviceFillMesh(device: MTLDevice, fillMesh: boolean): ARSCNFaceGeometry; + + static geometry(): ARSCNFaceGeometry; // inherited from SCNGeometry + + static geometryWithMDLMesh(mdlMesh: MDLMesh): ARSCNFaceGeometry; // inherited from SCNGeometry + + static geometryWithSourcesElements(sources: NSArray | SCNGeometrySource[], elements: NSArray | SCNGeometryElement[]): ARSCNFaceGeometry; // inherited from SCNGeometry + + static new(): ARSCNFaceGeometry; // inherited from NSObject + + updateFromFaceGeometry(faceGeometry: ARFaceGeometry): void; +} + +declare class ARSCNPlaneGeometry extends SCNGeometry { + + static alloc(): ARSCNPlaneGeometry; // inherited from NSObject + + static geometry(): ARSCNPlaneGeometry; // inherited from SCNGeometry + + static geometryWithMDLMesh(mdlMesh: MDLMesh): ARSCNPlaneGeometry; // inherited from SCNGeometry + + static geometryWithSourcesElements(sources: NSArray | SCNGeometrySource[], elements: NSArray | SCNGeometryElement[]): ARSCNPlaneGeometry; // inherited from SCNGeometry + + static new(): ARSCNPlaneGeometry; // inherited from NSObject + + static planeGeometryWithDevice(device: MTLDevice): ARSCNPlaneGeometry; + + updateFromPlaneGeometry(planeGeometry: ARPlaneGeometry): void; +} + +declare class ARSCNView extends SCNView implements ARSessionProviding { + + static alloc(): ARSCNView; // inherited from NSObject + + static appearance(): ARSCNView; // inherited from UIAppearance + + static appearanceForTraitCollection(trait: UITraitCollection): ARSCNView; // inherited from UIAppearance + + static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): ARSCNView; // inherited from UIAppearance + + static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray | typeof NSObject[]): ARSCNView; // inherited from UIAppearance + + static appearanceWhenContainedIn(ContainerClass: typeof NSObject): ARSCNView; // inherited from UIAppearance + + static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray | typeof NSObject[]): ARSCNView; // inherited from UIAppearance + + static new(): ARSCNView; // inherited from NSObject + + automaticallyUpdatesLighting: boolean; + + delegate: ARSCNViewDelegate; + + rendersCameraGrain: boolean; + + rendersMotionBlur: boolean; + + session: ARSession; + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + readonly hash: number; // inherited from NSObjectProtocol + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + readonly // inherited from NSObjectProtocol + + anchorForNode(node: SCNNode): ARAnchor; + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + hitTestTypes(point: CGPoint, types: ARHitTestResultType): NSArray; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + nodeForAnchor(anchor: ARAnchor): SCNNode; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + raycastQueryFromPointAllowingTargetAlignment(point: CGPoint, target: ARRaycastTarget, alignment: ARRaycastTargetAlignment): ARRaycastQuery; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; + + unprojectPointOntoPlaneWithTransform(point: CGPoint, planeTransform: simd_float4x4): interop.Reference; +} + +interface ARSCNViewDelegate extends ARSessionObserver, SCNSceneRendererDelegate { + + rendererDidAddNodeForAnchor?(renderer: SCNSceneRenderer, node: SCNNode, anchor: ARAnchor): void; + + rendererDidRemoveNodeForAnchor?(renderer: SCNSceneRenderer, node: SCNNode, anchor: ARAnchor): void; + + rendererDidUpdateNodeForAnchor?(renderer: SCNSceneRenderer, node: SCNNode, anchor: ARAnchor): void; + + rendererNodeForAnchor?(renderer: SCNSceneRenderer, anchor: ARAnchor): SCNNode; + + rendererWillUpdateNodeForAnchor?(renderer: SCNSceneRenderer, node: SCNNode, anchor: ARAnchor): void; +} +declare var ARSCNViewDelegate: { + + prototype: ARSCNViewDelegate; +}; + +declare class ARSKView extends SKView implements ARSessionProviding { + + static alloc(): ARSKView; // inherited from NSObject + + static appearance(): ARSKView; // inherited from UIAppearance + + static appearanceForTraitCollection(trait: UITraitCollection): ARSKView; // inherited from UIAppearance + + static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): ARSKView; // inherited from UIAppearance + + static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray | typeof NSObject[]): ARSKView; // inherited from UIAppearance + + static appearanceWhenContainedIn(ContainerClass: typeof NSObject): ARSKView; // inherited from UIAppearance + + static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray | typeof NSObject[]): ARSKView; // inherited from UIAppearance + + static new(): ARSKView; // inherited from NSObject + + delegate: NSObject; + + session: ARSession; + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + readonly hash: number; // inherited from NSObjectProtocol + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + readonly // inherited from NSObjectProtocol + + anchorForNode(node: SKNode): ARAnchor; + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + hitTestTypes(point: CGPoint, types: ARHitTestResultType): NSArray; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + nodeForAnchor(anchor: ARAnchor): SKNode; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; +} + +interface ARSKViewDelegate extends ARSessionObserver, SKViewDelegate { + + viewDidAddNodeForAnchor?(view: ARSKView, node: SKNode, anchor: ARAnchor): void; + + viewDidRemoveNodeForAnchor?(view: ARSKView, node: SKNode, anchor: ARAnchor): void; + + viewDidUpdateNodeForAnchor?(view: ARSKView, node: SKNode, anchor: ARAnchor): void; + + viewNodeForAnchor?(view: ARSKView, anchor: ARAnchor): SKNode; + + viewWillUpdateNodeForAnchor?(view: ARSKView, node: SKNode, anchor: ARAnchor): void; +} +declare var ARSKViewDelegate: { + + prototype: ARSKViewDelegate; +}; + +declare const enum ARSceneReconstruction { + + None = 0, + + Mesh = 1, + + MeshWithClassification = 3 +} + +declare const enum ARSegmentationClass { + + None = 0, + + Person = 255 +} + +declare class ARSession extends NSObject { + + static alloc(): ARSession; // inherited from NSObject + + static new(): ARSession; // inherited from NSObject + + readonly configuration: ARConfiguration; + + readonly currentFrame: ARFrame; + + delegate: ARSessionDelegate; + + delegateQueue: NSObject; + + readonly identifier: NSUUID; + + addAnchor(anchor: ARAnchor): void; + + createReferenceObjectWithTransformCenterExtentCompletionHandler(transform: simd_float4x4, center: interop.Reference, extent: interop.Reference, completionHandler: (p1: ARReferenceObject, p2: NSError) => void): void; + + getCurrentWorldMapWithCompletionHandler(completionHandler: (p1: ARWorldMap, p2: NSError) => void): void; + + getGeoLocationForPointCompletionHandler(position: interop.Reference, completionHandler: (p1: CLLocationCoordinate2D, p2: number, p3: NSError) => void): void; + + pause(): void; + + raycast(query: ARRaycastQuery): NSArray; + + removeAnchor(anchor: ARAnchor): void; + + runWithConfiguration(configuration: ARConfiguration): void; + + runWithConfigurationOptions(configuration: ARConfiguration, options: ARSessionRunOptions): void; + + setWorldOrigin(relativeTransform: simd_float4x4): void; + + trackedRaycastUpdateHandler(query: ARRaycastQuery, updateHandler: (p1: NSArray) => void): ARTrackedRaycast; + + updateWithCollaborationData(collaborationData: ARCollaborationData): void; +} + +interface ARSessionDelegate extends ARSessionObserver { + + sessionDidAddAnchors?(session: ARSession, anchors: NSArray | ARAnchor[]): void; + + sessionDidRemoveAnchors?(session: ARSession, anchors: NSArray | ARAnchor[]): void; + + sessionDidUpdateAnchors?(session: ARSession, anchors: NSArray | ARAnchor[]): void; + + sessionDidUpdateFrame?(session: ARSession, frame: ARFrame): void; +} +declare var ARSessionDelegate: { + + prototype: ARSessionDelegate; +}; + +interface ARSessionObserver extends NSObjectProtocol { + + sessionCameraDidChangeTrackingState?(session: ARSession, camera: ARCamera): void; + + sessionDidChangeGeoTrackingStatus?(session: ARSession, geoTrackingStatus: ARGeoTrackingStatus): void; + + sessionDidFailWithError?(session: ARSession, error: NSError): void; + + sessionDidOutputAudioSampleBuffer?(session: ARSession, audioSampleBuffer: any): void; + + sessionDidOutputCollaborationData?(session: ARSession, data: ARCollaborationData): void; + + sessionInterruptionEnded?(session: ARSession): void; + + sessionShouldAttemptRelocalization?(session: ARSession): boolean; + + sessionWasInterrupted?(session: ARSession): void; +} +declare var ARSessionObserver: { + + prototype: ARSessionObserver; +}; + +interface ARSessionProviding extends NSObjectProtocol { + + session: ARSession; +} +declare var ARSessionProviding: { + + prototype: ARSessionProviding; +}; + +declare const enum ARSessionRunOptions { + + ResetTracking = 1, + + RemoveExistingAnchors = 2, + + StopTrackedRaycasts = 4, + + ResetSceneReconstruction = 8 +} + +declare class ARSkeleton extends NSObject { + + static alloc(): ARSkeleton; // inherited from NSObject + + static new(): ARSkeleton; // inherited from NSObject + + readonly definition: ARSkeletonDefinition; + + readonly jointCount: number; + + isJointTracked(jointIndex: number): boolean; +} + +declare class ARSkeleton2D extends ARSkeleton { + + static alloc(): ARSkeleton2D; // inherited from NSObject + + static new(): ARSkeleton2D; // inherited from NSObject + + readonly jointLandmarks: interop.Pointer | interop.Reference>; + + landmarkForJointNamed(jointName: string): interop.Reference; +} + +declare class ARSkeleton3D extends ARSkeleton { + + static alloc(): ARSkeleton3D; // inherited from NSObject + + static new(): ARSkeleton3D; // inherited from NSObject + + readonly jointLocalTransforms: interop.Pointer | interop.Reference; + + readonly jointModelTransforms: interop.Pointer | interop.Reference; + + localTransformForJointName(jointName: string): simd_float4x4; + + modelTransformForJointName(jointName: string): simd_float4x4; +} + +declare class ARSkeletonDefinition extends NSObject { + + static alloc(): ARSkeletonDefinition; // inherited from NSObject + + static new(): ARSkeletonDefinition; // inherited from NSObject + + readonly jointCount: number; + + readonly jointNames: NSArray; + + readonly neutralBodySkeleton3D: ARSkeleton3D; + + readonly parentIndices: NSArray; + + static readonly defaultBody2DSkeletonDefinition: ARSkeletonDefinition; + + static readonly defaultBody3DSkeletonDefinition: ARSkeletonDefinition; + + indexForJointName(jointName: string): number; +} + +declare function ARSkeletonJointNameForRecognizedPointKey(recognizedPointKey: string): string; + +declare var ARSkeletonJointNameHead: string; + +declare var ARSkeletonJointNameLeftFoot: string; + +declare var ARSkeletonJointNameLeftHand: string; + +declare var ARSkeletonJointNameLeftShoulder: string; + +declare var ARSkeletonJointNameRightFoot: string; + +declare var ARSkeletonJointNameRightHand: string; + +declare var ARSkeletonJointNameRightShoulder: string; + +declare var ARSkeletonJointNameRoot: string; + +interface ARTrackable extends NSObjectProtocol { + + isTracked: boolean; +} +declare var ARTrackable: { + + prototype: ARTrackable; +}; + +declare class ARTrackedRaycast extends NSObject { + + static alloc(): ARTrackedRaycast; // inherited from NSObject + + static new(): ARTrackedRaycast; // inherited from NSObject + + stopTracking(): void; +} + +declare const enum ARTrackingState { + + NotAvailable = 0, + + Limited = 1, + + Normal = 2 +} + +declare const enum ARTrackingStateReason { + + None = 0, + + Initializing = 1, + + ExcessiveMotion = 2, + + InsufficientFeatures = 3, + + Relocalizing = 4 +} + +declare class ARVideoFormat extends NSObject implements NSCopying { + + static alloc(): ARVideoFormat; // inherited from NSObject + + static new(): ARVideoFormat; // inherited from NSObject + + readonly captureDevicePosition: AVCaptureDevicePosition; + + readonly captureDeviceType: string; + + readonly framesPerSecond: number; + + readonly imageResolution: CGSize; + + copyWithZone(zone: interop.Pointer | interop.Reference): any; +} + +declare const enum ARWorldAlignment { + + Gravity = 0, + + GravityAndHeading = 1, + + Camera = 2 +} + +declare class ARWorldMap extends NSObject implements NSCopying, NSSecureCoding { + + static alloc(): ARWorldMap; // inherited from NSObject + + static new(): ARWorldMap; // inherited from NSObject + + anchors: NSArray; + + readonly center: interop.Reference; + + readonly extent: interop.Reference; + + readonly rawFeaturePoints: ARPointCloud; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} + +declare const enum ARWorldMappingStatus { + + NotAvailable = 0, + + Limited = 1, + + Extending = 2, + + Mapped = 3 +} + +declare class ARWorldTrackingConfiguration extends ARConfiguration { + + static alloc(): ARWorldTrackingConfiguration; // inherited from NSObject + + static new(): ARWorldTrackingConfiguration; // inherited from NSObject + + static supportsSceneReconstruction(sceneReconstruction: ARSceneReconstruction): boolean; + + appClipCodeTrackingEnabled: boolean; + + autoFocusEnabled: boolean; + + automaticImageScaleEstimationEnabled: boolean; + + collaborationEnabled: boolean; + + detectionImages: NSSet; + + detectionObjects: NSSet; + + environmentTexturing: AREnvironmentTexturing; + + initialWorldMap: ARWorldMap; + + maximumNumberOfTrackedImages: number; + + planeDetection: ARPlaneDetection; + + sceneReconstruction: ARSceneReconstruction; + + userFaceTrackingEnabled: boolean; + + wantsHDREnvironmentTextures: boolean; + + static readonly supportsAppClipCodeTracking: boolean; + + static readonly supportsUserFaceTracking: boolean; +} diff --git a/packages/types-minimal/src/lib/ios/objc-x86_64/objc!AVFAudio.d.ts b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!AVFAudio.d.ts new file mode 100644 index 000000000..d7330d821 --- /dev/null +++ b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!AVFAudio.d.ts @@ -0,0 +1,2693 @@ + +interface AVAudio3DAngularOrientation { + yaw: number; + pitch: number; + roll: number; +} +declare var AVAudio3DAngularOrientation: interop.StructType; + +interface AVAudio3DMixing extends NSObjectProtocol { + + obstruction: number; + + occlusion: number; + + pointSourceInHeadMode: AVAudio3DMixingPointSourceInHeadMode; + + position: AVAudio3DPoint; + + rate: number; + + renderingAlgorithm: AVAudio3DMixingRenderingAlgorithm; + + reverbBlend: number; + + sourceMode: AVAudio3DMixingSourceMode; +} +declare var AVAudio3DMixing: { + + prototype: AVAudio3DMixing; +}; + +declare const enum AVAudio3DMixingPointSourceInHeadMode { + + Mono = 0, + + Bypass = 1 +} + +declare const enum AVAudio3DMixingRenderingAlgorithm { + + EqualPowerPanning = 0, + + SphericalHead = 1, + + HRTF = 2, + + SoundField = 3, + + StereoPassThrough = 5, + + HRTFHQ = 6, + + Auto = 7 +} + +declare const enum AVAudio3DMixingSourceMode { + + SpatializeIfMono = 0, + + Bypass = 1, + + PointSource = 2, + + AmbienceBed = 3 +} + +interface AVAudio3DPoint { + x: number; + y: number; + z: number; +} +declare var AVAudio3DPoint: interop.StructType; + +interface AVAudio3DVectorOrientation { + forward: AVAudio3DPoint; + up: AVAudio3DPoint; +} +declare var AVAudio3DVectorOrientation: interop.StructType; + +declare var AVAudioBitRateStrategy_Constant: string; + +declare var AVAudioBitRateStrategy_LongTermAverage: string; + +declare var AVAudioBitRateStrategy_Variable: string; + +declare var AVAudioBitRateStrategy_VariableConstrained: string; + +declare class AVAudioBuffer extends NSObject implements NSCopying, NSMutableCopying { + + static alloc(): AVAudioBuffer; // inherited from NSObject + + static new(): AVAudioBuffer; // inherited from NSObject + + readonly audioBufferList: interop.Pointer | interop.Reference; + + readonly format: AVAudioFormat; + + readonly mutableAudioBufferList: interop.Pointer | interop.Reference; + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + mutableCopyWithZone(zone: interop.Pointer | interop.Reference): any; +} + +declare class AVAudioChannelLayout extends NSObject implements NSSecureCoding { + + static alloc(): AVAudioChannelLayout; // inherited from NSObject + + static layoutWithLayout(layout: interop.Pointer | interop.Reference): AVAudioChannelLayout; + + static layoutWithLayoutTag(layoutTag: number): AVAudioChannelLayout; + + static new(): AVAudioChannelLayout; // inherited from NSObject + + readonly channelCount: number; + + readonly layout: interop.Pointer | interop.Reference; + + readonly layoutTag: number; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + constructor(o: { layout: interop.Pointer | interop.Reference; }); + + constructor(o: { layoutTag: number; }); + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; + + initWithLayout(layout: interop.Pointer | interop.Reference): this; + + initWithLayoutTag(layoutTag: number): this; +} + +declare const enum AVAudioCommonFormat { + + OtherFormat = 0, + + PCMFormatFloat32 = 1, + + PCMFormatFloat64 = 2, + + PCMFormatInt16 = 3, + + PCMFormatInt32 = 4 +} + +declare class AVAudioCompressedBuffer extends AVAudioBuffer { + + static alloc(): AVAudioCompressedBuffer; // inherited from NSObject + + static new(): AVAudioCompressedBuffer; // inherited from NSObject + + readonly byteCapacity: number; + + byteLength: number; + + readonly data: interop.Pointer | interop.Reference; + + readonly maximumPacketSize: number; + + readonly packetCapacity: number; + + packetCount: number; + + readonly packetDescriptions: interop.Pointer | interop.Reference; + + constructor(o: { format: AVAudioFormat; packetCapacity: number; }); + + constructor(o: { format: AVAudioFormat; packetCapacity: number; maximumPacketSize: number; }); + + initWithFormatPacketCapacity(format: AVAudioFormat, packetCapacity: number): this; + + initWithFormatPacketCapacityMaximumPacketSize(format: AVAudioFormat, packetCapacity: number, maximumPacketSize: number): this; +} + +declare class AVAudioConnectionPoint extends NSObject { + + static alloc(): AVAudioConnectionPoint; // inherited from NSObject + + static new(): AVAudioConnectionPoint; // inherited from NSObject + + readonly bus: number; + + readonly node: AVAudioNode; + + constructor(o: { node: AVAudioNode; bus: number; }); + + initWithNodeBus(node: AVAudioNode, bus: number): this; +} + +declare class AVAudioConverter extends NSObject { + + static alloc(): AVAudioConverter; // inherited from NSObject + + static new(): AVAudioConverter; // inherited from NSObject + + readonly applicableEncodeBitRates: NSArray; + + readonly applicableEncodeSampleRates: NSArray; + + readonly availableEncodeBitRates: NSArray; + + readonly availableEncodeChannelLayoutTags: NSArray; + + readonly availableEncodeSampleRates: NSArray; + + bitRate: number; + + bitRateStrategy: string; + + channelMap: NSArray; + + dither: boolean; + + downmix: boolean; + + readonly inputFormat: AVAudioFormat; + + magicCookie: NSData; + + readonly maximumOutputPacketSize: number; + + readonly outputFormat: AVAudioFormat; + + primeInfo: AVAudioConverterPrimeInfo; + + primeMethod: AVAudioConverterPrimeMethod; + + sampleRateConverterAlgorithm: string; + + sampleRateConverterQuality: number; + + constructor(o: { fromFormat: AVAudioFormat; toFormat: AVAudioFormat; }); + + convertToBufferErrorWithInputFromBlock(outputBuffer: AVAudioBuffer, outError: interop.Pointer | interop.Reference, inputBlock: (p1: number, p2: interop.Pointer | interop.Reference) => AVAudioBuffer): AVAudioConverterOutputStatus; + + convertToBufferFromBufferError(outputBuffer: AVAudioPCMBuffer, inputBuffer: AVAudioPCMBuffer): boolean; + + initFromFormatToFormat(fromFormat: AVAudioFormat, toFormat: AVAudioFormat): this; + + reset(): void; +} + +declare const enum AVAudioConverterInputStatus { + + HaveData = 0, + + NoDataNow = 1, + + EndOfStream = 2 +} + +declare const enum AVAudioConverterOutputStatus { + + HaveData = 0, + + InputRanDry = 1, + + EndOfStream = 2, + + Error = 3 +} + +interface AVAudioConverterPrimeInfo { + leadingFrames: number; + trailingFrames: number; +} +declare var AVAudioConverterPrimeInfo: interop.StructType; + +declare const enum AVAudioConverterPrimeMethod { + + Pre = 0, + + Normal = 1, + + None = 2 +} + +declare class AVAudioEngine extends NSObject { + + static alloc(): AVAudioEngine; // inherited from NSObject + + static new(): AVAudioEngine; // inherited from NSObject + + readonly attachedNodes: NSSet; + + autoShutdownEnabled: boolean; + + readonly inputNode: AVAudioInputNode; + + readonly isInManualRenderingMode: boolean; + + readonly mainMixerNode: AVAudioMixerNode; + + readonly manualRenderingBlock: (p1: number, p2: interop.Pointer | interop.Reference, p3: interop.Pointer | interop.Reference) => AVAudioEngineManualRenderingStatus; + + readonly manualRenderingFormat: AVAudioFormat; + + readonly manualRenderingMaximumFrameCount: number; + + readonly manualRenderingMode: AVAudioEngineManualRenderingMode; + + readonly manualRenderingSampleTime: number; + + musicSequence: interop.Pointer | interop.Reference; + + readonly outputNode: AVAudioOutputNode; + + readonly running: boolean; + + attachNode(node: AVAudioNode): void; + + connectMIDIToFormatBlock(sourceNode: AVAudioNode, destinationNode: AVAudioNode, format: AVAudioFormat, tapBlock: (p1: number, p2: number, p3: number, p4: string) => number): void; + + connectMIDIToNodesFormatBlock(sourceNode: AVAudioNode, destinationNodes: NSArray | AVAudioNode[], format: AVAudioFormat, tapBlock: (p1: number, p2: number, p3: number, p4: string) => number): void; + + connectToConnectionPointsFromBusFormat(sourceNode: AVAudioNode, destNodes: NSArray | AVAudioConnectionPoint[], sourceBus: number, format: AVAudioFormat): void; + + connectToFormat(node1: AVAudioNode, node2: AVAudioNode, format: AVAudioFormat): void; + + connectToFromBusToBusFormat(node1: AVAudioNode, node2: AVAudioNode, bus1: number, bus2: number, format: AVAudioFormat): void; + + detachNode(node: AVAudioNode): void; + + disableManualRenderingMode(): void; + + disconnectMIDIFrom(sourceNode: AVAudioNode, destinationNode: AVAudioNode): void; + + disconnectMIDIFromNodes(sourceNode: AVAudioNode, destinationNodes: NSArray | AVAudioNode[]): void; + + disconnectMIDIInput(node: AVAudioNode): void; + + disconnectMIDIOutput(node: AVAudioNode): void; + + disconnectNodeInput(node: AVAudioNode): void; + + disconnectNodeInputBus(node: AVAudioNode, bus: number): void; + + disconnectNodeOutput(node: AVAudioNode): void; + + disconnectNodeOutputBus(node: AVAudioNode, bus: number): void; + + enableManualRenderingModeFormatMaximumFrameCountError(mode: AVAudioEngineManualRenderingMode, pcmFormat: AVAudioFormat, maximumFrameCount: number): boolean; + + inputConnectionPointForNodeInputBus(node: AVAudioNode, bus: number): AVAudioConnectionPoint; + + outputConnectionPointsForNodeOutputBus(node: AVAudioNode, bus: number): NSArray; + + pause(): void; + + prepare(): void; + + renderOfflineToBufferError(numberOfFrames: number, buffer: AVAudioPCMBuffer): AVAudioEngineManualRenderingStatus; + + reset(): void; + + startAndReturnError(): boolean; + + stop(): void; +} + +declare var AVAudioEngineConfigurationChangeNotification: string; + +declare const enum AVAudioEngineManualRenderingError { + + InvalidMode = -80800, + + Initialized = -80801, + + NotRunning = -80802 +} + +declare const enum AVAudioEngineManualRenderingMode { + + Offline = 0, + + Realtime = 1 +} + +declare const enum AVAudioEngineManualRenderingStatus { + + Error = -1, + + Success = 0, + + InsufficientDataFromInputNode = 1, + + CannotDoInCurrentContext = 2 +} + +declare const enum AVAudioEnvironmentDistanceAttenuationModel { + + Exponential = 1, + + Inverse = 2, + + Linear = 3 +} + +declare class AVAudioEnvironmentDistanceAttenuationParameters extends NSObject { + + static alloc(): AVAudioEnvironmentDistanceAttenuationParameters; // inherited from NSObject + + static new(): AVAudioEnvironmentDistanceAttenuationParameters; // inherited from NSObject + + distanceAttenuationModel: AVAudioEnvironmentDistanceAttenuationModel; + + maximumDistance: number; + + referenceDistance: number; + + rolloffFactor: number; +} + +declare class AVAudioEnvironmentNode extends AVAudioNode implements AVAudioMixing { + + static alloc(): AVAudioEnvironmentNode; // inherited from NSObject + + static new(): AVAudioEnvironmentNode; // inherited from NSObject + + readonly applicableRenderingAlgorithms: NSArray; + + readonly distanceAttenuationParameters: AVAudioEnvironmentDistanceAttenuationParameters; + + listenerAngularOrientation: AVAudio3DAngularOrientation; + + listenerPosition: AVAudio3DPoint; + + listenerVectorOrientation: AVAudio3DVectorOrientation; + + readonly nextAvailableInputBus: number; + + outputType: AVAudioEnvironmentOutputType; + + outputVolume: number; + + readonly reverbParameters: AVAudioEnvironmentReverbParameters; + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + readonly hash: number; // inherited from NSObjectProtocol + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + obstruction: number; // inherited from AVAudio3DMixing + + occlusion: number; // inherited from AVAudio3DMixing + + pan: number; // inherited from AVAudioStereoMixing + + pointSourceInHeadMode: AVAudio3DMixingPointSourceInHeadMode; // inherited from AVAudio3DMixing + + position: AVAudio3DPoint; // inherited from AVAudio3DMixing + + rate: number; // inherited from AVAudio3DMixing + + renderingAlgorithm: AVAudio3DMixingRenderingAlgorithm; // inherited from AVAudio3DMixing + + reverbBlend: number; // inherited from AVAudio3DMixing + + sourceMode: AVAudio3DMixingSourceMode; // inherited from AVAudio3DMixing + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + volume: number; // inherited from AVAudioMixing + + readonly // inherited from NSObjectProtocol + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + destinationForMixerBus(mixer: AVAudioNode, bus: number): AVAudioMixingDestination; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; +} + +declare const enum AVAudioEnvironmentOutputType { + + Auto = 0, + + Headphones = 1, + + BuiltInSpeakers = 2, + + ExternalSpeakers = 3 +} + +declare class AVAudioEnvironmentReverbParameters extends NSObject { + + static alloc(): AVAudioEnvironmentReverbParameters; // inherited from NSObject + + static new(): AVAudioEnvironmentReverbParameters; // inherited from NSObject + + enable: boolean; + + readonly filterParameters: AVAudioUnitEQFilterParameters; + + level: number; + + loadFactoryReverbPreset(preset: AVAudioUnitReverbPreset): void; +} + +declare class AVAudioFile extends NSObject { + + static alloc(): AVAudioFile; // inherited from NSObject + + static new(): AVAudioFile; // inherited from NSObject + + readonly fileFormat: AVAudioFormat; + + framePosition: number; + + readonly length: number; + + readonly processingFormat: AVAudioFormat; + + readonly url: NSURL; + + constructor(o: { forReading: NSURL; commonFormat: AVAudioCommonFormat; interleaved: boolean; }); + + constructor(o: { forReading: NSURL; }); + + constructor(o: { forWriting: NSURL; settings: NSDictionary; commonFormat: AVAudioCommonFormat; interleaved: boolean; }); + + constructor(o: { forWriting: NSURL; settings: NSDictionary; }); + + initForReadingCommonFormatInterleavedError(fileURL: NSURL, format: AVAudioCommonFormat, interleaved: boolean): this; + + initForReadingError(fileURL: NSURL): this; + + initForWritingSettingsCommonFormatInterleavedError(fileURL: NSURL, settings: NSDictionary, format: AVAudioCommonFormat, interleaved: boolean): this; + + initForWritingSettingsError(fileURL: NSURL, settings: NSDictionary): this; + + readIntoBufferError(buffer: AVAudioPCMBuffer): boolean; + + readIntoBufferFrameCountError(buffer: AVAudioPCMBuffer, frames: number): boolean; + + writeFromBufferError(buffer: AVAudioPCMBuffer): boolean; +} + +declare var AVAudioFileTypeKey: string; + +declare class AVAudioFormat extends NSObject implements NSSecureCoding { + + static alloc(): AVAudioFormat; // inherited from NSObject + + static new(): AVAudioFormat; // inherited from NSObject + + readonly channelCount: number; + + readonly channelLayout: AVAudioChannelLayout; + + readonly commonFormat: AVAudioCommonFormat; + + readonly formatDescription: any; + + readonly interleaved: boolean; + + magicCookie: NSData; + + readonly sampleRate: number; + + readonly settings: NSDictionary; + + readonly standard: boolean; + + readonly streamDescription: interop.Pointer | interop.Reference; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { standardFormatWithSampleRate: number; channelLayout: AVAudioChannelLayout; }); + + constructor(o: { standardFormatWithSampleRate: number; channels: number; }); + + constructor(o: { CMAudioFormatDescription: any; }); + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + constructor(o: { commonFormat: AVAudioCommonFormat; sampleRate: number; channels: number; interleaved: boolean; }); + + constructor(o: { commonFormat: AVAudioCommonFormat; sampleRate: number; interleaved: boolean; channelLayout: AVAudioChannelLayout; }); + + constructor(o: { settings: NSDictionary; }); + + constructor(o: { streamDescription: interop.Pointer | interop.Reference; }); + + constructor(o: { streamDescription: interop.Pointer | interop.Reference; channelLayout: AVAudioChannelLayout; }); + + encodeWithCoder(coder: NSCoder): void; + + initStandardFormatWithSampleRateChannelLayout(sampleRate: number, layout: AVAudioChannelLayout): this; + + initStandardFormatWithSampleRateChannels(sampleRate: number, channels: number): this; + + initWithCMAudioFormatDescription(formatDescription: any): this; + + initWithCoder(coder: NSCoder): this; + + initWithCommonFormatSampleRateChannelsInterleaved(format: AVAudioCommonFormat, sampleRate: number, channels: number, interleaved: boolean): this; + + initWithCommonFormatSampleRateInterleavedChannelLayout(format: AVAudioCommonFormat, sampleRate: number, interleaved: boolean, layout: AVAudioChannelLayout): this; + + initWithSettings(settings: NSDictionary): this; + + initWithStreamDescription(asbd: interop.Pointer | interop.Reference): this; + + initWithStreamDescriptionChannelLayout(asbd: interop.Pointer | interop.Reference, layout: AVAudioChannelLayout): this; +} + +declare class AVAudioIONode extends AVAudioNode { + + static alloc(): AVAudioIONode; // inherited from NSObject + + static new(): AVAudioIONode; // inherited from NSObject + + readonly audioUnit: interop.Pointer | interop.Reference; + + readonly presentationLatency: number; + + readonly voiceProcessingEnabled: boolean; + + setVoiceProcessingEnabledError(enabled: boolean): boolean; +} + +declare class AVAudioInputNode extends AVAudioIONode implements AVAudioMixing { + + static alloc(): AVAudioInputNode; // inherited from NSObject + + static new(): AVAudioInputNode; // inherited from NSObject + + voiceProcessingAGCEnabled: boolean; + + voiceProcessingBypassed: boolean; + + voiceProcessingInputMuted: boolean; + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + readonly hash: number; // inherited from NSObjectProtocol + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + obstruction: number; // inherited from AVAudio3DMixing + + occlusion: number; // inherited from AVAudio3DMixing + + pan: number; // inherited from AVAudioStereoMixing + + pointSourceInHeadMode: AVAudio3DMixingPointSourceInHeadMode; // inherited from AVAudio3DMixing + + position: AVAudio3DPoint; // inherited from AVAudio3DMixing + + rate: number; // inherited from AVAudio3DMixing + + renderingAlgorithm: AVAudio3DMixingRenderingAlgorithm; // inherited from AVAudio3DMixing + + reverbBlend: number; // inherited from AVAudio3DMixing + + sourceMode: AVAudio3DMixingSourceMode; // inherited from AVAudio3DMixing + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + volume: number; // inherited from AVAudioMixing + + readonly // inherited from NSObjectProtocol + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + destinationForMixerBus(mixer: AVAudioNode, bus: number): AVAudioMixingDestination; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; + + setManualRenderingInputPCMFormatInputBlock(format: AVAudioFormat, block: (p1: number) => interop.Pointer | interop.Reference): boolean; +} + +declare class AVAudioMixerNode extends AVAudioNode implements AVAudioMixing { + + static alloc(): AVAudioMixerNode; // inherited from NSObject + + static new(): AVAudioMixerNode; // inherited from NSObject + + readonly nextAvailableInputBus: number; + + outputVolume: number; + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + readonly hash: number; // inherited from NSObjectProtocol + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + obstruction: number; // inherited from AVAudio3DMixing + + occlusion: number; // inherited from AVAudio3DMixing + + pan: number; // inherited from AVAudioStereoMixing + + pointSourceInHeadMode: AVAudio3DMixingPointSourceInHeadMode; // inherited from AVAudio3DMixing + + position: AVAudio3DPoint; // inherited from AVAudio3DMixing + + rate: number; // inherited from AVAudio3DMixing + + renderingAlgorithm: AVAudio3DMixingRenderingAlgorithm; // inherited from AVAudio3DMixing + + reverbBlend: number; // inherited from AVAudio3DMixing + + sourceMode: AVAudio3DMixingSourceMode; // inherited from AVAudio3DMixing + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + volume: number; // inherited from AVAudioMixing + + readonly // inherited from NSObjectProtocol + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + destinationForMixerBus(mixer: AVAudioNode, bus: number): AVAudioMixingDestination; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; +} + +interface AVAudioMixing extends AVAudio3DMixing, AVAudioStereoMixing { + + volume: number; + + destinationForMixerBus(mixer: AVAudioNode, bus: number): AVAudioMixingDestination; +} +declare var AVAudioMixing: { + + prototype: AVAudioMixing; +}; + +declare class AVAudioMixingDestination extends NSObject implements AVAudioMixing { + + static alloc(): AVAudioMixingDestination; // inherited from NSObject + + static new(): AVAudioMixingDestination; // inherited from NSObject + + readonly connectionPoint: AVAudioConnectionPoint; + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + readonly hash: number; // inherited from NSObjectProtocol + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + obstruction: number; // inherited from AVAudio3DMixing + + occlusion: number; // inherited from AVAudio3DMixing + + pan: number; // inherited from AVAudioStereoMixing + + pointSourceInHeadMode: AVAudio3DMixingPointSourceInHeadMode; // inherited from AVAudio3DMixing + + position: AVAudio3DPoint; // inherited from AVAudio3DMixing + + rate: number; // inherited from AVAudio3DMixing + + renderingAlgorithm: AVAudio3DMixingRenderingAlgorithm; // inherited from AVAudio3DMixing + + reverbBlend: number; // inherited from AVAudio3DMixing + + sourceMode: AVAudio3DMixingSourceMode; // inherited from AVAudio3DMixing + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + volume: number; // inherited from AVAudioMixing + + readonly // inherited from NSObjectProtocol + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + destinationForMixerBus(mixer: AVAudioNode, bus: number): AVAudioMixingDestination; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; +} + +declare class AVAudioNode extends NSObject { + + static alloc(): AVAudioNode; // inherited from NSObject + + static new(): AVAudioNode; // inherited from NSObject + + readonly AUAudioUnit: AUAudioUnit; + + readonly engine: AVAudioEngine; + + readonly lastRenderTime: AVAudioTime; + + readonly latency: number; + + readonly numberOfInputs: number; + + readonly numberOfOutputs: number; + + readonly outputPresentationLatency: number; + + inputFormatForBus(bus: number): AVAudioFormat; + + installTapOnBusBufferSizeFormatBlock(bus: number, bufferSize: number, format: AVAudioFormat, tapBlock: (p1: AVAudioPCMBuffer, p2: AVAudioTime) => void): void; + + nameForInputBus(bus: number): string; + + nameForOutputBus(bus: number): string; + + outputFormatForBus(bus: number): AVAudioFormat; + + removeTapOnBus(bus: number): void; + + reset(): void; +} + +declare class AVAudioOutputNode extends AVAudioIONode { + + static alloc(): AVAudioOutputNode; // inherited from NSObject + + static new(): AVAudioOutputNode; // inherited from NSObject +} + +declare class AVAudioPCMBuffer extends AVAudioBuffer { + + static alloc(): AVAudioPCMBuffer; // inherited from NSObject + + static new(): AVAudioPCMBuffer; // inherited from NSObject + + readonly floatChannelData: interop.Pointer | interop.Reference>; + + readonly frameCapacity: number; + + frameLength: number; + + readonly int16ChannelData: interop.Pointer | interop.Reference>; + + readonly int32ChannelData: interop.Pointer | interop.Reference>; + + readonly stride: number; + + constructor(o: { PCMFormat: AVAudioFormat; bufferListNoCopy: interop.Pointer | interop.Reference; deallocator: (p1: interop.Pointer | interop.Reference) => void; }); + + constructor(o: { PCMFormat: AVAudioFormat; frameCapacity: number; }); + + initWithPCMFormatBufferListNoCopyDeallocator(format: AVAudioFormat, bufferList: interop.Pointer | interop.Reference, deallocator: (p1: interop.Pointer | interop.Reference) => void): this; + + initWithPCMFormatFrameCapacity(format: AVAudioFormat, frameCapacity: number): this; +} + +declare class AVAudioPlayer extends NSObject { + + static alloc(): AVAudioPlayer; // inherited from NSObject + + static new(): AVAudioPlayer; // inherited from NSObject + + channelAssignments: NSArray; + + currentTime: number; + + readonly data: NSData; + + delegate: AVAudioPlayerDelegate; + + readonly deviceCurrentTime: number; + + readonly duration: number; + + enableRate: boolean; + + readonly format: AVAudioFormat; + + meteringEnabled: boolean; + + readonly numberOfChannels: number; + + numberOfLoops: number; + + pan: number; + + readonly playing: boolean; + + rate: number; + + readonly settings: NSDictionary; + + readonly url: NSURL; + + volume: number; + + constructor(o: { contentsOfURL: NSURL; }); + + constructor(o: { contentsOfURL: NSURL; fileTypeHint: string; }); + + constructor(o: { data: NSData; }); + + constructor(o: { data: NSData; fileTypeHint: string; }); + + averagePowerForChannel(channelNumber: number): number; + + initWithContentsOfURLError(url: NSURL): this; + + initWithContentsOfURLFileTypeHintError(url: NSURL, utiString: string): this; + + initWithDataError(data: NSData): this; + + initWithDataFileTypeHintError(data: NSData, utiString: string): this; + + pause(): void; + + peakPowerForChannel(channelNumber: number): number; + + play(): boolean; + + playAtTime(time: number): boolean; + + prepareToPlay(): boolean; + + setVolumeFadeDuration(volume: number, duration: number): void; + + stop(): void; + + updateMeters(): void; +} + +interface AVAudioPlayerDelegate extends NSObjectProtocol { + + audioPlayerBeginInterruption?(player: AVAudioPlayer): void; + + audioPlayerDecodeErrorDidOccurError?(player: AVAudioPlayer, error: NSError): void; + + audioPlayerDidFinishPlayingSuccessfully?(player: AVAudioPlayer, flag: boolean): void; + + audioPlayerEndInterruption?(player: AVAudioPlayer): void; + + audioPlayerEndInterruptionWithFlags?(player: AVAudioPlayer, flags: number): void; + + audioPlayerEndInterruptionWithOptions?(player: AVAudioPlayer, flags: number): void; +} +declare var AVAudioPlayerDelegate: { + + prototype: AVAudioPlayerDelegate; +}; + +declare class AVAudioPlayerNode extends AVAudioNode implements AVAudioMixing { + + static alloc(): AVAudioPlayerNode; // inherited from NSObject + + static new(): AVAudioPlayerNode; // inherited from NSObject + + readonly playing: boolean; + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + readonly hash: number; // inherited from NSObjectProtocol + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + obstruction: number; // inherited from AVAudio3DMixing + + occlusion: number; // inherited from AVAudio3DMixing + + pan: number; // inherited from AVAudioStereoMixing + + pointSourceInHeadMode: AVAudio3DMixingPointSourceInHeadMode; // inherited from AVAudio3DMixing + + position: AVAudio3DPoint; // inherited from AVAudio3DMixing + + rate: number; // inherited from AVAudio3DMixing + + renderingAlgorithm: AVAudio3DMixingRenderingAlgorithm; // inherited from AVAudio3DMixing + + reverbBlend: number; // inherited from AVAudio3DMixing + + sourceMode: AVAudio3DMixingSourceMode; // inherited from AVAudio3DMixing + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + volume: number; // inherited from AVAudioMixing + + readonly // inherited from NSObjectProtocol + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + destinationForMixerBus(mixer: AVAudioNode, bus: number): AVAudioMixingDestination; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + nodeTimeForPlayerTime(playerTime: AVAudioTime): AVAudioTime; + + pause(): void; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + play(): void; + + playAtTime(when: AVAudioTime): void; + + playerTimeForNodeTime(nodeTime: AVAudioTime): AVAudioTime; + + prepareWithFrameCount(frameCount: number): void; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + scheduleBufferAtTimeOptionsCompletionCallbackTypeCompletionHandler(buffer: AVAudioPCMBuffer, when: AVAudioTime, options: AVAudioPlayerNodeBufferOptions, callbackType: AVAudioPlayerNodeCompletionCallbackType, completionHandler: (p1: AVAudioPlayerNodeCompletionCallbackType) => void): void; + + scheduleBufferAtTimeOptionsCompletionHandler(buffer: AVAudioPCMBuffer, when: AVAudioTime, options: AVAudioPlayerNodeBufferOptions, completionHandler: () => void): void; + + scheduleBufferCompletionCallbackTypeCompletionHandler(buffer: AVAudioPCMBuffer, callbackType: AVAudioPlayerNodeCompletionCallbackType, completionHandler: (p1: AVAudioPlayerNodeCompletionCallbackType) => void): void; + + scheduleBufferCompletionHandler(buffer: AVAudioPCMBuffer, completionHandler: () => void): void; + + scheduleFileAtTimeCompletionCallbackTypeCompletionHandler(file: AVAudioFile, when: AVAudioTime, callbackType: AVAudioPlayerNodeCompletionCallbackType, completionHandler: (p1: AVAudioPlayerNodeCompletionCallbackType) => void): void; + + scheduleFileAtTimeCompletionHandler(file: AVAudioFile, when: AVAudioTime, completionHandler: () => void): void; + + scheduleSegmentStartingFrameFrameCountAtTimeCompletionCallbackTypeCompletionHandler(file: AVAudioFile, startFrame: number, numberFrames: number, when: AVAudioTime, callbackType: AVAudioPlayerNodeCompletionCallbackType, completionHandler: (p1: AVAudioPlayerNodeCompletionCallbackType) => void): void; + + scheduleSegmentStartingFrameFrameCountAtTimeCompletionHandler(file: AVAudioFile, startFrame: number, numberFrames: number, when: AVAudioTime, completionHandler: () => void): void; + + self(): this; + + stop(): void; +} + +declare const enum AVAudioPlayerNodeBufferOptions { + + Loops = 1, + + Interrupts = 2, + + InterruptsAtLoop = 4 +} + +declare const enum AVAudioPlayerNodeCompletionCallbackType { + + DataConsumed = 0, + + DataRendered = 1, + + DataPlayedBack = 2 +} + +declare const enum AVAudioQuality { + + Min = 0, + + Low = 32, + + Medium = 64, + + High = 96, + + Max = 127 +} + +declare class AVAudioRecorder extends NSObject { + + static alloc(): AVAudioRecorder; // inherited from NSObject + + static new(): AVAudioRecorder; // inherited from NSObject + + channelAssignments: NSArray; + + readonly currentTime: number; + + delegate: AVAudioRecorderDelegate; + + readonly deviceCurrentTime: number; + + readonly format: AVAudioFormat; + + meteringEnabled: boolean; + + readonly recording: boolean; + + readonly settings: NSDictionary; + + readonly url: NSURL; + + constructor(o: { URL: NSURL; format: AVAudioFormat; }); + + constructor(o: { URL: NSURL; settings: NSDictionary; }); + + averagePowerForChannel(channelNumber: number): number; + + deleteRecording(): boolean; + + initWithURLFormatError(url: NSURL, format: AVAudioFormat): this; + + initWithURLSettingsError(url: NSURL, settings: NSDictionary): this; + + pause(): void; + + peakPowerForChannel(channelNumber: number): number; + + prepareToRecord(): boolean; + + record(): boolean; + + recordAtTime(time: number): boolean; + + recordAtTimeForDuration(time: number, duration: number): boolean; + + recordForDuration(duration: number): boolean; + + stop(): void; + + updateMeters(): void; +} + +interface AVAudioRecorderDelegate extends NSObjectProtocol { + + audioRecorderBeginInterruption?(recorder: AVAudioRecorder): void; + + audioRecorderDidFinishRecordingSuccessfully?(recorder: AVAudioRecorder, flag: boolean): void; + + audioRecorderEncodeErrorDidOccurError?(recorder: AVAudioRecorder, error: NSError): void; + + audioRecorderEndInterruption?(recorder: AVAudioRecorder): void; + + audioRecorderEndInterruptionWithFlags?(recorder: AVAudioRecorder, flags: number): void; + + audioRecorderEndInterruptionWithOptions?(recorder: AVAudioRecorder, flags: number): void; +} +declare var AVAudioRecorderDelegate: { + + prototype: AVAudioRecorderDelegate; +}; + +declare const enum AVAudioRoutingArbitrationCategory { + + Playback = 0, + + PlayAndRecord = 1, + + PlayAndRecordVoice = 2 +} + +declare class AVAudioSequencer extends NSObject { + + static alloc(): AVAudioSequencer; // inherited from NSObject + + static new(): AVAudioSequencer; // inherited from NSObject + + currentPositionInBeats: number; + + currentPositionInSeconds: number; + + readonly playing: boolean; + + rate: number; + + readonly tempoTrack: AVMusicTrack; + + readonly tracks: NSArray; + + readonly userInfo: NSDictionary; + + constructor(o: { audioEngine: AVAudioEngine; }); + + beatsForHostTimeError(inHostTime: number): number; + + beatsForSeconds(seconds: number): number; + + dataWithSMPTEResolutionError(SMPTEResolution: number): NSData; + + hostTimeForBeatsError(inBeats: number): number; + + initWithAudioEngine(engine: AVAudioEngine): this; + + loadFromDataOptionsError(data: NSData, options: AVMusicSequenceLoadOptions): boolean; + + loadFromURLOptionsError(fileURL: NSURL, options: AVMusicSequenceLoadOptions): boolean; + + prepareToPlay(): void; + + secondsForBeats(beats: number): number; + + startAndReturnError(): boolean; + + stop(): void; + + writeToURLSMPTEResolutionReplaceExistingError(fileURL: NSURL, resolution: number, replace: boolean): boolean; +} + +declare class AVAudioSession extends NSObject { + + static alloc(): AVAudioSession; // inherited from NSObject + + static new(): AVAudioSession; // inherited from NSObject + + static sharedInstance(): AVAudioSession; + + readonly IOBufferDuration: number; + + readonly allowHapticsAndSystemSoundsDuringRecording: boolean; + + readonly availableCategories: NSArray; + + readonly availableInputs: NSArray; + + readonly availableModes: NSArray; + + readonly category: string; + + readonly categoryOptions: AVAudioSessionCategoryOptions; + + readonly currentHardwareInputNumberOfChannels: number; + + readonly currentHardwareOutputNumberOfChannels: number; + + readonly currentHardwareSampleRate: number; + + readonly currentRoute: AVAudioSessionRouteDescription; + + delegate: AVAudioSessionDelegate; + + readonly inputAvailable: boolean; + + readonly inputDataSource: AVAudioSessionDataSourceDescription; + + readonly inputDataSources: NSArray; + + readonly inputGain: number; + + readonly inputGainSettable: boolean; + + readonly inputIsAvailable: boolean; + + readonly inputLatency: number; + + readonly inputNumberOfChannels: number; + + readonly inputOrientation: AVAudioStereoOrientation; + + readonly maximumInputNumberOfChannels: number; + + readonly maximumOutputNumberOfChannels: number; + + readonly mode: string; + + readonly otherAudioPlaying: boolean; + + readonly outputDataSource: AVAudioSessionDataSourceDescription; + + readonly outputDataSources: NSArray; + + readonly outputLatency: number; + + readonly outputNumberOfChannels: number; + + readonly outputVolume: number; + + readonly preferredHardwareSampleRate: number; + + readonly preferredIOBufferDuration: number; + + readonly preferredInput: AVAudioSessionPortDescription; + + readonly preferredInputNumberOfChannels: number; + + readonly preferredInputOrientation: AVAudioStereoOrientation; + + readonly preferredOutputNumberOfChannels: number; + + readonly preferredSampleRate: number; + + readonly prefersNoInterruptionsFromSystemAlerts: boolean; + + readonly promptStyle: AVAudioSessionPromptStyle; + + readonly recordPermission: AVAudioSessionRecordPermission; + + readonly routeSharingPolicy: AVAudioSessionRouteSharingPolicy; + + readonly sampleRate: number; + + readonly secondaryAudioShouldBeSilencedHint: boolean; + + readonly supportsMultichannelContent: boolean; + + overrideOutputAudioPortError(portOverride: AVAudioSessionPortOverride): boolean; + + prepareRouteSelectionForPlaybackWithCompletionHandler(completionHandler: (p1: boolean, p2: AVAudioSessionRouteSelection) => void): void; + + requestRecordPermission(response: (p1: boolean) => void): void; + + setActiveError(active: boolean): boolean; + + setActiveWithFlagsError(active: boolean, flags: number): boolean; + + setActiveWithOptionsError(active: boolean, options: AVAudioSessionSetActiveOptions): boolean; + + setAggregatedIOPreferenceError(inIOType: AVAudioSessionIOType): boolean; + + setAllowHapticsAndSystemSoundsDuringRecordingError(inValue: boolean): boolean; + + setCategoryError(category: string): boolean; + + setCategoryModeOptionsError(category: string, mode: string, options: AVAudioSessionCategoryOptions): boolean; + + setCategoryModeRouteSharingPolicyOptionsError(category: string, mode: string, policy: AVAudioSessionRouteSharingPolicy, options: AVAudioSessionCategoryOptions): boolean; + + setCategoryWithOptionsError(category: string, options: AVAudioSessionCategoryOptions): boolean; + + setInputDataSourceError(dataSource: AVAudioSessionDataSourceDescription): boolean; + + setInputGainError(gain: number): boolean; + + setModeError(mode: string): boolean; + + setOutputDataSourceError(dataSource: AVAudioSessionDataSourceDescription): boolean; + + setPreferredHardwareSampleRateError(sampleRate: number): boolean; + + setPreferredIOBufferDurationError(duration: number): boolean; + + setPreferredInputError(inPort: AVAudioSessionPortDescription): boolean; + + setPreferredInputNumberOfChannelsError(count: number): boolean; + + setPreferredInputOrientationError(orientation: AVAudioStereoOrientation): boolean; + + setPreferredOutputNumberOfChannelsError(count: number): boolean; + + setPreferredSampleRateError(sampleRate: number): boolean; + + setPrefersNoInterruptionsFromSystemAlertsError(inValue: boolean): boolean; + + setSupportsMultichannelContentError(inValue: boolean): boolean; +} + +declare const enum AVAudioSessionActivationOptions { + + None = 0 +} + +declare var AVAudioSessionCategoryAmbient: string; + +declare var AVAudioSessionCategoryAudioProcessing: string; + +declare var AVAudioSessionCategoryMultiRoute: string; + +declare const enum AVAudioSessionCategoryOptions { + + MixWithOthers = 1, + + DuckOthers = 2, + + AllowBluetooth = 4, + + DefaultToSpeaker = 8, + + InterruptSpokenAudioAndMixWithOthers = 17, + + AllowBluetoothA2DP = 32, + + AllowAirPlay = 64, + + OverrideMutedMicrophoneInterruption = 128 +} + +declare var AVAudioSessionCategoryPlayAndRecord: string; + +declare var AVAudioSessionCategoryPlayback: string; + +declare var AVAudioSessionCategoryRecord: string; + +declare var AVAudioSessionCategorySoloAmbient: string; + +declare class AVAudioSessionChannelDescription extends NSObject { + + static alloc(): AVAudioSessionChannelDescription; // inherited from NSObject + + static new(): AVAudioSessionChannelDescription; // inherited from NSObject + + readonly channelLabel: number; + + readonly channelName: string; + + readonly channelNumber: number; + + readonly owningPortUID: string; +} + +declare class AVAudioSessionDataSourceDescription extends NSObject { + + static alloc(): AVAudioSessionDataSourceDescription; // inherited from NSObject + + static new(): AVAudioSessionDataSourceDescription; // inherited from NSObject + + readonly dataSourceID: number; + + readonly dataSourceName: string; + + readonly location: string; + + readonly orientation: string; + + readonly preferredPolarPattern: string; + + readonly selectedPolarPattern: string; + + readonly supportedPolarPatterns: NSArray; + + setPreferredPolarPatternError(pattern: string): boolean; +} + +interface AVAudioSessionDelegate extends NSObjectProtocol { + + beginInterruption?(): void; + + endInterruption?(): void; + + endInterruptionWithFlags?(flags: number): void; + + inputIsAvailableChanged?(isInputAvailable: boolean): void; +} +declare var AVAudioSessionDelegate: { + + prototype: AVAudioSessionDelegate; +}; + +declare const enum AVAudioSessionIOType { + + NotSpecified = 0, + + Aggregated = 1 +} + +declare const AVAudioSessionInterruptionFlags_ShouldResume: number; + +declare var AVAudioSessionInterruptionNotification: string; + +declare var AVAudioSessionInterruptionOptionKey: string; + +declare const enum AVAudioSessionInterruptionOptions { + + ShouldResume = 1 +} + +declare const enum AVAudioSessionInterruptionReason { + + Default = 0, + + AppWasSuspended = 1, + + BuiltInMicMuted = 2 +} + +declare var AVAudioSessionInterruptionReasonKey: string; + +declare const enum AVAudioSessionInterruptionType { + + Began = 1, + + Ended = 0 +} + +declare var AVAudioSessionInterruptionTypeKey: string; + +declare var AVAudioSessionInterruptionWasSuspendedKey: string; + +declare var AVAudioSessionLocationLower: string; + +declare var AVAudioSessionLocationUpper: string; + +declare var AVAudioSessionMediaServicesWereLostNotification: string; + +declare var AVAudioSessionMediaServicesWereResetNotification: string; + +declare var AVAudioSessionModeDefault: string; + +declare var AVAudioSessionModeGameChat: string; + +declare var AVAudioSessionModeMeasurement: string; + +declare var AVAudioSessionModeMoviePlayback: string; + +declare var AVAudioSessionModeSpokenAudio: string; + +declare var AVAudioSessionModeVideoChat: string; + +declare var AVAudioSessionModeVideoRecording: string; + +declare var AVAudioSessionModeVoiceChat: string; + +declare var AVAudioSessionModeVoicePrompt: string; + +declare var AVAudioSessionOrientationBack: string; + +declare var AVAudioSessionOrientationBottom: string; + +declare var AVAudioSessionOrientationFront: string; + +declare var AVAudioSessionOrientationLeft: string; + +declare var AVAudioSessionOrientationRight: string; + +declare var AVAudioSessionOrientationTop: string; + +declare var AVAudioSessionPolarPatternCardioid: string; + +declare var AVAudioSessionPolarPatternOmnidirectional: string; + +declare var AVAudioSessionPolarPatternStereo: string; + +declare var AVAudioSessionPolarPatternSubcardioid: string; + +declare var AVAudioSessionPortAVB: string; + +declare var AVAudioSessionPortAirPlay: string; + +declare var AVAudioSessionPortBluetoothA2DP: string; + +declare var AVAudioSessionPortBluetoothHFP: string; + +declare var AVAudioSessionPortBluetoothLE: string; + +declare var AVAudioSessionPortBuiltInMic: string; + +declare var AVAudioSessionPortBuiltInReceiver: string; + +declare var AVAudioSessionPortBuiltInSpeaker: string; + +declare var AVAudioSessionPortCarAudio: string; + +declare class AVAudioSessionPortDescription extends NSObject { + + static alloc(): AVAudioSessionPortDescription; // inherited from NSObject + + static new(): AVAudioSessionPortDescription; // inherited from NSObject + + readonly UID: string; + + readonly channels: NSArray; + + readonly dataSources: NSArray; + + readonly hasHardwareVoiceCallProcessing: boolean; + + readonly portName: string; + + readonly portType: string; + + readonly preferredDataSource: AVAudioSessionDataSourceDescription; + + readonly selectedDataSource: AVAudioSessionDataSourceDescription; + + readonly spatialAudioEnabled: boolean; + + setPreferredDataSourceError(dataSource: AVAudioSessionDataSourceDescription): boolean; +} + +declare var AVAudioSessionPortDisplayPort: string; + +declare var AVAudioSessionPortFireWire: string; + +declare var AVAudioSessionPortHDMI: string; + +declare var AVAudioSessionPortHeadphones: string; + +declare var AVAudioSessionPortHeadsetMic: string; + +declare var AVAudioSessionPortLineIn: string; + +declare var AVAudioSessionPortLineOut: string; + +declare const enum AVAudioSessionPortOverride { + + None = 0, + + Speaker = 1936747378 +} + +declare var AVAudioSessionPortPCI: string; + +declare var AVAudioSessionPortThunderbolt: string; + +declare var AVAudioSessionPortUSBAudio: string; + +declare var AVAudioSessionPortVirtual: string; + +declare const enum AVAudioSessionPromptStyle { + + None = 1852796517, + + Short = 1936224884, + + Normal = 1852992876 +} + +declare const enum AVAudioSessionRecordPermission { + + Undetermined = 1970168948, + + Denied = 1684369017, + + Granted = 1735552628 +} + +declare var AVAudioSessionRouteChangeNotification: string; + +declare var AVAudioSessionRouteChangePreviousRouteKey: string; + +declare const enum AVAudioSessionRouteChangeReason { + + Unknown = 0, + + NewDeviceAvailable = 1, + + OldDeviceUnavailable = 2, + + CategoryChange = 3, + + Override = 4, + + WakeFromSleep = 6, + + NoSuitableRouteForCategory = 7, + + RouteConfigurationChange = 8 +} + +declare var AVAudioSessionRouteChangeReasonKey: string; + +declare class AVAudioSessionRouteDescription extends NSObject { + + static alloc(): AVAudioSessionRouteDescription; // inherited from NSObject + + static new(): AVAudioSessionRouteDescription; // inherited from NSObject + + readonly inputs: NSArray; + + readonly outputs: NSArray; +} + +declare const enum AVAudioSessionRouteSharingPolicy { + + Default = 0, + + LongFormAudio = 1, + + LongForm = 1, + + Independent = 2, + + LongFormVideo = 3 +} + +declare const AVAudioSessionSetActiveFlags_NotifyOthersOnDeactivation: number; + +declare const enum AVAudioSessionSetActiveOptions { + + NotifyOthersOnDeactivation = 1 +} + +declare var AVAudioSessionSilenceSecondaryAudioHintNotification: string; + +declare const enum AVAudioSessionSilenceSecondaryAudioHintType { + + Begin = 1, + + End = 0 +} + +declare var AVAudioSessionSilenceSecondaryAudioHintTypeKey: string; + +declare var AVAudioSessionSpatialAudioEnabledKey: string; + +declare var AVAudioSessionSpatialPlaybackCapabilitiesChangedNotification: string; + +declare class AVAudioSinkNode extends AVAudioNode { + + static alloc(): AVAudioSinkNode; // inherited from NSObject + + static new(): AVAudioSinkNode; // inherited from NSObject + + constructor(o: { receiverBlock: (p1: interop.Pointer | interop.Reference, p2: number, p3: interop.Pointer | interop.Reference) => number; }); + + initWithReceiverBlock(block: (p1: interop.Pointer | interop.Reference, p2: number, p3: interop.Pointer | interop.Reference) => number): this; +} + +declare class AVAudioSourceNode extends AVAudioNode implements AVAudioMixing { + + static alloc(): AVAudioSourceNode; // inherited from NSObject + + static new(): AVAudioSourceNode; // inherited from NSObject + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + readonly hash: number; // inherited from NSObjectProtocol + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + obstruction: number; // inherited from AVAudio3DMixing + + occlusion: number; // inherited from AVAudio3DMixing + + pan: number; // inherited from AVAudioStereoMixing + + pointSourceInHeadMode: AVAudio3DMixingPointSourceInHeadMode; // inherited from AVAudio3DMixing + + position: AVAudio3DPoint; // inherited from AVAudio3DMixing + + rate: number; // inherited from AVAudio3DMixing + + renderingAlgorithm: AVAudio3DMixingRenderingAlgorithm; // inherited from AVAudio3DMixing + + reverbBlend: number; // inherited from AVAudio3DMixing + + sourceMode: AVAudio3DMixingSourceMode; // inherited from AVAudio3DMixing + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + volume: number; // inherited from AVAudioMixing + + readonly // inherited from NSObjectProtocol + + constructor(o: { format: AVAudioFormat; renderBlock: (p1: interop.Pointer | interop.Reference, p2: interop.Pointer | interop.Reference, p3: number, p4: interop.Pointer | interop.Reference) => number; }); + + constructor(o: { renderBlock: (p1: interop.Pointer | interop.Reference, p2: interop.Pointer | interop.Reference, p3: number, p4: interop.Pointer | interop.Reference) => number; }); + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + destinationForMixerBus(mixer: AVAudioNode, bus: number): AVAudioMixingDestination; + + initWithFormatRenderBlock(format: AVAudioFormat, block: (p1: interop.Pointer | interop.Reference, p2: interop.Pointer | interop.Reference, p3: number, p4: interop.Pointer | interop.Reference) => number): this; + + initWithRenderBlock(block: (p1: interop.Pointer | interop.Reference, p2: interop.Pointer | interop.Reference, p3: number, p4: interop.Pointer | interop.Reference) => number): this; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; +} + +interface AVAudioStereoMixing extends NSObjectProtocol { + + pan: number; +} +declare var AVAudioStereoMixing: { + + prototype: AVAudioStereoMixing; +}; + +declare const enum AVAudioStereoOrientation { + + None = 0, + + Portrait = 1, + + PortraitUpsideDown = 2, + + LandscapeRight = 3, + + LandscapeLeft = 4 +} + +declare class AVAudioTime extends NSObject { + + static alloc(): AVAudioTime; // inherited from NSObject + + static hostTimeForSeconds(seconds: number): number; + + static new(): AVAudioTime; // inherited from NSObject + + static secondsForHostTime(hostTime: number): number; + + static timeWithAudioTimeStampSampleRate(ts: interop.Pointer | interop.Reference, sampleRate: number): AVAudioTime; + + static timeWithHostTime(hostTime: number): AVAudioTime; + + static timeWithHostTimeSampleTimeAtRate(hostTime: number, sampleTime: number, sampleRate: number): AVAudioTime; + + static timeWithSampleTimeAtRate(sampleTime: number, sampleRate: number): AVAudioTime; + + readonly audioTimeStamp: AudioTimeStamp; + + readonly hostTime: number; + + readonly hostTimeValid: boolean; + + readonly sampleRate: number; + + readonly sampleTime: number; + + readonly sampleTimeValid: boolean; + + constructor(o: { audioTimeStamp: interop.Pointer | interop.Reference; sampleRate: number; }); + + constructor(o: { hostTime: number; }); + + constructor(o: { hostTime: number; sampleTime: number; atRate: number; }); + + constructor(o: { sampleTime: number; atRate: number; }); + + extrapolateTimeFromAnchor(anchorTime: AVAudioTime): AVAudioTime; + + initWithAudioTimeStampSampleRate(ts: interop.Pointer | interop.Reference, sampleRate: number): this; + + initWithHostTime(hostTime: number): this; + + initWithHostTimeSampleTimeAtRate(hostTime: number, sampleTime: number, sampleRate: number): this; + + initWithSampleTimeAtRate(sampleTime: number, sampleRate: number): this; +} + +declare class AVAudioUnit extends AVAudioNode { + + static alloc(): AVAudioUnit; // inherited from NSObject + + static instantiateWithComponentDescriptionOptionsCompletionHandler(audioComponentDescription: AudioComponentDescription, options: AudioComponentInstantiationOptions, completionHandler: (p1: AVAudioUnit, p2: NSError) => void): void; + + static new(): AVAudioUnit; // inherited from NSObject + + readonly audioComponentDescription: AudioComponentDescription; + + readonly audioUnit: interop.Pointer | interop.Reference; + + readonly manufacturerName: string; + + readonly name: string; + + readonly version: number; + + loadAudioUnitPresetAtURLError(url: NSURL): boolean; +} + +declare class AVAudioUnitComponent extends NSObject { + + static alloc(): AVAudioUnitComponent; // inherited from NSObject + + static new(): AVAudioUnitComponent; // inherited from NSObject + + readonly allTagNames: NSArray; + + readonly audioComponent: interop.Pointer | interop.Reference; + + readonly audioComponentDescription: AudioComponentDescription; + + readonly hasMIDIInput: boolean; + + readonly hasMIDIOutput: boolean; + + readonly localizedTypeName: string; + + readonly manufacturerName: string; + + readonly name: string; + + readonly sandboxSafe: boolean; + + readonly typeName: string; + + readonly version: number; + + readonly versionString: string; +} + +declare class AVAudioUnitComponentManager extends NSObject { + + static alloc(): AVAudioUnitComponentManager; // inherited from NSObject + + static new(): AVAudioUnitComponentManager; // inherited from NSObject + + static sharedAudioUnitComponentManager(): AVAudioUnitComponentManager; + + readonly standardLocalizedTagNames: NSArray; + + readonly tagNames: NSArray; + + componentsMatchingDescription(desc: AudioComponentDescription): NSArray; + + componentsMatchingPredicate(predicate: NSPredicate): NSArray; + + componentsPassingTest(testHandler: (p1: AVAudioUnitComponent, p2: interop.Pointer | interop.Reference) => boolean): NSArray; +} + +declare var AVAudioUnitComponentManagerRegistrationsChangedNotification: string; + +declare var AVAudioUnitComponentTagsDidChangeNotification: string; + +declare class AVAudioUnitDelay extends AVAudioUnitEffect { + + static alloc(): AVAudioUnitDelay; // inherited from NSObject + + static new(): AVAudioUnitDelay; // inherited from NSObject + + delayTime: number; + + feedback: number; + + lowPassCutoff: number; + + wetDryMix: number; +} + +declare class AVAudioUnitDistortion extends AVAudioUnitEffect { + + static alloc(): AVAudioUnitDistortion; // inherited from NSObject + + static new(): AVAudioUnitDistortion; // inherited from NSObject + + preGain: number; + + wetDryMix: number; + + loadFactoryPreset(preset: AVAudioUnitDistortionPreset): void; +} + +declare const enum AVAudioUnitDistortionPreset { + + DrumsBitBrush = 0, + + DrumsBufferBeats = 1, + + DrumsLoFi = 2, + + MultiBrokenSpeaker = 3, + + MultiCellphoneConcert = 4, + + MultiDecimated1 = 5, + + MultiDecimated2 = 6, + + MultiDecimated3 = 7, + + MultiDecimated4 = 8, + + MultiDistortedFunk = 9, + + MultiDistortedCubed = 10, + + MultiDistortedSquared = 11, + + MultiEcho1 = 12, + + MultiEcho2 = 13, + + MultiEchoTight1 = 14, + + MultiEchoTight2 = 15, + + MultiEverythingIsBroken = 16, + + SpeechAlienChatter = 17, + + SpeechCosmicInterference = 18, + + SpeechGoldenPi = 19, + + SpeechRadioTower = 20, + + SpeechWaves = 21 +} + +declare class AVAudioUnitEQ extends AVAudioUnitEffect { + + static alloc(): AVAudioUnitEQ; // inherited from NSObject + + static new(): AVAudioUnitEQ; // inherited from NSObject + + readonly bands: NSArray; + + globalGain: number; + + constructor(o: { numberOfBands: number; }); + + initWithNumberOfBands(numberOfBands: number): this; +} + +declare class AVAudioUnitEQFilterParameters extends NSObject { + + static alloc(): AVAudioUnitEQFilterParameters; // inherited from NSObject + + static new(): AVAudioUnitEQFilterParameters; // inherited from NSObject + + bandwidth: number; + + bypass: boolean; + + filterType: AVAudioUnitEQFilterType; + + frequency: number; + + gain: number; +} + +declare const enum AVAudioUnitEQFilterType { + + Parametric = 0, + + LowPass = 1, + + HighPass = 2, + + ResonantLowPass = 3, + + ResonantHighPass = 4, + + BandPass = 5, + + BandStop = 6, + + LowShelf = 7, + + HighShelf = 8, + + ResonantLowShelf = 9, + + ResonantHighShelf = 10 +} + +declare class AVAudioUnitEffect extends AVAudioUnit { + + static alloc(): AVAudioUnitEffect; // inherited from NSObject + + static new(): AVAudioUnitEffect; // inherited from NSObject + + bypass: boolean; + + constructor(o: { audioComponentDescription: AudioComponentDescription; }); + + initWithAudioComponentDescription(audioComponentDescription: AudioComponentDescription): this; +} + +declare class AVAudioUnitGenerator extends AVAudioUnit implements AVAudioMixing { + + static alloc(): AVAudioUnitGenerator; // inherited from NSObject + + static new(): AVAudioUnitGenerator; // inherited from NSObject + + bypass: boolean; + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + readonly hash: number; // inherited from NSObjectProtocol + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + obstruction: number; // inherited from AVAudio3DMixing + + occlusion: number; // inherited from AVAudio3DMixing + + pan: number; // inherited from AVAudioStereoMixing + + pointSourceInHeadMode: AVAudio3DMixingPointSourceInHeadMode; // inherited from AVAudio3DMixing + + position: AVAudio3DPoint; // inherited from AVAudio3DMixing + + rate: number; // inherited from AVAudio3DMixing + + renderingAlgorithm: AVAudio3DMixingRenderingAlgorithm; // inherited from AVAudio3DMixing + + reverbBlend: number; // inherited from AVAudio3DMixing + + sourceMode: AVAudio3DMixingSourceMode; // inherited from AVAudio3DMixing + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + volume: number; // inherited from AVAudioMixing + + readonly // inherited from NSObjectProtocol + + constructor(o: { audioComponentDescription: AudioComponentDescription; }); + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + destinationForMixerBus(mixer: AVAudioNode, bus: number): AVAudioMixingDestination; + + initWithAudioComponentDescription(audioComponentDescription: AudioComponentDescription): this; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; +} + +declare class AVAudioUnitMIDIInstrument extends AVAudioUnit implements AVAudioMixing { + + static alloc(): AVAudioUnitMIDIInstrument; // inherited from NSObject + + static new(): AVAudioUnitMIDIInstrument; // inherited from NSObject + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + readonly hash: number; // inherited from NSObjectProtocol + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + obstruction: number; // inherited from AVAudio3DMixing + + occlusion: number; // inherited from AVAudio3DMixing + + pan: number; // inherited from AVAudioStereoMixing + + pointSourceInHeadMode: AVAudio3DMixingPointSourceInHeadMode; // inherited from AVAudio3DMixing + + position: AVAudio3DPoint; // inherited from AVAudio3DMixing + + rate: number; // inherited from AVAudio3DMixing + + renderingAlgorithm: AVAudio3DMixingRenderingAlgorithm; // inherited from AVAudio3DMixing + + reverbBlend: number; // inherited from AVAudio3DMixing + + sourceMode: AVAudio3DMixingSourceMode; // inherited from AVAudio3DMixing + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + volume: number; // inherited from AVAudioMixing + + readonly // inherited from NSObjectProtocol + + constructor(o: { audioComponentDescription: AudioComponentDescription; }); + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + destinationForMixerBus(mixer: AVAudioNode, bus: number): AVAudioMixingDestination; + + initWithAudioComponentDescription(description: AudioComponentDescription): this; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; + + sendControllerWithValueOnChannel(controller: number, value: number, channel: number): void; + + sendMIDIEventData1(midiStatus: number, data1: number): void; + + sendMIDIEventData1Data2(midiStatus: number, data1: number, data2: number): void; + + sendMIDISysExEvent(midiData: NSData): void; + + sendPitchBendOnChannel(pitchbend: number, channel: number): void; + + sendPressureForKeyWithValueOnChannel(key: number, value: number, channel: number): void; + + sendPressureOnChannel(pressure: number, channel: number): void; + + sendProgramChangeBankMSBBankLSBOnChannel(program: number, bankMSB: number, bankLSB: number, channel: number): void; + + sendProgramChangeOnChannel(program: number, channel: number): void; + + startNoteWithVelocityOnChannel(note: number, velocity: number, channel: number): void; + + stopNoteOnChannel(note: number, channel: number): void; +} + +declare var AVAudioUnitManufacturerNameApple: string; + +declare class AVAudioUnitReverb extends AVAudioUnitEffect { + + static alloc(): AVAudioUnitReverb; // inherited from NSObject + + static new(): AVAudioUnitReverb; // inherited from NSObject + + wetDryMix: number; + + loadFactoryPreset(preset: AVAudioUnitReverbPreset): void; +} + +declare const enum AVAudioUnitReverbPreset { + + SmallRoom = 0, + + MediumRoom = 1, + + LargeRoom = 2, + + MediumHall = 3, + + LargeHall = 4, + + Plate = 5, + + MediumChamber = 6, + + LargeChamber = 7, + + Cathedral = 8, + + LargeRoom2 = 9, + + MediumHall2 = 10, + + MediumHall3 = 11, + + LargeHall2 = 12 +} + +declare class AVAudioUnitSampler extends AVAudioUnitMIDIInstrument { + + static alloc(): AVAudioUnitSampler; // inherited from NSObject + + static new(): AVAudioUnitSampler; // inherited from NSObject + + globalTuning: number; + + masterGain: number; + + overallGain: number; + + stereoPan: number; + + loadAudioFilesAtURLsError(audioFiles: NSArray | NSURL[]): boolean; + + loadInstrumentAtURLError(instrumentURL: NSURL): boolean; + + loadSoundBankInstrumentAtURLProgramBankMSBBankLSBError(bankURL: NSURL, program: number, bankMSB: number, bankLSB: number): boolean; +} + +declare class AVAudioUnitTimeEffect extends AVAudioUnit { + + static alloc(): AVAudioUnitTimeEffect; // inherited from NSObject + + static new(): AVAudioUnitTimeEffect; // inherited from NSObject + + bypass: boolean; + + constructor(o: { audioComponentDescription: AudioComponentDescription; }); + + initWithAudioComponentDescription(audioComponentDescription: AudioComponentDescription): this; +} + +declare class AVAudioUnitTimePitch extends AVAudioUnitTimeEffect { + + static alloc(): AVAudioUnitTimePitch; // inherited from NSObject + + static new(): AVAudioUnitTimePitch; // inherited from NSObject + + overlap: number; + + pitch: number; + + rate: number; +} + +declare var AVAudioUnitTypeEffect: string; + +declare var AVAudioUnitTypeFormatConverter: string; + +declare var AVAudioUnitTypeGenerator: string; + +declare var AVAudioUnitTypeMIDIProcessor: string; + +declare var AVAudioUnitTypeMixer: string; + +declare var AVAudioUnitTypeMusicDevice: string; + +declare var AVAudioUnitTypeMusicEffect: string; + +declare var AVAudioUnitTypeOfflineEffect: string; + +declare var AVAudioUnitTypeOutput: string; + +declare var AVAudioUnitTypePanner: string; + +declare class AVAudioUnitVarispeed extends AVAudioUnitTimeEffect { + + static alloc(): AVAudioUnitVarispeed; // inherited from NSObject + + static new(): AVAudioUnitVarispeed; // inherited from NSObject + + rate: number; +} + +interface AVBeatRange { + start: number; + length: number; +} +declare var AVBeatRange: interop.StructType; + +declare var AVChannelLayoutKey: string; + +declare var AVEncoderAudioQualityForVBRKey: string; + +declare var AVEncoderAudioQualityKey: string; + +declare var AVEncoderBitDepthHintKey: string; + +declare var AVEncoderBitRateKey: string; + +declare var AVEncoderBitRatePerChannelKey: string; + +declare var AVEncoderBitRateStrategyKey: string; + +declare var AVFormatIDKey: string; + +declare var AVLinearPCMBitDepthKey: string; + +declare var AVLinearPCMIsBigEndianKey: string; + +declare var AVLinearPCMIsFloatKey: string; + +declare var AVLinearPCMIsNonInterleaved: string; + +declare class AVMIDIPlayer extends NSObject { + + static alloc(): AVMIDIPlayer; // inherited from NSObject + + static new(): AVMIDIPlayer; // inherited from NSObject + + currentPosition: number; + + readonly duration: number; + + readonly playing: boolean; + + rate: number; + + constructor(o: { contentsOfURL: NSURL; soundBankURL: NSURL; }); + + constructor(o: { data: NSData; soundBankURL: NSURL; }); + + initWithContentsOfURLSoundBankURLError(inURL: NSURL, bankURL: NSURL): this; + + initWithDataSoundBankURLError(data: NSData, bankURL: NSURL): this; + + play(completionHandler: () => void): void; + + prepareToPlay(): void; + + stop(): void; +} + +declare const enum AVMusicSequenceLoadOptions { + + SMF_PreserveTracks = 0, + + SMF_ChannelsToTracks = 1 +} + +declare class AVMusicTrack extends NSObject { + + static alloc(): AVMusicTrack; // inherited from NSObject + + static new(): AVMusicTrack; // inherited from NSObject + + destinationAudioUnit: AVAudioUnit; + + destinationMIDIEndpoint: number; + + lengthInBeats: number; + + lengthInSeconds: number; + + loopRange: AVBeatRange; + + loopingEnabled: boolean; + + muted: boolean; + + numberOfLoops: number; + + offsetTime: number; + + soloed: boolean; + + readonly timeResolution: number; +} + +declare const enum AVMusicTrackLoopCount { + + Forever = -1 +} + +declare var AVNumberOfChannelsKey: string; + +declare var AVSampleRateConverterAlgorithmKey: string; + +declare var AVSampleRateConverterAlgorithm_Mastering: string; + +declare var AVSampleRateConverterAlgorithm_MinimumPhase: string; + +declare var AVSampleRateConverterAlgorithm_Normal: string; + +declare var AVSampleRateConverterAudioQualityKey: string; + +declare var AVSampleRateKey: string; + +declare const enum AVSpeechBoundary { + + Immediate = 0, + + Word = 1 +} + +declare var AVSpeechSynthesisIPANotationAttribute: string; + +declare class AVSpeechSynthesisVoice extends NSObject implements NSSecureCoding { + + static alloc(): AVSpeechSynthesisVoice; // inherited from NSObject + + static currentLanguageCode(): string; + + static new(): AVSpeechSynthesisVoice; // inherited from NSObject + + static speechVoices(): NSArray; + + static voiceWithIdentifier(identifier: string): AVSpeechSynthesisVoice; + + static voiceWithLanguage(languageCode: string): AVSpeechSynthesisVoice; + + readonly audioFileSettings: NSDictionary; + + readonly gender: AVSpeechSynthesisVoiceGender; + + readonly identifier: string; + + readonly language: string; + + readonly name: string; + + readonly quality: AVSpeechSynthesisVoiceQuality; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} + +declare const enum AVSpeechSynthesisVoiceGender { + + Unspecified = 0, + + Male = 1, + + Female = 2 +} + +declare var AVSpeechSynthesisVoiceIdentifierAlex: string; + +declare const enum AVSpeechSynthesisVoiceQuality { + + Default = 1, + + Enhanced = 2 +} + +declare class AVSpeechSynthesizer extends NSObject { + + static alloc(): AVSpeechSynthesizer; // inherited from NSObject + + static new(): AVSpeechSynthesizer; // inherited from NSObject + + delegate: AVSpeechSynthesizerDelegate; + + mixToTelephonyUplink: boolean; + + outputChannels: NSArray; + + readonly paused: boolean; + + readonly speaking: boolean; + + usesApplicationAudioSession: boolean; + + continueSpeaking(): boolean; + + pauseSpeakingAtBoundary(boundary: AVSpeechBoundary): boolean; + + speakUtterance(utterance: AVSpeechUtterance): void; + + stopSpeakingAtBoundary(boundary: AVSpeechBoundary): boolean; + + writeUtteranceToBufferCallback(utterance: AVSpeechUtterance, bufferCallback: (p1: AVAudioBuffer) => void): void; +} + +interface AVSpeechSynthesizerDelegate extends NSObjectProtocol { + + speechSynthesizerDidCancelSpeechUtterance?(synthesizer: AVSpeechSynthesizer, utterance: AVSpeechUtterance): void; + + speechSynthesizerDidContinueSpeechUtterance?(synthesizer: AVSpeechSynthesizer, utterance: AVSpeechUtterance): void; + + speechSynthesizerDidFinishSpeechUtterance?(synthesizer: AVSpeechSynthesizer, utterance: AVSpeechUtterance): void; + + speechSynthesizerDidPauseSpeechUtterance?(synthesizer: AVSpeechSynthesizer, utterance: AVSpeechUtterance): void; + + speechSynthesizerDidStartSpeechUtterance?(synthesizer: AVSpeechSynthesizer, utterance: AVSpeechUtterance): void; + + speechSynthesizerWillSpeakRangeOfSpeechStringUtterance?(synthesizer: AVSpeechSynthesizer, characterRange: NSRange, utterance: AVSpeechUtterance): void; +} +declare var AVSpeechSynthesizerDelegate: { + + prototype: AVSpeechSynthesizerDelegate; +}; + +declare class AVSpeechUtterance extends NSObject implements NSCopying, NSSecureCoding { + + static alloc(): AVSpeechUtterance; // inherited from NSObject + + static new(): AVSpeechUtterance; // inherited from NSObject + + static speechUtteranceWithAttributedString(string: NSAttributedString): AVSpeechUtterance; + + static speechUtteranceWithString(string: string): AVSpeechUtterance; + + readonly attributedSpeechString: NSAttributedString; + + pitchMultiplier: number; + + postUtteranceDelay: number; + + preUtteranceDelay: number; + + prefersAssistiveTechnologySettings: boolean; + + rate: number; + + readonly speechString: string; + + voice: AVSpeechSynthesisVoice; + + volume: number; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { attributedString: NSAttributedString; }); + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + constructor(o: { string: string; }); + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + encodeWithCoder(coder: NSCoder): void; + + initWithAttributedString(string: NSAttributedString): this; + + initWithCoder(coder: NSCoder): this; + + initWithString(string: string): this; +} + +declare var AVSpeechUtteranceDefaultSpeechRate: number; + +declare var AVSpeechUtteranceMaximumSpeechRate: number; + +declare var AVSpeechUtteranceMinimumSpeechRate: number; diff --git a/packages/types-minimal/src/lib/ios/objc-x86_64/objc!PDFKit.d.ts b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!PDFKit.d.ts new file mode 100644 index 000000000..fca1acead --- /dev/null +++ b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!PDFKit.d.ts @@ -0,0 +1,1253 @@ + +declare const enum PDFAccessPermissions { + + AllowsLowQualityPrinting = 1, + + AllowsHighQualityPrinting = 2, + + AllowsDocumentChanges = 4, + + AllowsDocumentAssembly = 8, + + AllowsContentCopying = 16, + + AllowsContentAccessibility = 32, + + AllowsCommenting = 64, + + AllowsFormFieldEntry = 128 +} + +declare class PDFAction extends NSObject implements NSCopying { + + static alloc(): PDFAction; // inherited from NSObject + + static new(): PDFAction; // inherited from NSObject + + readonly type: string; + + copyWithZone(zone: interop.Pointer | interop.Reference): any; +} + +declare class PDFActionGoTo extends PDFAction implements NSCopying { + + static alloc(): PDFActionGoTo; // inherited from NSObject + + static new(): PDFActionGoTo; // inherited from NSObject + + destination: PDFDestination; + + constructor(o: { destination: PDFDestination; }); + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + initWithDestination(destination: PDFDestination): this; +} + +declare class PDFActionNamed extends PDFAction implements NSCopying { + + static alloc(): PDFActionNamed; // inherited from NSObject + + static new(): PDFActionNamed; // inherited from NSObject + + name: PDFActionNamedName; + + constructor(o: { name: PDFActionNamedName; }); + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + initWithName(name: PDFActionNamedName): this; +} + +declare const enum PDFActionNamedName { + + kPDFActionNamedNone = 0, + + kPDFActionNamedNextPage = 1, + + kPDFActionNamedPreviousPage = 2, + + kPDFActionNamedFirstPage = 3, + + kPDFActionNamedLastPage = 4, + + kPDFActionNamedGoBack = 5, + + kPDFActionNamedGoForward = 6, + + kPDFActionNamedGoToPage = 7, + + kPDFActionNamedFind = 8, + + kPDFActionNamedPrint = 9, + + kPDFActionNamedZoomIn = 10, + + kPDFActionNamedZoomOut = 11 +} + +declare class PDFActionRemoteGoTo extends PDFAction implements NSCopying { + + static alloc(): PDFActionRemoteGoTo; // inherited from NSObject + + static new(): PDFActionRemoteGoTo; // inherited from NSObject + + URL: NSURL; + + pageIndex: number; + + point: CGPoint; + + constructor(o: { pageIndex: number; atPoint: CGPoint; fileURL: NSURL; }); + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + initWithPageIndexAtPointFileURL(pageIndex: number, point: CGPoint, url: NSURL): this; +} + +declare class PDFActionResetForm extends PDFAction implements NSCopying { + + static alloc(): PDFActionResetForm; // inherited from NSObject + + static new(): PDFActionResetForm; // inherited from NSObject + + fields: NSArray; + + fieldsIncludedAreCleared: boolean; + + copyWithZone(zone: interop.Pointer | interop.Reference): any; +} + +declare class PDFActionURL extends PDFAction implements NSCopying { + + static alloc(): PDFActionURL; // inherited from NSObject + + static new(): PDFActionURL; // inherited from NSObject + + URL: NSURL; + + constructor(o: { URL: NSURL; }); + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + initWithURL(url: NSURL): this; +} + +declare class PDFAnnotation extends NSObject implements NSCoding, NSCopying { + + static alloc(): PDFAnnotation; // inherited from NSObject + + static lineStyleFromName(name: string): PDFLineStyle; + + static nameForLineStyle(style: PDFLineStyle): string; + + static new(): PDFAnnotation; // inherited from NSObject + + URL: NSURL; + + action: PDFAction; + + alignment: NSTextAlignment; + + allowsToggleToOff: boolean; + + readonly annotationKeyValues: NSDictionary; + + backgroundColor: UIColor; + + border: PDFBorder; + + bounds: CGRect; + + buttonWidgetState: PDFWidgetCellState; + + buttonWidgetStateString: string; + + caption: string; + + choices: NSArray; + + color: UIColor; + + comb: boolean; + + contents: string; + + destination: PDFDestination; + + endLineStyle: PDFLineStyle; + + endPoint: CGPoint; + + fieldName: string; + + font: UIFont; + + fontColor: UIColor; + + readonly hasAppearanceStream: boolean; + + highlighted: boolean; + + iconType: PDFTextAnnotationIconType; + + interiorColor: UIColor; + + readonly isPasswordField: boolean; + + listChoice: boolean; + + markupType: PDFMarkupType; + + maximumLength: number; + + modificationDate: Date; + + multiline: boolean; + + open: boolean; + + page: PDFPage; + + readonly paths: NSArray; + + popup: PDFAnnotation; + + quadrilateralPoints: NSArray; + + radiosInUnison: boolean; + + readOnly: boolean; + + shouldDisplay: boolean; + + shouldPrint: boolean; + + stampName: string; + + startLineStyle: PDFLineStyle; + + startPoint: CGPoint; + + type: string; + + userName: string; + + values: NSArray; + + widgetControlType: PDFWidgetControlType; + + widgetDefaultStringValue: string; + + widgetFieldType: string; + + widgetStringValue: string; + + constructor(o: { bounds: CGRect; forType: string; withProperties: NSDictionary; }); + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + addBezierPath(path: UIBezierPath): void; + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + drawWithBoxInContext(box: PDFDisplayBox, context: any): void; + + encodeWithCoder(coder: NSCoder): void; + + initWithBoundsForTypeWithProperties(bounds: CGRect, annotationType: string, properties: NSDictionary): this; + + initWithCoder(coder: NSCoder): this; + + removeBezierPath(path: UIBezierPath): void; + + removeValueForAnnotationKey(key: string): void; + + setBooleanForAnnotationKey(value: boolean, key: string): boolean; + + setRectForAnnotationKey(value: CGRect, key: string): boolean; + + setValueForAnnotationKey(value: any, key: string): boolean; + + valueForAnnotationKey(key: string): any; +} + +declare var PDFAnnotationHighlightingModeInvert: string; + +declare var PDFAnnotationHighlightingModeNone: string; + +declare var PDFAnnotationHighlightingModeOutline: string; + +declare var PDFAnnotationHighlightingModePush: string; + +declare var PDFAnnotationKeyAction: string; + +declare var PDFAnnotationKeyAdditionalActions: string; + +declare var PDFAnnotationKeyAppearanceDictionary: string; + +declare var PDFAnnotationKeyAppearanceState: string; + +declare var PDFAnnotationKeyBorder: string; + +declare var PDFAnnotationKeyBorderStyle: string; + +declare var PDFAnnotationKeyColor: string; + +declare var PDFAnnotationKeyContents: string; + +declare var PDFAnnotationKeyDate: string; + +declare var PDFAnnotationKeyDefaultAppearance: string; + +declare var PDFAnnotationKeyDestination: string; + +declare var PDFAnnotationKeyFlags: string; + +declare var PDFAnnotationKeyHighlightingMode: string; + +declare var PDFAnnotationKeyIconName: string; + +declare var PDFAnnotationKeyInklist: string; + +declare var PDFAnnotationKeyInteriorColor: string; + +declare var PDFAnnotationKeyLineEndingStyles: string; + +declare var PDFAnnotationKeyLinePoints: string; + +declare var PDFAnnotationKeyName: string; + +declare var PDFAnnotationKeyOpen: string; + +declare var PDFAnnotationKeyPage: string; + +declare var PDFAnnotationKeyParent: string; + +declare var PDFAnnotationKeyPopup: string; + +declare var PDFAnnotationKeyQuadPoints: string; + +declare var PDFAnnotationKeyQuadding: string; + +declare var PDFAnnotationKeyRect: string; + +declare var PDFAnnotationKeySubtype: string; + +declare var PDFAnnotationKeyTextLabel: string; + +declare var PDFAnnotationKeyWidgetAppearanceDictionary: string; + +declare var PDFAnnotationKeyWidgetBackgroundColor: string; + +declare var PDFAnnotationKeyWidgetBorderColor: string; + +declare var PDFAnnotationKeyWidgetCaption: string; + +declare var PDFAnnotationKeyWidgetDefaultValue: string; + +declare var PDFAnnotationKeyWidgetDownCaption: string; + +declare var PDFAnnotationKeyWidgetFieldFlags: string; + +declare var PDFAnnotationKeyWidgetFieldType: string; + +declare var PDFAnnotationKeyWidgetMaxLen: string; + +declare var PDFAnnotationKeyWidgetOptions: string; + +declare var PDFAnnotationKeyWidgetRolloverCaption: string; + +declare var PDFAnnotationKeyWidgetRotation: string; + +declare var PDFAnnotationKeyWidgetTextLabelUI: string; + +declare var PDFAnnotationKeyWidgetValue: string; + +declare var PDFAnnotationLineEndingStyleCircle: string; + +declare var PDFAnnotationLineEndingStyleClosedArrow: string; + +declare var PDFAnnotationLineEndingStyleDiamond: string; + +declare var PDFAnnotationLineEndingStyleNone: string; + +declare var PDFAnnotationLineEndingStyleOpenArrow: string; + +declare var PDFAnnotationLineEndingStyleSquare: string; + +declare var PDFAnnotationSubtypeCircle: string; + +declare var PDFAnnotationSubtypeFreeText: string; + +declare var PDFAnnotationSubtypeHighlight: string; + +declare var PDFAnnotationSubtypeInk: string; + +declare var PDFAnnotationSubtypeLine: string; + +declare var PDFAnnotationSubtypeLink: string; + +declare var PDFAnnotationSubtypePopup: string; + +declare var PDFAnnotationSubtypeSquare: string; + +declare var PDFAnnotationSubtypeStamp: string; + +declare var PDFAnnotationSubtypeStrikeOut: string; + +declare var PDFAnnotationSubtypeText: string; + +declare var PDFAnnotationSubtypeUnderline: string; + +declare var PDFAnnotationSubtypeWidget: string; + +declare var PDFAnnotationTextIconTypeComment: string; + +declare var PDFAnnotationTextIconTypeHelp: string; + +declare var PDFAnnotationTextIconTypeInsert: string; + +declare var PDFAnnotationTextIconTypeKey: string; + +declare var PDFAnnotationTextIconTypeNewParagraph: string; + +declare var PDFAnnotationTextIconTypeNote: string; + +declare var PDFAnnotationTextIconTypeParagraph: string; + +declare var PDFAnnotationWidgetSubtypeButton: string; + +declare var PDFAnnotationWidgetSubtypeChoice: string; + +declare var PDFAnnotationWidgetSubtypeSignature: string; + +declare var PDFAnnotationWidgetSubtypeText: string; + +declare class PDFAppearanceCharacteristics extends NSObject implements NSCopying { + + static alloc(): PDFAppearanceCharacteristics; // inherited from NSObject + + static new(): PDFAppearanceCharacteristics; // inherited from NSObject + + readonly appearanceCharacteristicsKeyValues: NSDictionary; + + backgroundColor: UIColor; + + borderColor: UIColor; + + caption: string; + + controlType: PDFWidgetControlType; + + downCaption: string; + + rolloverCaption: string; + + rotation: number; + + copyWithZone(zone: interop.Pointer | interop.Reference): any; +} + +declare var PDFAppearanceCharacteristicsKeyBackgroundColor: string; + +declare var PDFAppearanceCharacteristicsKeyBorderColor: string; + +declare var PDFAppearanceCharacteristicsKeyCaption: string; + +declare var PDFAppearanceCharacteristicsKeyDownCaption: string; + +declare var PDFAppearanceCharacteristicsKeyRolloverCaption: string; + +declare var PDFAppearanceCharacteristicsKeyRotation: string; + +declare const enum PDFAreaOfInterest { + + kPDFNoArea = 0, + + kPDFPageArea = 1, + + kPDFTextArea = 2, + + kPDFAnnotationArea = 4, + + kPDFLinkArea = 8, + + kPDFControlArea = 16, + + kPDFTextFieldArea = 32, + + kPDFIconArea = 64, + + kPDFPopupArea = 128, + + kPDFImageArea = 256, + + kPDFAnyArea = 9223372036854775807 +} + +declare class PDFBorder extends NSObject implements NSCoding, NSCopying { + + static alloc(): PDFBorder; // inherited from NSObject + + static new(): PDFBorder; // inherited from NSObject + + readonly borderKeyValues: NSDictionary; + + dashPattern: NSArray; + + lineWidth: number; + + style: PDFBorderStyle; + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + drawInRect(rect: CGRect): void; + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} + +declare var PDFBorderKeyDashPattern: string; + +declare var PDFBorderKeyLineWidth: string; + +declare var PDFBorderKeyStyle: string; + +declare const enum PDFBorderStyle { + + kPDFBorderStyleSolid = 0, + + kPDFBorderStyleDashed = 1, + + kPDFBorderStyleBeveled = 2, + + kPDFBorderStyleInset = 3, + + kPDFBorderStyleUnderline = 4 +} + +declare class PDFDestination extends NSObject implements NSCopying { + + static alloc(): PDFDestination; // inherited from NSObject + + static new(): PDFDestination; // inherited from NSObject + + readonly page: PDFPage; + + readonly point: CGPoint; + + zoom: number; + + constructor(o: { page: PDFPage; atPoint: CGPoint; }); + + compare(destination: PDFDestination): NSComparisonResult; + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + initWithPageAtPoint(page: PDFPage, point: CGPoint): this; +} + +declare const enum PDFDisplayBox { + + kPDFDisplayBoxMediaBox = 0, + + kPDFDisplayBoxCropBox = 1, + + kPDFDisplayBoxBleedBox = 2, + + kPDFDisplayBoxTrimBox = 3, + + kPDFDisplayBoxArtBox = 4 +} + +declare const enum PDFDisplayDirection { + + kPDFDisplayDirectionVertical = 0, + + kPDFDisplayDirectionHorizontal = 1 +} + +declare const enum PDFDisplayMode { + + kPDFDisplaySinglePage = 0, + + kPDFDisplaySinglePageContinuous = 1, + + kPDFDisplayTwoUp = 2, + + kPDFDisplayTwoUpContinuous = 3 +} + +declare class PDFDocument extends NSObject implements NSCopying { + + static alloc(): PDFDocument; // inherited from NSObject + + static new(): PDFDocument; // inherited from NSObject + + readonly accessPermissions: PDFAccessPermissions; + + readonly allowsCommenting: boolean; + + readonly allowsContentAccessibility: boolean; + + readonly allowsCopying: boolean; + + readonly allowsDocumentAssembly: boolean; + + readonly allowsDocumentChanges: boolean; + + readonly allowsFormFieldEntry: boolean; + + readonly allowsPrinting: boolean; + + delegate: PDFDocumentDelegate; + + documentAttributes: NSDictionary; + + readonly documentRef: any; + + readonly documentURL: NSURL; + + readonly isEncrypted: boolean; + + readonly isFinding: boolean; + + readonly isLocked: boolean; + + readonly majorVersion: number; + + readonly minorVersion: number; + + outlineRoot: PDFOutline; + + readonly pageClass: typeof NSObject; + + readonly pageCount: number; + + readonly permissionsStatus: PDFDocumentPermissions; + + readonly selectionForEntireDocument: PDFSelection; + + readonly string: string; + + constructor(o: { data: NSData; }); + + constructor(o: { URL: NSURL; }); + + beginFindStringWithOptions(string: string, options: NSStringCompareOptions): void; + + beginFindStringsWithOptions(strings: NSArray | string[], options: NSStringCompareOptions): void; + + cancelFindString(): void; + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + dataRepresentation(): NSData; + + dataRepresentationWithOptions(options: NSDictionary): NSData; + + exchangePageAtIndexWithPageAtIndex(indexA: number, indexB: number): void; + + findStringFromSelectionWithOptions(string: string, selection: PDFSelection, options: NSStringCompareOptions): PDFSelection; + + findStringWithOptions(string: string, options: NSStringCompareOptions): NSArray; + + indexForPage(page: PDFPage): number; + + initWithData(data: NSData): this; + + initWithURL(url: NSURL): this; + + insertPageAtIndex(page: PDFPage, index: number): void; + + outlineItemForSelection(selection: PDFSelection): PDFOutline; + + pageAtIndex(index: number): PDFPage; + + removePageAtIndex(index: number): void; + + selectionFromPageAtCharacterIndexToPageAtCharacterIndex(startPage: PDFPage, startCharacter: number, endPage: PDFPage, endCharacter: number): PDFSelection; + + selectionFromPageAtPointToPageAtPoint(startPage: PDFPage, startPoint: CGPoint, endPage: PDFPage, endPoint: CGPoint): PDFSelection; + + unlockWithPassword(password: string): boolean; + + writeToFile(path: string): boolean; + + writeToFileWithOptions(path: string, options: NSDictionary): boolean; + + writeToURL(url: NSURL): boolean; + + writeToURLWithOptions(url: NSURL, options: NSDictionary): boolean; +} + +declare var PDFDocumentAccessPermissionsOption: string; + +declare var PDFDocumentAuthorAttribute: string; + +declare var PDFDocumentCreationDateAttribute: string; + +declare var PDFDocumentCreatorAttribute: string; + +interface PDFDocumentDelegate extends NSObjectProtocol { + + classForAnnotationType?(annotationType: string): typeof NSObject; + + classForPage?(): typeof NSObject; + + didMatchString?(instance: PDFSelection): void; + + documentDidBeginDocumentFind?(notification: NSNotification): void; + + documentDidBeginPageFind?(notification: NSNotification): void; + + documentDidEndDocumentFind?(notification: NSNotification): void; + + documentDidEndPageFind?(notification: NSNotification): void; + + documentDidFindMatch?(notification: NSNotification): void; + + documentDidUnlock?(notification: NSNotification): void; +} +declare var PDFDocumentDelegate: { + + prototype: PDFDocumentDelegate; +}; + +declare var PDFDocumentDidBeginFindNotification: string; + +declare var PDFDocumentDidBeginPageFindNotification: string; + +declare var PDFDocumentDidBeginPageWriteNotification: string; + +declare var PDFDocumentDidBeginWriteNotification: string; + +declare var PDFDocumentDidEndFindNotification: string; + +declare var PDFDocumentDidEndPageFindNotification: string; + +declare var PDFDocumentDidEndPageWriteNotification: string; + +declare var PDFDocumentDidEndWriteNotification: string; + +declare var PDFDocumentDidFindMatchNotification: string; + +declare var PDFDocumentDidUnlockNotification: string; + +declare var PDFDocumentFoundSelectionKey: string; + +declare var PDFDocumentKeywordsAttribute: string; + +declare var PDFDocumentModificationDateAttribute: string; + +declare var PDFDocumentOwnerPasswordOption: string; + +declare var PDFDocumentPageIndexKey: string; + +declare const enum PDFDocumentPermissions { + + kPDFDocumentPermissionsNone = 0, + + kPDFDocumentPermissionsUser = 1, + + kPDFDocumentPermissionsOwner = 2 +} + +declare var PDFDocumentProducerAttribute: string; + +declare var PDFDocumentSubjectAttribute: string; + +declare var PDFDocumentTitleAttribute: string; + +declare var PDFDocumentUserPasswordOption: string; + +declare const enum PDFInterpolationQuality { + + kPDFInterpolationQualityNone = 0, + + kPDFInterpolationQualityLow = 1, + + kPDFInterpolationQualityHigh = 2 +} + +declare const enum PDFLineStyle { + + kPDFLineStyleNone = 0, + + kPDFLineStyleSquare = 1, + + kPDFLineStyleCircle = 2, + + kPDFLineStyleDiamond = 3, + + kPDFLineStyleOpenArrow = 4, + + kPDFLineStyleClosedArrow = 5 +} + +declare const enum PDFMarkupType { + + kPDFMarkupTypeHighlight = 0, + + kPDFMarkupTypeStrikeOut = 1, + + kPDFMarkupTypeUnderline = 2, + + kPDFMarkupTypeRedact = 3 +} + +declare class PDFOutline extends NSObject { + + static alloc(): PDFOutline; // inherited from NSObject + + static new(): PDFOutline; // inherited from NSObject + + action: PDFAction; + + destination: PDFDestination; + + readonly document: PDFDocument; + + readonly index: number; + + isOpen: boolean; + + label: string; + + readonly numberOfChildren: number; + + readonly parent: PDFOutline; + + childAtIndex(index: number): PDFOutline; + + insertChildAtIndex(child: PDFOutline, index: number): void; + + removeFromParent(): void; +} + +declare class PDFPage extends NSObject implements NSCopying { + + static alloc(): PDFPage; // inherited from NSObject + + static new(): PDFPage; // inherited from NSObject + + readonly annotations: NSArray; + + readonly attributedString: NSAttributedString; + + readonly dataRepresentation: NSData; + + displaysAnnotations: boolean; + + readonly document: PDFDocument; + + readonly label: string; + + readonly numberOfCharacters: number; + + readonly pageRef: any; + + rotation: number; + + readonly string: string; + + constructor(o: { image: UIImage; }); + + addAnnotation(annotation: PDFAnnotation): void; + + annotationAtPoint(point: CGPoint): PDFAnnotation; + + boundsForBox(box: PDFDisplayBox): CGRect; + + characterBoundsAtIndex(index: number): CGRect; + + characterIndexAtPoint(point: CGPoint): number; + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + drawWithBoxToContext(box: PDFDisplayBox, context: any): void; + + initWithImage(image: UIImage): this; + + removeAnnotation(annotation: PDFAnnotation): void; + + selectionForLineAtPoint(point: CGPoint): PDFSelection; + + selectionForRange(range: NSRange): PDFSelection; + + selectionForRect(rect: CGRect): PDFSelection; + + selectionForWordAtPoint(point: CGPoint): PDFSelection; + + selectionFromPointToPoint(startPoint: CGPoint, endPoint: CGPoint): PDFSelection; + + setBoundsForBox(bounds: CGRect, box: PDFDisplayBox): void; + + thumbnailOfSizeForBox(size: CGSize, box: PDFDisplayBox): UIImage; + + transformContextForBox(context: any, box: PDFDisplayBox): void; + + transformForBox(box: PDFDisplayBox): CGAffineTransform; +} + +declare class PDFSelection extends NSObject implements NSCopying { + + static alloc(): PDFSelection; // inherited from NSObject + + static new(): PDFSelection; // inherited from NSObject + + readonly attributedString: NSAttributedString; + + color: UIColor; + + readonly pages: NSArray; + + readonly string: string; + + constructor(o: { document: PDFDocument; }); + + addSelection(selection: PDFSelection): void; + + addSelections(selections: NSArray | PDFSelection[]): void; + + boundsForPage(page: PDFPage): CGRect; + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + drawForPageActive(page: PDFPage, active: boolean): void; + + drawForPageWithBoxActive(page: PDFPage, box: PDFDisplayBox, active: boolean): void; + + extendSelectionAtEnd(succeed: number): void; + + extendSelectionAtStart(precede: number): void; + + extendSelectionForLineBoundaries(): void; + + initWithDocument(document: PDFDocument): this; + + numberOfTextRangesOnPage(page: PDFPage): number; + + rangeAtIndexOnPage(index: number, page: PDFPage): NSRange; + + selectionsByLine(): NSArray; +} + +declare const enum PDFTextAnnotationIconType { + + kPDFTextAnnotationIconComment = 0, + + kPDFTextAnnotationIconKey = 1, + + kPDFTextAnnotationIconNote = 2, + + kPDFTextAnnotationIconHelp = 3, + + kPDFTextAnnotationIconNewParagraph = 4, + + kPDFTextAnnotationIconParagraph = 5, + + kPDFTextAnnotationIconInsert = 6 +} + +declare const enum PDFThumbnailLayoutMode { + + Vertical = 0, + + Horizontal = 1 +} + +declare class PDFThumbnailView extends UIView implements NSCoding { + + static alloc(): PDFThumbnailView; // inherited from NSObject + + static appearance(): PDFThumbnailView; // inherited from UIAppearance + + static appearanceForTraitCollection(trait: UITraitCollection): PDFThumbnailView; // inherited from UIAppearance + + static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): PDFThumbnailView; // inherited from UIAppearance + + static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray | typeof NSObject[]): PDFThumbnailView; // inherited from UIAppearance + + static appearanceWhenContainedIn(ContainerClass: typeof NSObject): PDFThumbnailView; // inherited from UIAppearance + + static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray | typeof NSObject[]): PDFThumbnailView; // inherited from UIAppearance + + static new(): PDFThumbnailView; // inherited from NSObject + + PDFView: PDFView; + + contentInset: UIEdgeInsets; + + layoutMode: PDFThumbnailLayoutMode; + + readonly selectedPages: NSArray; + + thumbnailSize: CGSize; + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} + +declare var PDFThumbnailViewDocumentEditedNotification: string; + +declare class PDFView extends UIView implements UIGestureRecognizerDelegate { + + static alloc(): PDFView; // inherited from NSObject + + static appearance(): PDFView; // inherited from UIAppearance + + static appearanceForTraitCollection(trait: UITraitCollection): PDFView; // inherited from UIAppearance + + static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): PDFView; // inherited from UIAppearance + + static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray | typeof NSObject[]): PDFView; // inherited from UIAppearance + + static appearanceWhenContainedIn(ContainerClass: typeof NSObject): PDFView; // inherited from UIAppearance + + static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray | typeof NSObject[]): PDFView; // inherited from UIAppearance + + static new(): PDFView; // inherited from NSObject + + autoScales: boolean; + + readonly canGoBack: boolean; + + readonly canGoForward: boolean; + + readonly canGoToFirstPage: boolean; + + readonly canGoToLastPage: boolean; + + readonly canGoToNextPage: boolean; + + readonly canGoToPreviousPage: boolean; + + readonly canZoomIn: boolean; + + readonly canZoomOut: boolean; + + readonly currentDestination: PDFDestination; + + readonly currentPage: PDFPage; + + currentSelection: PDFSelection; + + delegate: PDFViewDelegate; + + displayBox: PDFDisplayBox; + + displayDirection: PDFDisplayDirection; + + displayMode: PDFDisplayMode; + + displaysAsBook: boolean; + + displaysPageBreaks: boolean; + + displaysRTL: boolean; + + document: PDFDocument; + + readonly documentView: UIView; + + enableDataDetectors: boolean; + + highlightedSelections: NSArray; + + interpolationQuality: PDFInterpolationQuality; + + readonly isUsingPageViewController: boolean; + + maxScaleFactor: number; + + minScaleFactor: number; + + pageBreakMargins: UIEdgeInsets; + + pageShadowsEnabled: boolean; + + scaleFactor: number; + + readonly scaleFactorForSizeToFit: number; + + readonly visiblePages: NSArray; + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + readonly hash: number; // inherited from NSObjectProtocol + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + readonly // inherited from NSObjectProtocol + + annotationsChangedOnPage(page: PDFPage): void; + + areaOfInterestForMouse(event: _UIEvent): PDFAreaOfInterest; + + areaOfInterestForPoint(cursorLocation: CGPoint): PDFAreaOfInterest; + + class(): typeof NSObject; + + clearSelection(): void; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + convertPointFromPage(point: CGPoint, page: PDFPage): CGPoint; + + convertPointToPage(point: CGPoint, page: PDFPage): CGPoint; + + convertRectFromPage(rect: CGRect, page: PDFPage): CGRect; + + convertRectToPage(rect: CGRect, page: PDFPage): CGRect; + + copy(): void; + + drawPagePostToContext(page: PDFPage, context: any): void; + + drawPageToContext(page: PDFPage, context: any): void; + + gestureRecognizerShouldBeRequiredToFailByGestureRecognizer(gestureRecognizer: UIGestureRecognizer, otherGestureRecognizer: UIGestureRecognizer): boolean; + + gestureRecognizerShouldBegin(gestureRecognizer: UIGestureRecognizer): boolean; + + gestureRecognizerShouldReceiveEvent(gestureRecognizer: UIGestureRecognizer, event: _UIEvent): boolean; + + gestureRecognizerShouldReceivePress(gestureRecognizer: UIGestureRecognizer, press: UIPress): boolean; + + gestureRecognizerShouldReceiveTouch(gestureRecognizer: UIGestureRecognizer, touch: UITouch): boolean; + + gestureRecognizerShouldRecognizeSimultaneouslyWithGestureRecognizer(gestureRecognizer: UIGestureRecognizer, otherGestureRecognizer: UIGestureRecognizer): boolean; + + gestureRecognizerShouldRequireFailureOfGestureRecognizer(gestureRecognizer: UIGestureRecognizer, otherGestureRecognizer: UIGestureRecognizer): boolean; + + goBack(sender: any): void; + + goForward(sender: any): void; + + goToDestination(destination: PDFDestination): void; + + goToFirstPage(sender: any): void; + + goToLastPage(sender: any): void; + + goToNextPage(sender: any): void; + + goToPage(page: PDFPage): void; + + goToPreviousPage(sender: any): void; + + goToRectOnPage(rect: CGRect, page: PDFPage): void; + + goToSelection(selection: PDFSelection): void; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + layoutDocumentView(): void; + + pageForPointNearest(point: CGPoint, nearest: boolean): PDFPage; + + performAction(action: PDFAction): void; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + rowSizeForPage(page: PDFPage): CGSize; + + scrollSelectionToVisible(sender: any): void; + + self(): this; + + setCurrentSelectionAnimate(selection: PDFSelection, animate: boolean): void; + + usePageViewControllerWithViewOptions(enable: boolean, viewOptions: NSDictionary): void; + + zoomIn(sender: any): void; + + zoomOut(sender: any): void; +} + +declare var PDFViewAnnotationHitNotification: string; + +declare var PDFViewAnnotationWillHitNotification: string; + +declare var PDFViewChangedHistoryNotification: string; + +declare var PDFViewCopyPermissionNotification: string; + +interface PDFViewDelegate extends NSObjectProtocol { + + PDFViewOpenPDFForRemoteGoToAction?(sender: PDFView, action: PDFActionRemoteGoTo): void; + + PDFViewParentViewController?(): UIViewController; + + PDFViewPerformFind?(sender: PDFView): void; + + PDFViewPerformGoToPage?(sender: PDFView): void; + + PDFViewWillClickOnLinkWithURL?(sender: PDFView, url: NSURL): void; +} +declare var PDFViewDelegate: { + + prototype: PDFViewDelegate; +}; + +declare var PDFViewDisplayBoxChangedNotification: string; + +declare var PDFViewDisplayModeChangedNotification: string; + +declare var PDFViewDocumentChangedNotification: string; + +declare var PDFViewPageChangedNotification: string; + +declare var PDFViewPrintPermissionNotification: string; + +declare var PDFViewScaleChangedNotification: string; + +declare var PDFViewSelectionChangedNotification: string; + +declare var PDFViewVisiblePagesChangedNotification: string; + +declare const enum PDFWidgetCellState { + + kPDFWidgetMixedState = -1, + + kPDFWidgetOffState = 0, + + kPDFWidgetOnState = 1 +} + +declare const enum PDFWidgetControlType { + + kPDFWidgetUnknownControl = -1, + + kPDFWidgetPushButtonControl = 0, + + kPDFWidgetRadioButtonControl = 1, + + kPDFWidgetCheckBoxControl = 2 +} + +declare var kPDFDestinationUnspecifiedValue: number; diff --git a/packages/types-minimal/src/lib/ios/objc-x86_64/objc!Speech.d.ts b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!Speech.d.ts new file mode 100644 index 000000000..520872fbd --- /dev/null +++ b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!Speech.d.ts @@ -0,0 +1,314 @@ + +declare class SFAcousticFeature extends NSObject implements NSCopying, NSSecureCoding { + + static alloc(): SFAcousticFeature; // inherited from NSObject + + static new(): SFAcousticFeature; // inherited from NSObject + + readonly acousticFeatureValuePerFrame: NSArray; + + readonly frameDuration: number; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} + +declare class SFSpeechAudioBufferRecognitionRequest extends SFSpeechRecognitionRequest { + + static alloc(): SFSpeechAudioBufferRecognitionRequest; // inherited from NSObject + + static new(): SFSpeechAudioBufferRecognitionRequest; // inherited from NSObject + + readonly nativeAudioFormat: AVAudioFormat; + + appendAudioPCMBuffer(audioPCMBuffer: AVAudioPCMBuffer): void; + + appendAudioSampleBuffer(sampleBuffer: any): void; + + endAudio(): void; +} + +declare class SFSpeechRecognitionMetadata extends NSObject implements NSCopying, NSSecureCoding { + + static alloc(): SFSpeechRecognitionMetadata; // inherited from NSObject + + static new(): SFSpeechRecognitionMetadata; // inherited from NSObject + + readonly averagePauseDuration: number; + + readonly speakingRate: number; + + readonly speechDuration: number; + + readonly speechStartTimestamp: number; + + readonly voiceAnalytics: SFVoiceAnalytics; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} + +declare class SFSpeechRecognitionRequest extends NSObject { + + static alloc(): SFSpeechRecognitionRequest; // inherited from NSObject + + static new(): SFSpeechRecognitionRequest; // inherited from NSObject + + contextualStrings: NSArray; + + interactionIdentifier: string; + + requiresOnDeviceRecognition: boolean; + + shouldReportPartialResults: boolean; + + taskHint: SFSpeechRecognitionTaskHint; +} + +declare class SFSpeechRecognitionResult extends NSObject implements NSCopying, NSSecureCoding { + + static alloc(): SFSpeechRecognitionResult; // inherited from NSObject + + static new(): SFSpeechRecognitionResult; // inherited from NSObject + + readonly bestTranscription: SFTranscription; + + readonly final: boolean; + + readonly speechRecognitionMetadata: SFSpeechRecognitionMetadata; + + readonly transcriptions: NSArray; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} + +declare class SFSpeechRecognitionTask extends NSObject { + + static alloc(): SFSpeechRecognitionTask; // inherited from NSObject + + static new(): SFSpeechRecognitionTask; // inherited from NSObject + + readonly cancelled: boolean; + + readonly error: NSError; + + readonly finishing: boolean; + + readonly state: SFSpeechRecognitionTaskState; + + cancel(): void; + + finish(): void; +} + +interface SFSpeechRecognitionTaskDelegate extends NSObjectProtocol { + + speechRecognitionDidDetectSpeech?(task: SFSpeechRecognitionTask): void; + + speechRecognitionTaskDidFinishRecognition?(task: SFSpeechRecognitionTask, recognitionResult: SFSpeechRecognitionResult): void; + + speechRecognitionTaskDidFinishSuccessfully?(task: SFSpeechRecognitionTask, successfully: boolean): void; + + speechRecognitionTaskDidHypothesizeTranscription?(task: SFSpeechRecognitionTask, transcription: SFTranscription): void; + + speechRecognitionTaskFinishedReadingAudio?(task: SFSpeechRecognitionTask): void; + + speechRecognitionTaskWasCancelled?(task: SFSpeechRecognitionTask): void; +} +declare var SFSpeechRecognitionTaskDelegate: { + + prototype: SFSpeechRecognitionTaskDelegate; +}; + +declare const enum SFSpeechRecognitionTaskHint { + + Unspecified = 0, + + Dictation = 1, + + Search = 2, + + Confirmation = 3 +} + +declare const enum SFSpeechRecognitionTaskState { + + Starting = 0, + + Running = 1, + + Finishing = 2, + + Canceling = 3, + + Completed = 4 +} + +declare class SFSpeechRecognizer extends NSObject { + + static alloc(): SFSpeechRecognizer; // inherited from NSObject + + static authorizationStatus(): SFSpeechRecognizerAuthorizationStatus; + + static new(): SFSpeechRecognizer; // inherited from NSObject + + static requestAuthorization(handler: (p1: SFSpeechRecognizerAuthorizationStatus) => void): void; + + static supportedLocales(): NSSet; + + readonly available: boolean; + + defaultTaskHint: SFSpeechRecognitionTaskHint; + + delegate: SFSpeechRecognizerDelegate; + + readonly locale: NSLocale; + + queue: NSOperationQueue; + + supportsOnDeviceRecognition: boolean; + + constructor(o: { locale: NSLocale; }); + + initWithLocale(locale: NSLocale): this; + + recognitionTaskWithRequestDelegate(request: SFSpeechRecognitionRequest, delegate: SFSpeechRecognitionTaskDelegate): SFSpeechRecognitionTask; + + recognitionTaskWithRequestResultHandler(request: SFSpeechRecognitionRequest, resultHandler: (p1: SFSpeechRecognitionResult, p2: NSError) => void): SFSpeechRecognitionTask; +} + +declare const enum SFSpeechRecognizerAuthorizationStatus { + + NotDetermined = 0, + + Denied = 1, + + Restricted = 2, + + Authorized = 3 +} + +interface SFSpeechRecognizerDelegate extends NSObjectProtocol { + + speechRecognizerAvailabilityDidChange?(speechRecognizer: SFSpeechRecognizer, available: boolean): void; +} +declare var SFSpeechRecognizerDelegate: { + + prototype: SFSpeechRecognizerDelegate; +}; + +declare class SFSpeechURLRecognitionRequest extends SFSpeechRecognitionRequest { + + static alloc(): SFSpeechURLRecognitionRequest; // inherited from NSObject + + static new(): SFSpeechURLRecognitionRequest; // inherited from NSObject + + readonly URL: NSURL; + + constructor(o: { URL: NSURL; }); + + initWithURL(URL: NSURL): this; +} + +declare class SFTranscription extends NSObject implements NSCopying, NSSecureCoding { + + static alloc(): SFTranscription; // inherited from NSObject + + static new(): SFTranscription; // inherited from NSObject + + readonly averagePauseDuration: number; + + readonly formattedString: string; + + readonly segments: NSArray; + + readonly speakingRate: number; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} + +declare class SFTranscriptionSegment extends NSObject implements NSCopying, NSSecureCoding { + + static alloc(): SFTranscriptionSegment; // inherited from NSObject + + static new(): SFTranscriptionSegment; // inherited from NSObject + + readonly alternativeSubstrings: NSArray; + + readonly confidence: number; + + readonly duration: number; + + readonly substring: string; + + readonly substringRange: NSRange; + + readonly timestamp: number; + + readonly voiceAnalytics: SFVoiceAnalytics; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} + +declare class SFVoiceAnalytics extends NSObject implements NSCopying, NSSecureCoding { + + static alloc(): SFVoiceAnalytics; // inherited from NSObject + + static new(): SFVoiceAnalytics; // inherited from NSObject + + readonly jitter: SFAcousticFeature; + + readonly pitch: SFAcousticFeature; + + readonly shimmer: SFAcousticFeature; + + readonly voicing: SFAcousticFeature; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} diff --git a/packages/types-minimal/src/lib/ios/objc-x86_64/objc!Vision.d.ts b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!Vision.d.ts new file mode 100644 index 000000000..941498f11 --- /dev/null +++ b/packages/types-minimal/src/lib/ios/objc-x86_64/objc!Vision.d.ts @@ -0,0 +1,1875 @@ + +declare var VNAnimalIdentifierCat: string; + +declare var VNAnimalIdentifierDog: string; + +declare class VNBarcodeObservation extends VNRectangleObservation { + + static alloc(): VNBarcodeObservation; // inherited from NSObject + + static new(): VNBarcodeObservation; // inherited from NSObject + + static observationWithBoundingBox(boundingBox: CGRect): VNBarcodeObservation; // inherited from VNDetectedObjectObservation + + static observationWithRequestRevisionBoundingBox(requestRevision: number, boundingBox: CGRect): VNBarcodeObservation; // inherited from VNDetectedObjectObservation + + static rectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision: number, topLeft: CGPoint, bottomLeft: CGPoint, bottomRight: CGPoint, topRight: CGPoint): VNBarcodeObservation; // inherited from VNRectangleObservation + + readonly barcodeDescriptor: CIBarcodeDescriptor; + + readonly payloadStringValue: string; + + readonly symbology: string; +} + +declare var VNBarcodeSymbologyAztec: string; + +declare var VNBarcodeSymbologyCodabar: string; + +declare var VNBarcodeSymbologyCode128: string; + +declare var VNBarcodeSymbologyCode39: string; + +declare var VNBarcodeSymbologyCode39Checksum: string; + +declare var VNBarcodeSymbologyCode39FullASCII: string; + +declare var VNBarcodeSymbologyCode39FullASCIIChecksum: string; + +declare var VNBarcodeSymbologyCode93: string; + +declare var VNBarcodeSymbologyCode93i: string; + +declare var VNBarcodeSymbologyDataMatrix: string; + +declare var VNBarcodeSymbologyEAN13: string; + +declare var VNBarcodeSymbologyEAN8: string; + +declare var VNBarcodeSymbologyGS1DataBar: string; + +declare var VNBarcodeSymbologyGS1DataBarExpanded: string; + +declare var VNBarcodeSymbologyGS1DataBarLimited: string; + +declare var VNBarcodeSymbologyI2of5: string; + +declare var VNBarcodeSymbologyI2of5Checksum: string; + +declare var VNBarcodeSymbologyITF14: string; + +declare var VNBarcodeSymbologyMicroPDF417: string; + +declare var VNBarcodeSymbologyMicroQR: string; + +declare var VNBarcodeSymbologyPDF417: string; + +declare var VNBarcodeSymbologyQR: string; + +declare var VNBarcodeSymbologyUPCE: string; + +declare var VNBodyLandmarkKeyLeftAnkle: string; + +declare var VNBodyLandmarkKeyLeftEar: string; + +declare var VNBodyLandmarkKeyLeftElbow: string; + +declare var VNBodyLandmarkKeyLeftEye: string; + +declare var VNBodyLandmarkKeyLeftHip: string; + +declare var VNBodyLandmarkKeyLeftKnee: string; + +declare var VNBodyLandmarkKeyLeftShoulder: string; + +declare var VNBodyLandmarkKeyLeftWrist: string; + +declare var VNBodyLandmarkKeyNeck: string; + +declare var VNBodyLandmarkKeyNose: string; + +declare var VNBodyLandmarkKeyRightAnkle: string; + +declare var VNBodyLandmarkKeyRightEar: string; + +declare var VNBodyLandmarkKeyRightElbow: string; + +declare var VNBodyLandmarkKeyRightEye: string; + +declare var VNBodyLandmarkKeyRightHip: string; + +declare var VNBodyLandmarkKeyRightKnee: string; + +declare var VNBodyLandmarkKeyRightShoulder: string; + +declare var VNBodyLandmarkKeyRightWrist: string; + +declare var VNBodyLandmarkKeyRoot: string; + +declare var VNBodyLandmarkRegionKeyFace: string; + +declare var VNBodyLandmarkRegionKeyLeftArm: string; + +declare var VNBodyLandmarkRegionKeyLeftLeg: string; + +declare var VNBodyLandmarkRegionKeyRightArm: string; + +declare var VNBodyLandmarkRegionKeyRightLeg: string; + +declare var VNBodyLandmarkRegionKeyTorso: string; + +declare const enum VNChirality { + + Unknown = 0, + + Left = -1, + + Right = 1 +} + +declare class VNCircle extends NSObject implements NSCopying, NSSecureCoding { + + static alloc(): VNCircle; // inherited from NSObject + + static new(): VNCircle; // inherited from NSObject + + readonly center: VNPoint; + + readonly diameter: number; + + readonly radius: number; + + static readonly zeroCircle: VNCircle; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { center: VNPoint; diameter: number; }); + + constructor(o: { center: VNPoint; radius: number; }); + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + containsPoint(point: VNPoint): boolean; + + containsPointInCircumferentialRingOfWidth(point: VNPoint, ringWidth: number): boolean; + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + encodeWithCoder(coder: NSCoder): void; + + initWithCenterDiameter(center: VNPoint, diameter: number): this; + + initWithCenterRadius(center: VNPoint, radius: number): this; + + initWithCoder(coder: NSCoder): this; +} + +declare class VNClassificationObservation extends VNObservation { + + static alloc(): VNClassificationObservation; // inherited from NSObject + + static new(): VNClassificationObservation; // inherited from NSObject + + readonly hasPrecisionRecallCurve: boolean; + + readonly identifier: string; + + hasMinimumPrecisionForRecall(minimumPrecision: number, recall: number): boolean; + + hasMinimumRecallForPrecision(minimumRecall: number, precision: number): boolean; +} + +declare class VNClassifyImageRequest extends VNImageBasedRequest { + + static alloc(): VNClassifyImageRequest; // inherited from NSObject + + static knownClassificationsForRevisionError(requestRevision: number): NSArray; + + static new(): VNClassifyImageRequest; // inherited from NSObject + + supportedIdentifiersAndReturnError(): NSArray; +} + +declare var VNClassifyImageRequestRevision1: number; + +declare class VNContour extends NSObject implements NSCopying, VNRequestRevisionProviding { + + static alloc(): VNContour; // inherited from NSObject + + static new(): VNContour; // inherited from NSObject + + readonly aspectRatio: number; + + readonly childContourCount: number; + + readonly childContours: NSArray; + + readonly indexPath: NSIndexPath; + + readonly normalizedPath: any; + + readonly normalizedPoints: interop.Pointer | interop.Reference>; + + readonly pointCount: number; + + readonly requestRevision: number; // inherited from VNRequestRevisionProviding + + childContourAtIndexError(childContourIndex: number): VNContour; + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + polygonApproximationWithEpsilonError(epsilon: number): VNContour; +} + +declare class VNContoursObservation extends VNObservation { + + static alloc(): VNContoursObservation; // inherited from NSObject + + static new(): VNContoursObservation; // inherited from NSObject + + readonly contourCount: number; + + readonly normalizedPath: any; + + readonly topLevelContourCount: number; + + readonly topLevelContours: NSArray; + + contourAtIndexError(contourIndex: number): VNContour; + + contourAtIndexPathError(indexPath: NSIndexPath): VNContour; +} + +declare class VNCoreMLFeatureValueObservation extends VNObservation { + + static alloc(): VNCoreMLFeatureValueObservation; // inherited from NSObject + + static new(): VNCoreMLFeatureValueObservation; // inherited from NSObject + + readonly featureName: string; + + readonly featureValue: MLFeatureValue; +} + +declare class VNCoreMLModel extends NSObject { + + static alloc(): VNCoreMLModel; // inherited from NSObject + + static modelForMLModelError(model: MLModel): VNCoreMLModel; + + static new(): VNCoreMLModel; // inherited from NSObject + + featureProvider: MLFeatureProvider; + + inputImageFeatureName: string; +} + +declare class VNCoreMLRequest extends VNImageBasedRequest { + + static alloc(): VNCoreMLRequest; // inherited from NSObject + + static new(): VNCoreMLRequest; // inherited from NSObject + + imageCropAndScaleOption: VNImageCropAndScaleOption; + + readonly model: VNCoreMLModel; + + constructor(o: { model: VNCoreMLModel; }); + + constructor(o: { model: VNCoreMLModel; completionHandler: (p1: VNRequest, p2: NSError) => void; }); + + initWithModel(model: VNCoreMLModel): this; + + initWithModelCompletionHandler(model: VNCoreMLModel, completionHandler: (p1: VNRequest, p2: NSError) => void): this; +} + +declare var VNCoreMLRequestRevision1: number; + +declare class VNDetectBarcodesRequest extends VNImageBasedRequest { + + static alloc(): VNDetectBarcodesRequest; // inherited from NSObject + + static new(): VNDetectBarcodesRequest; // inherited from NSObject + + symbologies: NSArray; + + static readonly supportedSymbologies: NSArray; + + supportedSymbologiesAndReturnError(): NSArray; +} + +declare var VNDetectBarcodesRequestRevision1: number; + +declare var VNDetectBarcodesRequestRevision2: number; + +declare var VNDetectContourRequestRevision1: number; + +declare class VNDetectContoursRequest extends VNImageBasedRequest { + + static alloc(): VNDetectContoursRequest; // inherited from NSObject + + static new(): VNDetectContoursRequest; // inherited from NSObject + + contrastAdjustment: number; + + contrastPivot: number; + + detectDarkOnLight: boolean; + + detectsDarkOnLight: boolean; + + maximumImageDimension: number; +} + +declare class VNDetectDocumentSegmentationRequest extends VNImageBasedRequest { + + static alloc(): VNDetectDocumentSegmentationRequest; // inherited from NSObject + + static new(): VNDetectDocumentSegmentationRequest; // inherited from NSObject +} + +declare var VNDetectDocumentSegmentationRequestRevision1: number; + +declare class VNDetectFaceCaptureQualityRequest extends VNImageBasedRequest implements VNFaceObservationAccepting { + + static alloc(): VNDetectFaceCaptureQualityRequest; // inherited from NSObject + + static new(): VNDetectFaceCaptureQualityRequest; // inherited from NSObject + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + readonly hash: number; // inherited from NSObjectProtocol + + inputFaceObservations: NSArray; // inherited from VNFaceObservationAccepting + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + readonly // inherited from NSObjectProtocol + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; +} + +declare var VNDetectFaceCaptureQualityRequestRevision1: number; + +declare var VNDetectFaceCaptureQualityRequestRevision2: number; + +declare class VNDetectFaceLandmarksRequest extends VNImageBasedRequest implements VNFaceObservationAccepting { + + static alloc(): VNDetectFaceLandmarksRequest; // inherited from NSObject + + static new(): VNDetectFaceLandmarksRequest; // inherited from NSObject + + static revisionSupportsConstellation(requestRevision: number, constellation: VNRequestFaceLandmarksConstellation): boolean; + + constellation: VNRequestFaceLandmarksConstellation; + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + readonly hash: number; // inherited from NSObjectProtocol + + inputFaceObservations: NSArray; // inherited from VNFaceObservationAccepting + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + readonly // inherited from NSObjectProtocol + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; +} + +declare var VNDetectFaceLandmarksRequestRevision1: number; + +declare var VNDetectFaceLandmarksRequestRevision2: number; + +declare var VNDetectFaceLandmarksRequestRevision3: number; + +declare class VNDetectFaceRectanglesRequest extends VNImageBasedRequest { + + static alloc(): VNDetectFaceRectanglesRequest; // inherited from NSObject + + static new(): VNDetectFaceRectanglesRequest; // inherited from NSObject +} + +declare var VNDetectFaceRectanglesRequestRevision1: number; + +declare var VNDetectFaceRectanglesRequestRevision2: number; + +declare var VNDetectFaceRectanglesRequestRevision3: number; + +declare class VNDetectHorizonRequest extends VNImageBasedRequest { + + static alloc(): VNDetectHorizonRequest; // inherited from NSObject + + static new(): VNDetectHorizonRequest; // inherited from NSObject +} + +declare var VNDetectHorizonRequestRevision1: number; + +declare class VNDetectHumanBodyPoseRequest extends VNImageBasedRequest { + + static alloc(): VNDetectHumanBodyPoseRequest; // inherited from NSObject + + static new(): VNDetectHumanBodyPoseRequest; // inherited from NSObject + + static supportedJointNamesForRevisionError(revision: number): NSArray; + + static supportedJointsGroupNamesForRevisionError(revision: number): NSArray; +} + +declare var VNDetectHumanBodyPoseRequestRevision1: number; + +declare class VNDetectHumanHandPoseRequest extends VNImageBasedRequest { + + static alloc(): VNDetectHumanHandPoseRequest; // inherited from NSObject + + static new(): VNDetectHumanHandPoseRequest; // inherited from NSObject + + static supportedJointNamesForRevisionError(revision: number): NSArray; + + static supportedJointsGroupNamesForRevisionError(revision: number): NSArray; + + maximumHandCount: number; +} + +declare var VNDetectHumanHandPoseRequestRevision1: number; + +declare class VNDetectHumanRectanglesRequest extends VNImageBasedRequest { + + static alloc(): VNDetectHumanRectanglesRequest; // inherited from NSObject + + static new(): VNDetectHumanRectanglesRequest; // inherited from NSObject + + upperBodyOnly: boolean; +} + +declare var VNDetectHumanRectanglesRequestRevision1: number; + +declare var VNDetectHumanRectanglesRequestRevision2: number; + +declare class VNDetectRectanglesRequest extends VNImageBasedRequest { + + static alloc(): VNDetectRectanglesRequest; // inherited from NSObject + + static new(): VNDetectRectanglesRequest; // inherited from NSObject + + maximumAspectRatio: number; + + maximumObservations: number; + + minimumAspectRatio: number; + + minimumConfidence: number; + + minimumSize: number; + + quadratureTolerance: number; +} + +declare var VNDetectRectanglesRequestRevision1: number; + +declare class VNDetectTextRectanglesRequest extends VNImageBasedRequest { + + static alloc(): VNDetectTextRectanglesRequest; // inherited from NSObject + + static new(): VNDetectTextRectanglesRequest; // inherited from NSObject + + reportCharacterBoxes: boolean; +} + +declare var VNDetectTextRectanglesRequestRevision1: number; + +declare class VNDetectTrajectoriesRequest extends VNStatefulRequest { + + static alloc(): VNDetectTrajectoriesRequest; // inherited from NSObject + + static new(): VNDetectTrajectoriesRequest; // inherited from NSObject + + maximumObjectSize: number; + + minimumObjectSize: number; + + objectMaximumNormalizedRadius: number; + + objectMinimumNormalizedRadius: number; + + targetFrameTime: CMTime; + + readonly trajectoryLength: number; + + constructor(o: { frameAnalysisSpacing: CMTime; trajectoryLength: number; completionHandler: (p1: VNRequest, p2: NSError) => void; }); + + initWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler(frameAnalysisSpacing: CMTime, trajectoryLength: number, completionHandler: (p1: VNRequest, p2: NSError) => void): this; +} + +declare var VNDetectTrajectoriesRequestRevision1: number; + +declare class VNDetectedObjectObservation extends VNObservation { + + static alloc(): VNDetectedObjectObservation; // inherited from NSObject + + static new(): VNDetectedObjectObservation; // inherited from NSObject + + static observationWithBoundingBox(boundingBox: CGRect): VNDetectedObjectObservation; + + static observationWithRequestRevisionBoundingBox(requestRevision: number, boundingBox: CGRect): VNDetectedObjectObservation; + + readonly boundingBox: CGRect; + + readonly globalSegmentationMask: VNPixelBufferObservation; +} + +declare class VNDetectedPoint extends VNPoint { + + static alloc(): VNDetectedPoint; // inherited from NSObject + + static new(): VNDetectedPoint; // inherited from NSObject + + readonly confidence: number; +} + +declare const enum VNElementType { + + Unknown = 0, + + Float = 1, + + Double = 2 +} + +declare function VNElementTypeSize(elementType: VNElementType): number; + +declare const enum VNErrorCode { + + OK = 0, + + RequestCancelled = 1, + + InvalidFormat = 2, + + OperationFailed = 3, + + OutOfBoundsError = 4, + + InvalidOption = 5, + + IOError = 6, + + MissingOption = 7, + + NotImplemented = 8, + + InternalError = 9, + + OutOfMemory = 10, + + UnknownError = 11, + + InvalidOperation = 12, + + InvalidImage = 13, + + InvalidArgument = 14, + + InvalidModel = 15, + + UnsupportedRevision = 16, + + DataUnavailable = 17, + + TimeStampNotFound = 18, + + UnsupportedRequest = 19 +} + +declare var VNErrorDomain: string; + +declare class VNFaceLandmarkRegion extends NSObject implements NSCopying, NSSecureCoding, VNRequestRevisionProviding { + + static alloc(): VNFaceLandmarkRegion; // inherited from NSObject + + static new(): VNFaceLandmarkRegion; // inherited from NSObject + + readonly pointCount: number; + + readonly requestRevision: number; // inherited from VNRequestRevisionProviding + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} + +declare class VNFaceLandmarkRegion2D extends VNFaceLandmarkRegion { + + static alloc(): VNFaceLandmarkRegion2D; // inherited from NSObject + + static new(): VNFaceLandmarkRegion2D; // inherited from NSObject + + readonly normalizedPoints: interop.Pointer | interop.Reference; + + readonly precisionEstimatesPerPoint: NSArray; + + pointsInImageOfSize(imageSize: CGSize): interop.Pointer | interop.Reference; +} + +declare class VNFaceLandmarks extends NSObject implements NSCopying, NSSecureCoding, VNRequestRevisionProviding { + + static alloc(): VNFaceLandmarks; // inherited from NSObject + + static new(): VNFaceLandmarks; // inherited from NSObject + + readonly confidence: number; + + readonly requestRevision: number; // inherited from VNRequestRevisionProviding + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} + +declare class VNFaceLandmarks2D extends VNFaceLandmarks { + + static alloc(): VNFaceLandmarks2D; // inherited from NSObject + + static new(): VNFaceLandmarks2D; // inherited from NSObject + + readonly allPoints: VNFaceLandmarkRegion2D; + + readonly faceContour: VNFaceLandmarkRegion2D; + + readonly innerLips: VNFaceLandmarkRegion2D; + + readonly leftEye: VNFaceLandmarkRegion2D; + + readonly leftEyebrow: VNFaceLandmarkRegion2D; + + readonly leftPupil: VNFaceLandmarkRegion2D; + + readonly medianLine: VNFaceLandmarkRegion2D; + + readonly nose: VNFaceLandmarkRegion2D; + + readonly noseCrest: VNFaceLandmarkRegion2D; + + readonly outerLips: VNFaceLandmarkRegion2D; + + readonly rightEye: VNFaceLandmarkRegion2D; + + readonly rightEyebrow: VNFaceLandmarkRegion2D; + + readonly rightPupil: VNFaceLandmarkRegion2D; +} + +declare class VNFaceObservation extends VNDetectedObjectObservation { + + static alloc(): VNFaceObservation; // inherited from NSObject + + static faceObservationWithRequestRevisionBoundingBoxRollYaw(requestRevision: number, boundingBox: CGRect, roll: number, yaw: number): VNFaceObservation; + + static faceObservationWithRequestRevisionBoundingBoxRollYawPitch(requestRevision: number, boundingBox: CGRect, roll: number, yaw: number, pitch: number): VNFaceObservation; + + static new(): VNFaceObservation; // inherited from NSObject + + static observationWithBoundingBox(boundingBox: CGRect): VNFaceObservation; // inherited from VNDetectedObjectObservation + + static observationWithRequestRevisionBoundingBox(requestRevision: number, boundingBox: CGRect): VNFaceObservation; // inherited from VNDetectedObjectObservation + + readonly faceCaptureQuality: number; + + readonly landmarks: VNFaceLandmarks2D; + + readonly pitch: number; + + readonly roll: number; + + readonly yaw: number; +} + +interface VNFaceObservationAccepting extends NSObjectProtocol { + + inputFaceObservations: NSArray; +} +declare var VNFaceObservationAccepting: { + + prototype: VNFaceObservationAccepting; +}; + +declare class VNFeaturePrintObservation extends VNObservation { + + static alloc(): VNFeaturePrintObservation; // inherited from NSObject + + static new(): VNFeaturePrintObservation; // inherited from NSObject + + readonly data: NSData; + + readonly elementCount: number; + + readonly elementType: VNElementType; + + computeDistanceToFeaturePrintObservationError(outDistance: interop.Pointer | interop.Reference, featurePrint: VNFeaturePrintObservation): boolean; +} + +declare class VNGenerateAttentionBasedSaliencyImageRequest extends VNImageBasedRequest { + + static alloc(): VNGenerateAttentionBasedSaliencyImageRequest; // inherited from NSObject + + static new(): VNGenerateAttentionBasedSaliencyImageRequest; // inherited from NSObject +} + +declare var VNGenerateAttentionBasedSaliencyImageRequestRevision1: number; + +declare class VNGenerateImageFeaturePrintRequest extends VNImageBasedRequest { + + static alloc(): VNGenerateImageFeaturePrintRequest; // inherited from NSObject + + static new(): VNGenerateImageFeaturePrintRequest; // inherited from NSObject + + imageCropAndScaleOption: VNImageCropAndScaleOption; +} + +declare var VNGenerateImageFeaturePrintRequestRevision1: number; + +declare class VNGenerateObjectnessBasedSaliencyImageRequest extends VNImageBasedRequest { + + static alloc(): VNGenerateObjectnessBasedSaliencyImageRequest; // inherited from NSObject + + static new(): VNGenerateObjectnessBasedSaliencyImageRequest; // inherited from NSObject +} + +declare var VNGenerateObjectnessBasedSaliencyImageRequestRevision1: number; + +declare class VNGenerateOpticalFlowRequest extends VNTargetedImageRequest { + + static alloc(): VNGenerateOpticalFlowRequest; // inherited from NSObject + + static new(): VNGenerateOpticalFlowRequest; // inherited from NSObject + + computationAccuracy: VNGenerateOpticalFlowRequestComputationAccuracy; + + outputPixelFormat: number; +} + +declare const enum VNGenerateOpticalFlowRequestComputationAccuracy { + + Low = 0, + + Medium = 1, + + High = 2, + + VeryHigh = 3 +} + +declare var VNGenerateOpticalFlowRequestRevision1: number; + +declare class VNGeneratePersonSegmentationRequest extends VNStatefulRequest { + + static alloc(): VNGeneratePersonSegmentationRequest; // inherited from NSObject + + static new(): VNGeneratePersonSegmentationRequest; // inherited from NSObject + + outputPixelFormat: number; + + qualityLevel: VNGeneratePersonSegmentationRequestQualityLevel; +} + +declare const enum VNGeneratePersonSegmentationRequestQualityLevel { + + Accurate = 0, + + Balanced = 1, + + Fast = 2 +} + +declare var VNGeneratePersonSegmentationRequestRevision1: number; + +declare class VNGeometryUtils extends NSObject { + + static alloc(): VNGeometryUtils; // inherited from NSObject + + static boundingCircleForContourError(contour: VNContour): VNCircle; + + static boundingCircleForPointsError(points: NSArray | VNPoint[]): VNCircle; + + static boundingCircleForSIMDPointsPointCountError(points: interop.Pointer | interop.Reference>, pointCount: number): VNCircle; + + static calculateAreaForContourOrientedAreaError(area: interop.Pointer | interop.Reference, contour: VNContour, orientedArea: boolean): boolean; + + static calculatePerimeterForContourError(perimeter: interop.Pointer | interop.Reference, contour: VNContour): boolean; + + static new(): VNGeometryUtils; // inherited from NSObject +} + +declare class VNHomographicImageRegistrationRequest extends VNImageRegistrationRequest { + + static alloc(): VNHomographicImageRegistrationRequest; // inherited from NSObject + + static new(): VNHomographicImageRegistrationRequest; // inherited from NSObject +} + +declare var VNHomographicImageRegistrationRequestRevision1: number; + +declare class VNHorizonObservation extends VNObservation { + + static alloc(): VNHorizonObservation; // inherited from NSObject + + static new(): VNHorizonObservation; // inherited from NSObject + + readonly angle: number; + + readonly transform: CGAffineTransform; +} + +declare class VNHumanBodyPoseObservation extends VNRecognizedPointsObservation { + + static alloc(): VNHumanBodyPoseObservation; // inherited from NSObject + + static new(): VNHumanBodyPoseObservation; // inherited from NSObject + + readonly availableJointNames: NSArray; + + readonly availableJointsGroupNames: NSArray; + + recognizedPointForJointNameError(jointName: string): VNRecognizedPoint; + + recognizedPointsForJointsGroupNameError(jointsGroupName: string): NSDictionary; +} + +declare var VNHumanBodyPoseObservationJointNameLeftAnkle: string; + +declare var VNHumanBodyPoseObservationJointNameLeftEar: string; + +declare var VNHumanBodyPoseObservationJointNameLeftElbow: string; + +declare var VNHumanBodyPoseObservationJointNameLeftEye: string; + +declare var VNHumanBodyPoseObservationJointNameLeftHip: string; + +declare var VNHumanBodyPoseObservationJointNameLeftKnee: string; + +declare var VNHumanBodyPoseObservationJointNameLeftShoulder: string; + +declare var VNHumanBodyPoseObservationJointNameLeftWrist: string; + +declare var VNHumanBodyPoseObservationJointNameNeck: string; + +declare var VNHumanBodyPoseObservationJointNameNose: string; + +declare var VNHumanBodyPoseObservationJointNameRightAnkle: string; + +declare var VNHumanBodyPoseObservationJointNameRightEar: string; + +declare var VNHumanBodyPoseObservationJointNameRightElbow: string; + +declare var VNHumanBodyPoseObservationJointNameRightEye: string; + +declare var VNHumanBodyPoseObservationJointNameRightHip: string; + +declare var VNHumanBodyPoseObservationJointNameRightKnee: string; + +declare var VNHumanBodyPoseObservationJointNameRightShoulder: string; + +declare var VNHumanBodyPoseObservationJointNameRightWrist: string; + +declare var VNHumanBodyPoseObservationJointNameRoot: string; + +declare var VNHumanBodyPoseObservationJointsGroupNameAll: string; + +declare var VNHumanBodyPoseObservationJointsGroupNameFace: string; + +declare var VNHumanBodyPoseObservationJointsGroupNameLeftArm: string; + +declare var VNHumanBodyPoseObservationJointsGroupNameLeftLeg: string; + +declare var VNHumanBodyPoseObservationJointsGroupNameRightArm: string; + +declare var VNHumanBodyPoseObservationJointsGroupNameRightLeg: string; + +declare var VNHumanBodyPoseObservationJointsGroupNameTorso: string; + +declare class VNHumanHandPoseObservation extends VNRecognizedPointsObservation { + + static alloc(): VNHumanHandPoseObservation; // inherited from NSObject + + static new(): VNHumanHandPoseObservation; // inherited from NSObject + + readonly availableJointNames: NSArray; + + readonly availableJointsGroupNames: NSArray; + + readonly chirality: VNChirality; + + recognizedPointForJointNameError(jointName: string): VNRecognizedPoint; + + recognizedPointsForJointsGroupNameError(jointsGroupName: string): NSDictionary; +} + +declare var VNHumanHandPoseObservationJointNameIndexDIP: string; + +declare var VNHumanHandPoseObservationJointNameIndexMCP: string; + +declare var VNHumanHandPoseObservationJointNameIndexPIP: string; + +declare var VNHumanHandPoseObservationJointNameIndexTip: string; + +declare var VNHumanHandPoseObservationJointNameLittleDIP: string; + +declare var VNHumanHandPoseObservationJointNameLittleMCP: string; + +declare var VNHumanHandPoseObservationJointNameLittlePIP: string; + +declare var VNHumanHandPoseObservationJointNameLittleTip: string; + +declare var VNHumanHandPoseObservationJointNameMiddleDIP: string; + +declare var VNHumanHandPoseObservationJointNameMiddleMCP: string; + +declare var VNHumanHandPoseObservationJointNameMiddlePIP: string; + +declare var VNHumanHandPoseObservationJointNameMiddleTip: string; + +declare var VNHumanHandPoseObservationJointNameRingDIP: string; + +declare var VNHumanHandPoseObservationJointNameRingMCP: string; + +declare var VNHumanHandPoseObservationJointNameRingPIP: string; + +declare var VNHumanHandPoseObservationJointNameRingTip: string; + +declare var VNHumanHandPoseObservationJointNameThumbCMC: string; + +declare var VNHumanHandPoseObservationJointNameThumbIP: string; + +declare var VNHumanHandPoseObservationJointNameThumbMP: string; + +declare var VNHumanHandPoseObservationJointNameThumbTip: string; + +declare var VNHumanHandPoseObservationJointNameWrist: string; + +declare var VNHumanHandPoseObservationJointsGroupNameAll: string; + +declare var VNHumanHandPoseObservationJointsGroupNameIndexFinger: string; + +declare var VNHumanHandPoseObservationJointsGroupNameLittleFinger: string; + +declare var VNHumanHandPoseObservationJointsGroupNameMiddleFinger: string; + +declare var VNHumanHandPoseObservationJointsGroupNameRingFinger: string; + +declare var VNHumanHandPoseObservationJointsGroupNameThumb: string; + +declare class VNHumanObservation extends VNDetectedObjectObservation { + + static alloc(): VNHumanObservation; // inherited from NSObject + + static new(): VNHumanObservation; // inherited from NSObject + + static observationWithBoundingBox(boundingBox: CGRect): VNHumanObservation; // inherited from VNDetectedObjectObservation + + static observationWithRequestRevisionBoundingBox(requestRevision: number, boundingBox: CGRect): VNHumanObservation; // inherited from VNDetectedObjectObservation + + readonly upperBodyOnly: boolean; +} + +declare class VNImageAlignmentObservation extends VNObservation { + + static alloc(): VNImageAlignmentObservation; // inherited from NSObject + + static new(): VNImageAlignmentObservation; // inherited from NSObject +} + +declare class VNImageBasedRequest extends VNRequest { + + static alloc(): VNImageBasedRequest; // inherited from NSObject + + static new(): VNImageBasedRequest; // inherited from NSObject + + regionOfInterest: CGRect; +} + +declare const enum VNImageCropAndScaleOption { + + CenterCrop = 0, + + ScaleFit = 1, + + ScaleFill = 2 +} + +declare class VNImageHomographicAlignmentObservation extends VNImageAlignmentObservation { + + static alloc(): VNImageHomographicAlignmentObservation; // inherited from NSObject + + static new(): VNImageHomographicAlignmentObservation; // inherited from NSObject + + readonly warpTransform: simd_float3x3; +} + +declare var VNImageOptionCIContext: string; + +declare var VNImageOptionCameraIntrinsics: string; + +declare var VNImageOptionProperties: string; + +declare function VNImagePointForFaceLandmarkPoint(faceLandmarkPoint: interop.Reference, faceBoundingBox: CGRect, imageWidth: number, imageHeight: number): CGPoint; + +declare function VNImagePointForNormalizedPoint(normalizedPoint: CGPoint, imageWidth: number, imageHeight: number): CGPoint; + +declare function VNImagePointForNormalizedPointUsingRegionOfInterest(normalizedPoint: CGPoint, imageWidth: number, imageHeight: number, roi: CGRect): CGPoint; + +declare function VNImageRectForNormalizedRect(normalizedRect: CGRect, imageWidth: number, imageHeight: number): CGRect; + +declare function VNImageRectForNormalizedRectUsingRegionOfInterest(normalizedRect: CGRect, imageWidth: number, imageHeight: number, roi: CGRect): CGRect; + +declare class VNImageRegistrationRequest extends VNTargetedImageRequest { + + static alloc(): VNImageRegistrationRequest; // inherited from NSObject + + static new(): VNImageRegistrationRequest; // inherited from NSObject +} + +declare class VNImageRequestHandler extends NSObject { + + static alloc(): VNImageRequestHandler; // inherited from NSObject + + static new(): VNImageRequestHandler; // inherited from NSObject + + constructor(o: { CGImage: any; options: NSDictionary; }); + + constructor(o: { CGImage: any; orientation: CGImagePropertyOrientation; options: NSDictionary; }); + + constructor(o: { CIImage: CIImage; options: NSDictionary; }); + + constructor(o: { CIImage: CIImage; orientation: CGImagePropertyOrientation; options: NSDictionary; }); + + constructor(o: { CMSampleBuffer: any; options: NSDictionary; }); + + constructor(o: { CMSampleBuffer: any; orientation: CGImagePropertyOrientation; options: NSDictionary; }); + + constructor(o: { CVPixelBuffer: any; options: NSDictionary; }); + + constructor(o: { CVPixelBuffer: any; orientation: CGImagePropertyOrientation; options: NSDictionary; }); + + constructor(o: { data: NSData; options: NSDictionary; }); + + constructor(o: { data: NSData; orientation: CGImagePropertyOrientation; options: NSDictionary; }); + + constructor(o: { URL: NSURL; options: NSDictionary; }); + + constructor(o: { URL: NSURL; orientation: CGImagePropertyOrientation; options: NSDictionary; }); + + initWithCGImageOptions(image: any, options: NSDictionary): this; + + initWithCGImageOrientationOptions(image: any, orientation: CGImagePropertyOrientation, options: NSDictionary): this; + + initWithCIImageOptions(image: CIImage, options: NSDictionary): this; + + initWithCIImageOrientationOptions(image: CIImage, orientation: CGImagePropertyOrientation, options: NSDictionary): this; + + initWithCMSampleBufferOptions(sampleBuffer: any, options: NSDictionary): this; + + initWithCMSampleBufferOrientationOptions(sampleBuffer: any, orientation: CGImagePropertyOrientation, options: NSDictionary): this; + + initWithCVPixelBufferOptions(pixelBuffer: any, options: NSDictionary): this; + + initWithCVPixelBufferOrientationOptions(pixelBuffer: any, orientation: CGImagePropertyOrientation, options: NSDictionary): this; + + initWithDataOptions(imageData: NSData, options: NSDictionary): this; + + initWithDataOrientationOptions(imageData: NSData, orientation: CGImagePropertyOrientation, options: NSDictionary): this; + + initWithURLOptions(imageURL: NSURL, options: NSDictionary): this; + + initWithURLOrientationOptions(imageURL: NSURL, orientation: CGImagePropertyOrientation, options: NSDictionary): this; + + performRequestsError(requests: NSArray | VNRequest[]): boolean; +} + +declare class VNImageTranslationAlignmentObservation extends VNImageAlignmentObservation { + + static alloc(): VNImageTranslationAlignmentObservation; // inherited from NSObject + + static new(): VNImageTranslationAlignmentObservation; // inherited from NSObject + + readonly alignmentTransform: CGAffineTransform; +} + +declare function VNNormalizedFaceBoundingBoxPointForLandmarkPoint(faceLandmarkPoint: interop.Reference, faceBoundingBox: CGRect, imageWidth: number, imageHeight: number): CGPoint; + +declare var VNNormalizedIdentityRect: CGRect; + +declare function VNNormalizedPointForImagePoint(imagePoint: CGPoint, imageWidth: number, imageHeight: number): CGPoint; + +declare function VNNormalizedPointForImagePointUsingRegionOfInterest(imagePoint: CGPoint, imageWidth: number, imageHeight: number, roi: CGRect): CGPoint; + +declare function VNNormalizedRectForImageRect(imageRect: CGRect, imageWidth: number, imageHeight: number): CGRect; + +declare function VNNormalizedRectForImageRectUsingRegionOfInterest(imageRect: CGRect, imageWidth: number, imageHeight: number, roi: CGRect): CGRect; + +declare function VNNormalizedRectIsIdentityRect(normalizedRect: CGRect): boolean; + +declare class VNObservation extends NSObject implements NSCopying, NSSecureCoding, VNRequestRevisionProviding { + + static alloc(): VNObservation; // inherited from NSObject + + static new(): VNObservation; // inherited from NSObject + + readonly confidence: number; + + readonly timeRange: CMTimeRange; + + readonly uuid: NSUUID; + + readonly requestRevision: number; // inherited from VNRequestRevisionProviding + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} + +declare class VNPixelBufferObservation extends VNObservation { + + static alloc(): VNPixelBufferObservation; // inherited from NSObject + + static new(): VNPixelBufferObservation; // inherited from NSObject + + readonly featureName: string; + + readonly pixelBuffer: any; +} + +declare class VNPoint extends NSObject implements NSCopying, NSSecureCoding { + + static alloc(): VNPoint; // inherited from NSObject + + static distanceBetweenPointPoint(point1: VNPoint, point2: VNPoint): number; + + static new(): VNPoint; // inherited from NSObject + + static pointByApplyingVectorToPoint(vector: VNVector, point: VNPoint): VNPoint; + + readonly location: CGPoint; + + readonly x: number; + + readonly y: number; + + static readonly zeroPoint: VNPoint; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + constructor(o: { location: CGPoint; }); + + constructor(o: { x: number; y: number; }); + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + distanceToPoint(point: VNPoint): number; + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; + + initWithLocation(location: CGPoint): this; + + initWithXY(x: number, y: number): this; +} + +declare class VNRecognizeAnimalsRequest extends VNImageBasedRequest { + + static alloc(): VNRecognizeAnimalsRequest; // inherited from NSObject + + static knownAnimalIdentifiersForRevisionError(requestRevision: number): NSArray; + + static new(): VNRecognizeAnimalsRequest; // inherited from NSObject + + supportedIdentifiersAndReturnError(): NSArray; +} + +declare var VNRecognizeAnimalsRequestRevision1: number; + +declare var VNRecognizeAnimalsRequestRevision2: number; + +declare class VNRecognizeTextRequest extends VNImageBasedRequest implements VNRequestProgressProviding { + + static alloc(): VNRecognizeTextRequest; // inherited from NSObject + + static new(): VNRecognizeTextRequest; // inherited from NSObject + + static supportedRecognitionLanguagesForTextRecognitionLevelRevisionError(recognitionLevel: VNRequestTextRecognitionLevel, requestRevision: number): NSArray; + + customWords: NSArray; + + minimumTextHeight: number; + + recognitionLanguages: NSArray; + + recognitionLevel: VNRequestTextRecognitionLevel; + + usesLanguageCorrection: boolean; + + readonly debugDescription: string; // inherited from NSObjectProtocol + + readonly description: string; // inherited from NSObjectProtocol + + readonly hash: number; // inherited from NSObjectProtocol + + readonly indeterminate: boolean; // inherited from VNRequestProgressProviding + + readonly isProxy: boolean; // inherited from NSObjectProtocol + + progressHandler: (p1: VNRequest, p2: number, p3: NSError) => void; // inherited from VNRequestProgressProviding + + readonly superclass: typeof NSObject; // inherited from NSObjectProtocol + + readonly // inherited from NSObjectProtocol + + class(): typeof NSObject; + + conformsToProtocol(aProtocol: any /* Protocol */): boolean; + + isEqual(object: any): boolean; + + isKindOfClass(aClass: typeof NSObject): boolean; + + isMemberOfClass(aClass: typeof NSObject): boolean; + + performSelector(aSelector: string): any; + + performSelectorWithObject(aSelector: string, object: any): any; + + performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; + + respondsToSelector(aSelector: string): boolean; + + retainCount(): number; + + self(): this; + + supportedRecognitionLanguagesAndReturnError(): NSArray; +} + +declare var VNRecognizeTextRequestRevision1: number; + +declare var VNRecognizeTextRequestRevision2: number; + +declare class VNRecognizedObjectObservation extends VNDetectedObjectObservation { + + static alloc(): VNRecognizedObjectObservation; // inherited from NSObject + + static new(): VNRecognizedObjectObservation; // inherited from NSObject + + static observationWithBoundingBox(boundingBox: CGRect): VNRecognizedObjectObservation; // inherited from VNDetectedObjectObservation + + static observationWithRequestRevisionBoundingBox(requestRevision: number, boundingBox: CGRect): VNRecognizedObjectObservation; // inherited from VNDetectedObjectObservation + + readonly labels: NSArray; +} + +declare class VNRecognizedPoint extends VNDetectedPoint { + + static alloc(): VNRecognizedPoint; // inherited from NSObject + + static new(): VNRecognizedPoint; // inherited from NSObject + + readonly identifier: string; +} + +declare var VNRecognizedPointGroupKeyAll: string; + +declare class VNRecognizedPointsObservation extends VNObservation { + + static alloc(): VNRecognizedPointsObservation; // inherited from NSObject + + static new(): VNRecognizedPointsObservation; // inherited from NSObject + + readonly availableGroupKeys: NSArray; + + readonly availableKeys: NSArray; + + keypointsMultiArrayAndReturnError(): MLMultiArray; + + recognizedPointForKeyError(pointKey: string): VNRecognizedPoint; + + recognizedPointsForGroupKeyError(groupKey: string): NSDictionary; +} + +declare class VNRecognizedText extends NSObject implements NSCopying, NSSecureCoding, VNRequestRevisionProviding { + + static alloc(): VNRecognizedText; // inherited from NSObject + + static new(): VNRecognizedText; // inherited from NSObject + + readonly confidence: number; + + readonly string: string; + + readonly requestRevision: number; // inherited from VNRequestRevisionProviding + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + boundingBoxForRangeError(range: NSRange): VNRectangleObservation; + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; +} + +declare class VNRecognizedTextObservation extends VNRectangleObservation { + + static alloc(): VNRecognizedTextObservation; // inherited from NSObject + + static new(): VNRecognizedTextObservation; // inherited from NSObject + + static observationWithBoundingBox(boundingBox: CGRect): VNRecognizedTextObservation; // inherited from VNDetectedObjectObservation + + static observationWithRequestRevisionBoundingBox(requestRevision: number, boundingBox: CGRect): VNRecognizedTextObservation; // inherited from VNDetectedObjectObservation + + static rectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision: number, topLeft: CGPoint, bottomLeft: CGPoint, bottomRight: CGPoint, topRight: CGPoint): VNRecognizedTextObservation; // inherited from VNRectangleObservation + + topCandidates(maxCandidateCount: number): NSArray; +} + +declare class VNRectangleObservation extends VNDetectedObjectObservation { + + static alloc(): VNRectangleObservation; // inherited from NSObject + + static new(): VNRectangleObservation; // inherited from NSObject + + static observationWithBoundingBox(boundingBox: CGRect): VNRectangleObservation; // inherited from VNDetectedObjectObservation + + static observationWithRequestRevisionBoundingBox(requestRevision: number, boundingBox: CGRect): VNRectangleObservation; // inherited from VNDetectedObjectObservation + + static rectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision: number, topLeft: CGPoint, bottomLeft: CGPoint, bottomRight: CGPoint, topRight: CGPoint): VNRectangleObservation; + + readonly bottomLeft: CGPoint; + + readonly bottomRight: CGPoint; + + readonly topLeft: CGPoint; + + readonly topRight: CGPoint; +} + +declare class VNRequest extends NSObject implements NSCopying { + + static alloc(): VNRequest; // inherited from NSObject + + static new(): VNRequest; // inherited from NSObject + + readonly completionHandler: (p1: VNRequest, p2: NSError) => void; + + preferBackgroundProcessing: boolean; + + readonly results: NSArray; + + revision: number; + + usesCPUOnly: boolean; + + static readonly currentRevision: number; + + static readonly defaultRevision: number; + + static readonly supportedRevisions: NSIndexSet; + + constructor(o: { completionHandler: (p1: VNRequest, p2: NSError) => void; }); + + cancel(): void; + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + initWithCompletionHandler(completionHandler: (p1: VNRequest, p2: NSError) => void): this; +} + +declare const enum VNRequestFaceLandmarksConstellation { + + ConstellationNotDefined = 0, + + Constellation65Points = 1, + + Constellation76Points = 2 +} + +interface VNRequestProgressProviding extends NSObjectProtocol { + + indeterminate: boolean; + + progressHandler: (p1: VNRequest, p2: number, p3: NSError) => void; +} +declare var VNRequestProgressProviding: { + + prototype: VNRequestProgressProviding; +}; + +interface VNRequestRevisionProviding { + + requestRevision: number; +} +declare var VNRequestRevisionProviding: { + + prototype: VNRequestRevisionProviding; +}; + +declare var VNRequestRevisionUnspecified: number; + +declare const enum VNRequestTextRecognitionLevel { + + Accurate = 0, + + Fast = 1 +} + +declare const enum VNRequestTrackingLevel { + + Accurate = 0, + + Fast = 1 +} + +declare class VNSaliencyImageObservation extends VNPixelBufferObservation { + + static alloc(): VNSaliencyImageObservation; // inherited from NSObject + + static new(): VNSaliencyImageObservation; // inherited from NSObject + + readonly salientObjects: NSArray; +} + +declare class VNSequenceRequestHandler extends NSObject { + + static alloc(): VNSequenceRequestHandler; // inherited from NSObject + + static new(): VNSequenceRequestHandler; // inherited from NSObject + + performRequestsOnCGImageError(requests: NSArray | VNRequest[], image: any): boolean; + + performRequestsOnCGImageOrientationError(requests: NSArray | VNRequest[], image: any, orientation: CGImagePropertyOrientation): boolean; + + performRequestsOnCIImageError(requests: NSArray | VNRequest[], image: CIImage): boolean; + + performRequestsOnCIImageOrientationError(requests: NSArray | VNRequest[], image: CIImage, orientation: CGImagePropertyOrientation): boolean; + + performRequestsOnCMSampleBufferError(requests: NSArray | VNRequest[], sampleBuffer: any): boolean; + + performRequestsOnCMSampleBufferOrientationError(requests: NSArray | VNRequest[], sampleBuffer: any, orientation: CGImagePropertyOrientation): boolean; + + performRequestsOnCVPixelBufferError(requests: NSArray | VNRequest[], pixelBuffer: any): boolean; + + performRequestsOnCVPixelBufferOrientationError(requests: NSArray | VNRequest[], pixelBuffer: any, orientation: CGImagePropertyOrientation): boolean; + + performRequestsOnImageDataError(requests: NSArray | VNRequest[], imageData: NSData): boolean; + + performRequestsOnImageDataOrientationError(requests: NSArray | VNRequest[], imageData: NSData, orientation: CGImagePropertyOrientation): boolean; + + performRequestsOnImageURLError(requests: NSArray | VNRequest[], imageURL: NSURL): boolean; + + performRequestsOnImageURLOrientationError(requests: NSArray | VNRequest[], imageURL: NSURL, orientation: CGImagePropertyOrientation): boolean; +} + +declare class VNStatefulRequest extends VNImageBasedRequest { + + static alloc(): VNStatefulRequest; // inherited from NSObject + + static new(): VNStatefulRequest; // inherited from NSObject + + readonly frameAnalysisSpacing: CMTime; + + readonly minimumLatencyFrameCount: number; + + readonly requestFrameAnalysisSpacing: CMTime; + + constructor(o: { frameAnalysisSpacing: CMTime; completionHandler: (p1: VNRequest, p2: NSError) => void; }); + + initWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing: CMTime, completionHandler: (p1: VNRequest, p2: NSError) => void): this; +} + +declare class VNTargetedImageRequest extends VNImageBasedRequest { + + static alloc(): VNTargetedImageRequest; // inherited from NSObject + + static new(): VNTargetedImageRequest; // inherited from NSObject + + constructor(o: { targetedCGImage: any; options: NSDictionary; }); + + constructor(o: { targetedCGImage: any; options: NSDictionary; completionHandler: (p1: VNRequest, p2: NSError) => void; }); + + constructor(o: { targetedCGImage: any; orientation: CGImagePropertyOrientation; options: NSDictionary; }); + + constructor(o: { targetedCGImage: any; orientation: CGImagePropertyOrientation; options: NSDictionary; completionHandler: (p1: VNRequest, p2: NSError) => void; }); + + constructor(o: { targetedCIImage: CIImage; options: NSDictionary; }); + + constructor(o: { targetedCIImage: CIImage; options: NSDictionary; completionHandler: (p1: VNRequest, p2: NSError) => void; }); + + constructor(o: { targetedCIImage: CIImage; orientation: CGImagePropertyOrientation; options: NSDictionary; }); + + constructor(o: { targetedCIImage: CIImage; orientation: CGImagePropertyOrientation; options: NSDictionary; completionHandler: (p1: VNRequest, p2: NSError) => void; }); + + constructor(o: { targetedCMSampleBuffer: any; options: NSDictionary; }); + + constructor(o: { targetedCMSampleBuffer: any; options: NSDictionary; completionHandler: (p1: VNRequest, p2: NSError) => void; }); + + constructor(o: { targetedCMSampleBuffer: any; orientation: CGImagePropertyOrientation; options: NSDictionary; }); + + constructor(o: { targetedCMSampleBuffer: any; orientation: CGImagePropertyOrientation; options: NSDictionary; completionHandler: (p1: VNRequest, p2: NSError) => void; }); + + constructor(o: { targetedCVPixelBuffer: any; options: NSDictionary; }); + + constructor(o: { targetedCVPixelBuffer: any; options: NSDictionary; completionHandler: (p1: VNRequest, p2: NSError) => void; }); + + constructor(o: { targetedCVPixelBuffer: any; orientation: CGImagePropertyOrientation; options: NSDictionary; }); + + constructor(o: { targetedCVPixelBuffer: any; orientation: CGImagePropertyOrientation; options: NSDictionary; completionHandler: (p1: VNRequest, p2: NSError) => void; }); + + constructor(o: { targetedImageData: NSData; options: NSDictionary; }); + + constructor(o: { targetedImageData: NSData; options: NSDictionary; completionHandler: (p1: VNRequest, p2: NSError) => void; }); + + constructor(o: { targetedImageData: NSData; orientation: CGImagePropertyOrientation; options: NSDictionary; }); + + constructor(o: { targetedImageData: NSData; orientation: CGImagePropertyOrientation; options: NSDictionary; completionHandler: (p1: VNRequest, p2: NSError) => void; }); + + constructor(o: { targetedImageURL: NSURL; options: NSDictionary; }); + + constructor(o: { targetedImageURL: NSURL; options: NSDictionary; completionHandler: (p1: VNRequest, p2: NSError) => void; }); + + constructor(o: { targetedImageURL: NSURL; orientation: CGImagePropertyOrientation; options: NSDictionary; }); + + constructor(o: { targetedImageURL: NSURL; orientation: CGImagePropertyOrientation; options: NSDictionary; completionHandler: (p1: VNRequest, p2: NSError) => void; }); + + initWithTargetedCGImageOptions(cgImage: any, options: NSDictionary): this; + + initWithTargetedCGImageOptionsCompletionHandler(cgImage: any, options: NSDictionary, completionHandler: (p1: VNRequest, p2: NSError) => void): this; + + initWithTargetedCGImageOrientationOptions(cgImage: any, orientation: CGImagePropertyOrientation, options: NSDictionary): this; + + initWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage: any, orientation: CGImagePropertyOrientation, options: NSDictionary, completionHandler: (p1: VNRequest, p2: NSError) => void): this; + + initWithTargetedCIImageOptions(ciImage: CIImage, options: NSDictionary): this; + + initWithTargetedCIImageOptionsCompletionHandler(ciImage: CIImage, options: NSDictionary, completionHandler: (p1: VNRequest, p2: NSError) => void): this; + + initWithTargetedCIImageOrientationOptions(ciImage: CIImage, orientation: CGImagePropertyOrientation, options: NSDictionary): this; + + initWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage: CIImage, orientation: CGImagePropertyOrientation, options: NSDictionary, completionHandler: (p1: VNRequest, p2: NSError) => void): this; + + initWithTargetedCMSampleBufferOptions(sampleBuffer: any, options: NSDictionary): this; + + initWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer: any, options: NSDictionary, completionHandler: (p1: VNRequest, p2: NSError) => void): this; + + initWithTargetedCMSampleBufferOrientationOptions(sampleBuffer: any, orientation: CGImagePropertyOrientation, options: NSDictionary): this; + + initWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer: any, orientation: CGImagePropertyOrientation, options: NSDictionary, completionHandler: (p1: VNRequest, p2: NSError) => void): this; + + initWithTargetedCVPixelBufferOptions(pixelBuffer: any, options: NSDictionary): this; + + initWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer: any, options: NSDictionary, completionHandler: (p1: VNRequest, p2: NSError) => void): this; + + initWithTargetedCVPixelBufferOrientationOptions(pixelBuffer: any, orientation: CGImagePropertyOrientation, options: NSDictionary): this; + + initWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer: any, orientation: CGImagePropertyOrientation, options: NSDictionary, completionHandler: (p1: VNRequest, p2: NSError) => void): this; + + initWithTargetedImageDataOptions(imageData: NSData, options: NSDictionary): this; + + initWithTargetedImageDataOptionsCompletionHandler(imageData: NSData, options: NSDictionary, completionHandler: (p1: VNRequest, p2: NSError) => void): this; + + initWithTargetedImageDataOrientationOptions(imageData: NSData, orientation: CGImagePropertyOrientation, options: NSDictionary): this; + + initWithTargetedImageDataOrientationOptionsCompletionHandler(imageData: NSData, orientation: CGImagePropertyOrientation, options: NSDictionary, completionHandler: (p1: VNRequest, p2: NSError) => void): this; + + initWithTargetedImageURLOptions(imageURL: NSURL, options: NSDictionary): this; + + initWithTargetedImageURLOptionsCompletionHandler(imageURL: NSURL, options: NSDictionary, completionHandler: (p1: VNRequest, p2: NSError) => void): this; + + initWithTargetedImageURLOrientationOptions(imageURL: NSURL, orientation: CGImagePropertyOrientation, options: NSDictionary): this; + + initWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL: NSURL, orientation: CGImagePropertyOrientation, options: NSDictionary, completionHandler: (p1: VNRequest, p2: NSError) => void): this; +} + +declare class VNTextObservation extends VNRectangleObservation { + + static alloc(): VNTextObservation; // inherited from NSObject + + static new(): VNTextObservation; // inherited from NSObject + + static observationWithBoundingBox(boundingBox: CGRect): VNTextObservation; // inherited from VNDetectedObjectObservation + + static observationWithRequestRevisionBoundingBox(requestRevision: number, boundingBox: CGRect): VNTextObservation; // inherited from VNDetectedObjectObservation + + static rectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision: number, topLeft: CGPoint, bottomLeft: CGPoint, bottomRight: CGPoint, topRight: CGPoint): VNTextObservation; // inherited from VNRectangleObservation + + readonly characterBoxes: NSArray; +} + +declare class VNTrackObjectRequest extends VNTrackingRequest { + + static alloc(): VNTrackObjectRequest; // inherited from NSObject + + static new(): VNTrackObjectRequest; // inherited from NSObject + + constructor(o: { detectedObjectObservation: VNDetectedObjectObservation; }); + + constructor(o: { detectedObjectObservation: VNDetectedObjectObservation; completionHandler: (p1: VNRequest, p2: NSError) => void; }); + + initWithDetectedObjectObservation(observation: VNDetectedObjectObservation): this; + + initWithDetectedObjectObservationCompletionHandler(observation: VNDetectedObjectObservation, completionHandler: (p1: VNRequest, p2: NSError) => void): this; +} + +declare var VNTrackObjectRequestRevision1: number; + +declare var VNTrackObjectRequestRevision2: number; + +declare class VNTrackRectangleRequest extends VNTrackingRequest { + + static alloc(): VNTrackRectangleRequest; // inherited from NSObject + + static new(): VNTrackRectangleRequest; // inherited from NSObject + + constructor(o: { rectangleObservation: VNRectangleObservation; }); + + constructor(o: { rectangleObservation: VNRectangleObservation; completionHandler: (p1: VNRequest, p2: NSError) => void; }); + + initWithRectangleObservation(observation: VNRectangleObservation): this; + + initWithRectangleObservationCompletionHandler(observation: VNRectangleObservation, completionHandler: (p1: VNRequest, p2: NSError) => void): this; +} + +declare var VNTrackRectangleRequestRevision1: number; + +declare class VNTrackingRequest extends VNImageBasedRequest { + + static alloc(): VNTrackingRequest; // inherited from NSObject + + static new(): VNTrackingRequest; // inherited from NSObject + + inputObservation: VNDetectedObjectObservation; + + lastFrame: boolean; + + trackingLevel: VNRequestTrackingLevel; +} + +declare class VNTrajectoryObservation extends VNObservation { + + static alloc(): VNTrajectoryObservation; // inherited from NSObject + + static new(): VNTrajectoryObservation; // inherited from NSObject + + readonly detectedPoints: NSArray; + + readonly equationCoefficients: interop.Reference; + + readonly movingAverageRadius: number; + + readonly projectedPoints: NSArray; +} + +declare class VNTranslationalImageRegistrationRequest extends VNImageRegistrationRequest { + + static alloc(): VNTranslationalImageRegistrationRequest; // inherited from NSObject + + static new(): VNTranslationalImageRegistrationRequest; // inherited from NSObject +} + +declare var VNTranslationalImageRegistrationRequestRevision1: number; + +declare class VNVector extends NSObject implements NSCopying, NSSecureCoding { + + static alloc(): VNVector; // inherited from NSObject + + static dotProductOfVectorVector(v1: VNVector, v2: VNVector): number; + + static new(): VNVector; // inherited from NSObject + + static unitVectorForVector(vector: VNVector): VNVector; + + static vectorByAddingVectorToVector(v1: VNVector, v2: VNVector): VNVector; + + static vectorByMultiplyingVectorByScalar(vector: VNVector, scalar: number): VNVector; + + static vectorBySubtractingVectorFromVector(v1: VNVector, v2: VNVector): VNVector; + + readonly length: number; + + readonly r: number; + + readonly squaredLength: number; + + readonly theta: number; + + readonly x: number; + + readonly y: number; + + static readonly zeroVector: VNVector; + + static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding + + constructor(o: { coder: NSCoder; }); // inherited from NSCoding + + constructor(o: { r: number; theta: number; }); + + constructor(o: { vectorHead: VNPoint; tail: VNPoint; }); + + constructor(o: { XComponent: number; yComponent: number; }); + + copyWithZone(zone: interop.Pointer | interop.Reference): any; + + encodeWithCoder(coder: NSCoder): void; + + initWithCoder(coder: NSCoder): this; + + initWithRTheta(r: number, theta: number): this; + + initWithVectorHeadTail(head: VNPoint, tail: VNPoint): this; + + initWithXComponentYComponent(x: number, y: number): this; +} + +declare var VNVideoProcessingOptionFrameCadence: string; + +declare var VNVideoProcessingOptionTimeInterval: string; + +declare class VNVideoProcessor extends NSObject { + + static alloc(): VNVideoProcessor; // inherited from NSObject + + static new(): VNVideoProcessor; // inherited from NSObject + + constructor(o: { URL: NSURL; }); + + addRequestProcessingOptionsError(request: VNRequest, processingOptions: VNVideoProcessorRequestProcessingOptions): boolean; + + addRequestWithProcessingOptionsError(request: VNRequest, processingOptions: NSDictionary): boolean; + + analyzeTimeRangeError(timeRange: CMTimeRange): boolean; + + analyzeWithTimeRangeError(timeRange: CMTimeRange): boolean; + + cancel(): void; + + initWithURL(videoURL: NSURL): this; + + removeRequestError(request: VNRequest): boolean; +} + +declare class VNVideoProcessorCadence extends NSObject implements NSCopying { + + static alloc(): VNVideoProcessorCadence; // inherited from NSObject + + static new(): VNVideoProcessorCadence; // inherited from NSObject + + copyWithZone(zone: interop.Pointer | interop.Reference): any; +} + +declare class VNVideoProcessorFrameRateCadence extends VNVideoProcessorCadence { + + static alloc(): VNVideoProcessorFrameRateCadence; // inherited from NSObject + + static new(): VNVideoProcessorFrameRateCadence; // inherited from NSObject + + readonly frameRate: number; + + constructor(o: { frameRate: number; }); + + initWithFrameRate(frameRate: number): this; +} + +declare class VNVideoProcessorRequestProcessingOptions extends NSObject implements NSCopying { + + static alloc(): VNVideoProcessorRequestProcessingOptions; // inherited from NSObject + + static new(): VNVideoProcessorRequestProcessingOptions; // inherited from NSObject + + cadence: VNVideoProcessorCadence; + + copyWithZone(zone: interop.Pointer | interop.Reference): any; +} + +declare class VNVideoProcessorTimeIntervalCadence extends VNVideoProcessorCadence { + + static alloc(): VNVideoProcessorTimeIntervalCadence; // inherited from NSObject + + static new(): VNVideoProcessorTimeIntervalCadence; // inherited from NSObject + + readonly timeInterval: number; + + constructor(o: { timeInterval: number; }); + + initWithTimeInterval(timeInterval: number): this; +} + +declare var VNVisionVersionNumber: number; diff --git a/tools/scripts/typings-minimal-copy.sh b/tools/scripts/typings-minimal-copy.sh index 70e65b419..8ad7da4fe 100755 --- a/tools/scripts/typings-minimal-copy.sh +++ b/tools/scripts/typings-minimal-copy.sh @@ -5,7 +5,7 @@ echo "Deleting old ios typings (ios/objc-x86_64)..." rm packages/types-minimal/src/lib/ios/objc-x86_64/* echo "Copying minimal typings to ios/objc-x86_64..." -array=( objc!AVFoundation.d.ts objc!Foundation.d.ts objc!ObjectiveC.d.ts objc!UIKit.d.ts ) +array=( objc!ARKit.d.ts objc!AVFAudio.d.ts objc!AVFoundation.d.ts objc!Foundation.d.ts objc!ObjectiveC.d.ts objc!PDFKit.d.ts objc!Speech.d.ts objc!UIKit.d.ts objc!Vision.d.ts ) for i in "${array[@]}" do echo "Including: $i"