UNPKG

@nativescript-community/ui-image

Version:

Advanced and efficient image display plugin which uses Fresco (Android) and SDWebImage (iOS) to implement caching, placeholders, image effects, and much more.

1,569 lines (809 loc) 99.5 kB
declare class SDAnimatedImage extends UIImage implements SDAnimatedImageProtocol { static alloc(): SDAnimatedImage; // inherited from NSObject static new(): SDAnimatedImage; // inherited from NSObject static objectWithItemProviderDataTypeIdentifierError(data: NSData, typeIdentifier: string): SDAnimatedImage; // inherited from NSItemProviderReading readonly animatedImageFormat: number; readonly allFramesLoaded: boolean; // inherited from SDAnimatedImageProtocol readonly animatedCoder: SDAnimatedImageCoder; // inherited from SDAnimatedImageProtocol readonly animatedImageData: NSData; // inherited from SDAnimatedImageProvider readonly animatedImageFrameCount: number; // inherited from SDAnimatedImageProvider readonly animatedImageLoopCount: number; // inherited from SDAnimatedImageProvider 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 constructor(o: { animatedCoder: SDAnimatedImageCoder; scale: number }); // inherited from SDAnimatedImageProtocol constructor(o: { data: NSData; scale: number; options: NSDictionary<string, any> }); // inherited from SDAnimatedImageProtocol animatedImageDurationAtIndex(index: number): number; animatedImageFrameAtIndex(index: number): UIImage; class(): typeof NSObject; conformsToProtocol(aProtocol: any /* Protocol */): boolean; initWithAnimatedCoderScale(animatedCoder: SDAnimatedImageCoder, scale: number): this; initWithDataScaleOptions(data: NSData, scale: number, options: NSDictionary<string, any>): 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; preloadAllFrames(): void; respondsToSelector(aSelector: string): boolean; retainCount(): number; self(): this; unloadAllFrames(): void; } interface SDAnimatedImageCoder extends SDAnimatedImageProvider, SDImageCoder { initWithAnimatedImageDataOptions?(data: NSData, options: NSDictionary<string, any>): SDAnimatedImageCoder; } declare var SDAnimatedImageCoder: { prototype: SDAnimatedImageCoder; }; declare class SDAnimatedImagePlayer extends NSObject { static alloc(): SDAnimatedImagePlayer; // inherited from NSObject static new(): SDAnimatedImagePlayer; // inherited from NSObject static playerWithProvider(provider: SDAnimatedImageProvider): SDAnimatedImagePlayer; animationFrameHandler: (p1: number, p2: UIImage) => void; animationLoopHandler: (p1: number) => void; readonly currentFrame: UIImage; readonly currentFrameIndex: number; readonly currentLoopCount: number; readonly isPlaying: boolean; maxBufferSize: number; playbackRate: number; runLoopMode: string; totalFrameCount: number; totalLoopCount: number; constructor(o: { provider: SDAnimatedImageProvider }); clearFrameBuffer(): void; initWithProvider(provider: SDAnimatedImageProvider): this; pausePlaying(): void; seekToFrameAtIndexLoopCount(index: number, loopCount: number): void; startPlaying(): void; stopPlaying(): void; } interface SDAnimatedImageProtocol extends SDAnimatedImageProvider { allFramesLoaded?: boolean; animatedCoder?: SDAnimatedImageCoder; initWithAnimatedCoderScale?(animatedCoder: SDAnimatedImageCoder, scale: number): SDAnimatedImageProtocol; initWithDataScaleOptions?(data: NSData, scale: number, options: NSDictionary<string, any>): SDAnimatedImageProtocol; preloadAllFrames?(): void; unloadAllFrames?(): void; } declare var SDAnimatedImageProtocol: { prototype: SDAnimatedImageProtocol; }; interface SDAnimatedImageProvider extends NSObjectProtocol { animatedImageData: NSData; animatedImageFrameCount: number; animatedImageLoopCount: number; animatedImageDurationAtIndex(index: number): number; animatedImageFrameAtIndex(index: number): UIImage; } declare var SDAnimatedImageProvider: { prototype: SDAnimatedImageProvider; }; declare class SDAnimatedImageView extends UIImageView { static alloc(): SDAnimatedImageView; // inherited from NSObject static appearance(): SDAnimatedImageView; // inherited from UIAppearance static appearanceForTraitCollection(trait: UITraitCollection): SDAnimatedImageView; // inherited from UIAppearance static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): SDAnimatedImageView; // inherited from UIAppearance static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray<typeof NSObject> | typeof NSObject[]): SDAnimatedImageView; // inherited from UIAppearance static appearanceWhenContainedIn(ContainerClass: typeof NSObject): SDAnimatedImageView; // inherited from UIAppearance static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray<typeof NSObject> | typeof NSObject[]): SDAnimatedImageView; // inherited from UIAppearance static new(): SDAnimatedImageView; // inherited from NSObject autoPlayAnimatedImage: boolean; clearBufferWhenStopped: boolean; readonly currentFrame: UIImage; readonly currentFrameIndex: number; readonly currentLoopCount: number; maxBufferSize: number; playbackRate: number; resetFrameIndexWhenStopped: boolean; runLoopMode: string; shouldCustomLoopCount: boolean; shouldIncrementalLoad: boolean; } declare class SDDiskCache extends NSObject implements SDDiskCacheProtocol { static alloc(): SDDiskCache; // inherited from NSObject static new(): SDDiskCache; // inherited from NSObject readonly config: SDImageCacheConfig; 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 constructor(o: { cachePath: string; config: SDImageCacheConfig }); // inherited from SDDiskCacheProtocol cachePathForKey(key: string): string; class(): typeof NSObject; conformsToProtocol(aProtocol: any /* Protocol */): boolean; containsDataForKey(key: string): boolean; dataForKey(key: string): NSData; extendedDataForKey(key: string): NSData; initWithCachePathConfig(cachePath: string, config: SDImageCacheConfig): this; isEqual(object: any): boolean; isKindOfClass(aClass: typeof NSObject): boolean; isMemberOfClass(aClass: typeof NSObject): boolean; moveCacheDirectoryFromPathToPath(srcPath: string, dstPath: string): void; performSelector(aSelector: string): any; performSelectorWithObject(aSelector: string, object: any): any; performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; removeAllData(): void; removeDataForKey(key: string): void; removeExpiredData(): void; respondsToSelector(aSelector: string): boolean; retainCount(): number; self(): this; setDataForKey(data: NSData, key: string): void; setExtendedDataForKey(extendedData: NSData, key: string): void; totalCount(): number; totalSize(): number; } interface SDDiskCacheProtocol extends NSObjectProtocol { cachePathForKey(key: string): string; containsDataForKey(key: string): boolean; dataForKey(key: string): NSData; extendedDataForKey(key: string): NSData; initWithCachePathConfig?(cachePath: string, config: SDImageCacheConfig): SDDiskCacheProtocol; removeAllData(): void; removeDataForKey(key: string): void; removeExpiredData(): void; setDataForKey(data: NSData, key: string): void; setExtendedDataForKey(extendedData: NSData, key: string): void; totalCount(): number; totalSize(): number; } declare var SDDiskCacheProtocol: { prototype: SDDiskCacheProtocol; }; declare function SDGraphicsBeginImageContext(size: CGSize): void; declare function SDGraphicsBeginImageContextWithOptions(size: CGSize, opaque: boolean, scale: number): void; declare function SDGraphicsEndImageContext(): void; declare function SDGraphicsGetCurrentContext(): any; declare function SDGraphicsGetImageFromCurrentImageContext(): UIImage; declare class SDGraphicsImageRenderer extends NSObject { static alloc(): SDGraphicsImageRenderer; // inherited from NSObject static new(): SDGraphicsImageRenderer; // inherited from NSObject constructor(o: { size: CGSize }); constructor(o: { size: CGSize; format: SDGraphicsImageRendererFormat }); imageWithActions(actions: (p1: any) => void): UIImage; initWithSize(size: CGSize): this; initWithSizeFormat(size: CGSize, format: SDGraphicsImageRendererFormat): this; } declare class SDGraphicsImageRendererFormat extends NSObject { static alloc(): SDGraphicsImageRendererFormat; // inherited from NSObject static new(): SDGraphicsImageRendererFormat; // inherited from NSObject static preferredFormat(): SDGraphicsImageRendererFormat; opaque: boolean; preferredRange: SDGraphicsImageRendererFormatRange; scale: number; } declare const enum SDGraphicsImageRendererFormatRange { Unspecified = -1, Automatic = 0, Extended = 1, Standard = 2 } declare class SDImageAPNGCoder extends SDImageIOAnimatedCoder implements SDAnimatedImageCoder, SDProgressiveImageCoder { static alloc(): SDImageAPNGCoder; // inherited from NSObject static new(): SDImageAPNGCoder; // inherited from NSObject static readonly sharedCoder: SDImageAPNGCoder; readonly animatedImageData: NSData; // inherited from SDAnimatedImageProvider readonly animatedImageFrameCount: number; // inherited from SDAnimatedImageProvider readonly animatedImageLoopCount: number; // inherited from SDAnimatedImageProvider 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 constructor(o: { incrementalWithOptions: NSDictionary<string, any> }); // inherited from SDProgressiveImageCoder constructor(o: { animatedImageData: NSData; options: NSDictionary<string, any> }); // inherited from SDAnimatedImageCoder animatedImageDurationAtIndex(index: number): number; animatedImageFrameAtIndex(index: number): UIImage; canDecodeFromData(data: NSData): boolean; canEncodeToFormat(format: number): boolean; canIncrementalDecodeFromData(data: NSData): boolean; class(): typeof NSObject; conformsToProtocol(aProtocol: any /* Protocol */): boolean; decodedImageWithDataOptions(data: NSData, options: NSDictionary<string, any>): UIImage; encodedDataWithImageFormatOptions(image: UIImage, format: number, options: NSDictionary<string, any>): NSData; incrementalDecodedImageWithOptions(options: NSDictionary<string, any>): UIImage; initIncrementalWithOptions(options: NSDictionary<string, any>): this; initWithAnimatedImageDataOptions(data: NSData, options: NSDictionary<string, any>): 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; updateIncrementalDataFinished(data: NSData, finished: boolean): void; } declare class SDImageAWebPCoder extends SDImageIOAnimatedCoder implements SDAnimatedImageCoder, SDProgressiveImageCoder { static alloc(): SDImageAWebPCoder; // inherited from NSObject static new(): SDImageAWebPCoder; // inherited from NSObject static readonly sharedCoder: SDImageAWebPCoder; readonly animatedImageData: NSData; // inherited from SDAnimatedImageProvider readonly animatedImageFrameCount: number; // inherited from SDAnimatedImageProvider readonly animatedImageLoopCount: number; // inherited from SDAnimatedImageProvider 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 constructor(o: { incrementalWithOptions: NSDictionary<string, any> }); // inherited from SDProgressiveImageCoder constructor(o: { animatedImageData: NSData; options: NSDictionary<string, any> }); // inherited from SDAnimatedImageCoder animatedImageDurationAtIndex(index: number): number; animatedImageFrameAtIndex(index: number): UIImage; canDecodeFromData(data: NSData): boolean; canEncodeToFormat(format: number): boolean; canIncrementalDecodeFromData(data: NSData): boolean; class(): typeof NSObject; conformsToProtocol(aProtocol: any /* Protocol */): boolean; decodedImageWithDataOptions(data: NSData, options: NSDictionary<string, any>): UIImage; encodedDataWithImageFormatOptions(image: UIImage, format: number, options: NSDictionary<string, any>): NSData; incrementalDecodedImageWithOptions(options: NSDictionary<string, any>): UIImage; initIncrementalWithOptions(options: NSDictionary<string, any>): this; initWithAnimatedImageDataOptions(data: NSData, options: NSDictionary<string, any>): 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; updateIncrementalDataFinished(data: NSData, finished: boolean): void; } declare class SDImageBlurTransformer extends NSObject implements SDImageTransformer { static alloc(): SDImageBlurTransformer; // inherited from NSObject static new(): SDImageBlurTransformer; // inherited from NSObject static transformerWithRadius(blurRadius: number): SDImageBlurTransformer; readonly blurRadius: 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 readonly superclass: typeof NSObject; // inherited from NSObjectProtocol readonly transformerKey: string; // inherited from SDImageTransformer 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; transformedImageWithImageForKey(image: UIImage, key: string): UIImage; } declare class SDImageCache extends NSObject implements SDImageCacheProtocol { static alloc(): SDImageCache; // inherited from NSObject static new(): SDImageCache; // inherited from NSObject additionalCachePathBlock: (p1: string) => string; readonly config: SDImageCacheConfig; readonly diskCache: SDDiskCacheProtocol; readonly diskCachePath: string; readonly memoryCache: SDMemoryCacheProtocol; static defaultDiskCacheDirectory: string; static readonly sharedImageCache: SDImageCache; 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 constructor(o: { namespace: string }); constructor(o: { namespace: string; diskCacheDirectory: string }); constructor(o: { namespace: string; diskCacheDirectory: string; config: SDImageCacheConfig }); cachePathForKey(key: string): string; calculateSizeWithCompletionBlock(completionBlock: (p1: number, p2: number) => void): void; class(): typeof NSObject; clearDiskOnCompletion(completion: () => void): void; clearMemory(): void; clearWithCacheTypeCompletion(cacheType: SDImageCacheType, completionBlock: () => void): void; conformsToProtocol(aProtocol: any /* Protocol */): boolean; containsImageForKeyCacheTypeCompletion(key: string, cacheType: SDImageCacheType, completionBlock: (p1: SDImageCacheType) => void): void; deleteOldFilesWithCompletionBlock(completionBlock: () => void): void; diskImageDataExistsWithKey(key: string): boolean; diskImageDataForKey(key: string): NSData; diskImageDataQueryForKeyCompletion(key: string, completionBlock: (p1: NSData) => void): void; diskImageExistsWithKeyCompletion(key: string, completionBlock: (p1: boolean) => void): void; imageFromCacheForKey(key: string): UIImage; imageFromCacheForKeyOptionsContext(key: string, options: SDImageCacheOptions, context: NSDictionary<string, any>): UIImage; imageFromDiskCacheForKey(key: string): UIImage; imageFromDiskCacheForKeyOptionsContext(key: string, options: SDImageCacheOptions, context: NSDictionary<string, any>): UIImage; imageFromMemoryCacheForKey(key: string): UIImage; initWithNamespace(ns: string): this; initWithNamespaceDiskCacheDirectory(ns: string, directory: string): this; initWithNamespaceDiskCacheDirectoryConfig(ns: string, directory: string, config: SDImageCacheConfig): 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; queryCacheOperationForKeyDone(key: string, doneBlock: (p1: UIImage, p2: NSData, p3: SDImageCacheType) => void): NSOperation; queryCacheOperationForKeyOptionsContextCacheTypeDone(key: string, options: SDImageCacheOptions, context: NSDictionary<string, any>, queryCacheType: SDImageCacheType, doneBlock: (p1: UIImage, p2: NSData, p3: SDImageCacheType) => void): NSOperation; queryCacheOperationForKeyOptionsContextDone(key: string, options: SDImageCacheOptions, context: NSDictionary<string, any>, doneBlock: (p1: UIImage, p2: NSData, p3: SDImageCacheType) => void): NSOperation; queryCacheOperationForKeyOptionsDone(key: string, options: SDImageCacheOptions, doneBlock: (p1: UIImage, p2: NSData, p3: SDImageCacheType) => void): NSOperation; queryImageForKeyOptionsContextCacheTypeCompletion(key: string, options: SDWebImageOptions, context: NSDictionary<string, any>, cacheType: SDImageCacheType, completionBlock: (p1: UIImage, p2: NSData, p3: SDImageCacheType) => void): SDWebImageOperation; queryImageForKeyOptionsContextCompletion(key: string, options: SDWebImageOptions, context: NSDictionary<string, any>, completionBlock: (p1: UIImage, p2: NSData, p3: SDImageCacheType) => void): SDWebImageOperation; removeImageForKeyCacheTypeCompletion(key: string, cacheType: SDImageCacheType, completionBlock: () => void): void; removeImageForKeyFromDiskWithCompletion(key: string, fromDisk: boolean, completion: () => void): void; removeImageForKeyWithCompletion(key: string, completion: () => void): void; removeImageFromDiskForKey(key: string): void; removeImageFromMemoryForKey(key: string): void; respondsToSelector(aSelector: string): boolean; retainCount(): number; self(): this; storeImageDataToDiskForKey(imageData: NSData, key: string): void; storeImageForKeyCompletion(image: UIImage, key: string, completionBlock: () => void): void; storeImageForKeyToDiskCompletion(image: UIImage, key: string, toDisk: boolean, completionBlock: () => void): void; storeImageImageDataForKeyCacheTypeCompletion(image: UIImage, imageData: NSData, key: string, cacheType: SDImageCacheType, completionBlock: () => void): void; storeImageImageDataForKeyToDiskCompletion(image: UIImage, imageData: NSData, key: string, toDisk: boolean, completionBlock: () => void): void; storeImageToMemoryForKey(image: UIImage, key: string): void; totalDiskCount(): number; totalDiskSize(): number; } declare class SDImageCacheConfig extends NSObject implements NSCopying { static alloc(): SDImageCacheConfig; // inherited from NSObject static new(): SDImageCacheConfig; // inherited from NSObject diskCacheClass: typeof NSObject; diskCacheExpireType: SDImageCacheConfigExpireType; diskCacheReadingOptions: NSDataReadingOptions; diskCacheWritingOptions: NSDataWritingOptions; fileManager: NSFileManager; maxDiskAge: number; maxDiskSize: number; maxMemoryCost: number; maxMemoryCount: number; memoryCacheClass: typeof NSObject; shouldCacheImagesInMemory: boolean; shouldDisableiCloud: boolean; shouldRemoveExpiredDataWhenEnterBackground: boolean; shouldUseWeakMemoryCache: boolean; static readonly defaultCacheConfig: SDImageCacheConfig; copyWithZone(zone: interop.Pointer | interop.Reference<any>): any; } declare const enum SDImageCacheConfigExpireType { AccessDate = 0, ModificationDate = 1, CreationDate = 2, ChangeDate = 3 } declare function SDImageCacheDecodeImageData(imageData: NSData, cacheKey: string, options: SDWebImageOptions, context: NSDictionary<string, any>): UIImage; declare const enum SDImageCacheOptions { QueryMemoryData = 1, QueryMemoryDataSync = 2, QueryDiskDataSync = 4, ScaleDownLargeImages = 8, AvoidDecodeImage = 16, DecodeFirstFrameOnly = 32, PreloadAllFrames = 64, MatchAnimatedImageClass = 128 } interface SDImageCacheProtocol extends NSObjectProtocol { clearWithCacheTypeCompletion(cacheType: SDImageCacheType, completionBlock: () => void): void; containsImageForKeyCacheTypeCompletion(key: string, cacheType: SDImageCacheType, completionBlock: (p1: SDImageCacheType) => void): void; queryImageForKeyOptionsContextCacheTypeCompletion(key: string, options: SDWebImageOptions, context: NSDictionary<string, any>, cacheType: SDImageCacheType, completionBlock: (p1: UIImage, p2: NSData, p3: SDImageCacheType) => void): SDWebImageOperation; queryImageForKeyOptionsContextCompletion(key: string, options: SDWebImageOptions, context: NSDictionary<string, any>, completionBlock: (p1: UIImage, p2: NSData, p3: SDImageCacheType) => void): SDWebImageOperation; removeImageForKeyCacheTypeCompletion(key: string, cacheType: SDImageCacheType, completionBlock: () => void): void; storeImageImageDataForKeyCacheTypeCompletion(image: UIImage, imageData: NSData, key: string, cacheType: SDImageCacheType, completionBlock: () => void): void; } declare var SDImageCacheProtocol: { prototype: SDImageCacheProtocol; }; declare const enum SDImageCacheType { None = 0, Disk = 1, Memory = 2, All = 3 } declare class SDImageCachesManager extends NSObject implements SDImageCacheProtocol { static alloc(): SDImageCachesManager; // inherited from NSObject static new(): SDImageCachesManager; // inherited from NSObject caches: NSArray<SDImageCacheProtocol>; clearOperationPolicy: SDImageCachesManagerOperationPolicy; containsOperationPolicy: SDImageCachesManagerOperationPolicy; queryOperationPolicy: SDImageCachesManagerOperationPolicy; removeOperationPolicy: SDImageCachesManagerOperationPolicy; storeOperationPolicy: SDImageCachesManagerOperationPolicy; static readonly sharedManager: SDImageCachesManager; 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 addCache(cache: SDImageCacheProtocol): void; class(): typeof NSObject; clearWithCacheTypeCompletion(cacheType: SDImageCacheType, completionBlock: () => void): void; conformsToProtocol(aProtocol: any /* Protocol */): boolean; containsImageForKeyCacheTypeCompletion(key: string, cacheType: SDImageCacheType, completionBlock: (p1: SDImageCacheType) => void): void; 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; queryImageForKeyOptionsContextCacheTypeCompletion(key: string, options: SDWebImageOptions, context: NSDictionary<string, any>, cacheType: SDImageCacheType, completionBlock: (p1: UIImage, p2: NSData, p3: SDImageCacheType) => void): SDWebImageOperation; queryImageForKeyOptionsContextCompletion(key: string, options: SDWebImageOptions, context: NSDictionary<string, any>, completionBlock: (p1: UIImage, p2: NSData, p3: SDImageCacheType) => void): SDWebImageOperation; removeCache(cache: SDImageCacheProtocol): void; removeImageForKeyCacheTypeCompletion(key: string, cacheType: SDImageCacheType, completionBlock: () => void): void; respondsToSelector(aSelector: string): boolean; retainCount(): number; self(): this; storeImageImageDataForKeyCacheTypeCompletion(image: UIImage, imageData: NSData, key: string, cacheType: SDImageCacheType, completionBlock: () => void): void; } declare const enum SDImageCachesManagerOperationPolicy { Serial = 0, Concurrent = 1, HighestOnly = 2, LowestOnly = 3 } interface SDImageCoder extends NSObjectProtocol { canDecodeFromData(data: NSData): boolean; canEncodeToFormat(format: number): boolean; decodedImageWithDataOptions(data: NSData, options: NSDictionary<string, any>): UIImage; encodedDataWithImageFormatOptions(image: UIImage, format: number, options: NSDictionary<string, any>): NSData; } declare var SDImageCoder: { prototype: SDImageCoder; }; declare let SDImageCoderDecodeFirstFrameOnly: string; declare let SDImageCoderDecodePreserveAspectRatio: string; declare let SDImageCoderDecodeScaleFactor: string; declare let SDImageCoderDecodeThumbnailPixelSize: string; declare let SDImageCoderEncodeBackgroundColor: string; declare let SDImageCoderEncodeCompressionQuality: string; declare let SDImageCoderEncodeEmbedThumbnail: string; declare let SDImageCoderEncodeFirstFrameOnly: string; declare let SDImageCoderEncodeMaxFileSize: string; declare let SDImageCoderEncodeMaxPixelSize: string; declare class SDImageCoderHelper extends NSObject { static CGImageContainsAlpha(cgImage: any): boolean; static CGImageCreateDecoded(cgImage: any): any; static CGImageCreateDecodedOrientation(cgImage: any, orientation: CGImagePropertyOrientation): any; static CGImageCreateScaledSize(cgImage: any, size: CGSize): any; static alloc(): SDImageCoderHelper; // inherited from NSObject static animatedImageWithFrames(frames: NSArray<SDImageFrame> | SDImageFrame[]): UIImage; static colorSpaceGetDeviceRGB(): any; static decodedAndScaledDownImageWithImageLimitBytes(image: UIImage, bytes: number): UIImage; static decodedImageWithImage(image: UIImage): UIImage; static exifOrientationFromImageOrientation(imageOrientation: UIImageOrientation): CGImagePropertyOrientation; static framesFromAnimatedImage(animatedImage: UIImage): NSArray<SDImageFrame>; static imageOrientationFromEXIFOrientation(exifOrientation: CGImagePropertyOrientation): UIImageOrientation; static new(): SDImageCoderHelper; // inherited from NSObject static defaultScaleDownLimitBytes: number; } declare let SDImageCoderWebImageContext: string; declare class SDImageCodersManager extends NSObject implements SDImageCoder { static alloc(): SDImageCodersManager; // inherited from NSObject static new(): SDImageCodersManager; // inherited from NSObject coders: NSArray<SDImageCoder>; static readonly sharedManager: SDImageCodersManager; 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 addCoder(coder: SDImageCoder): void; canDecodeFromData(data: NSData): boolean; canEncodeToFormat(format: number): boolean; class(): typeof NSObject; conformsToProtocol(aProtocol: any /* Protocol */): boolean; decodedImageWithDataOptions(data: NSData, options: NSDictionary<string, any>): UIImage; encodedDataWithImageFormatOptions(image: UIImage, format: number, options: NSDictionary<string, any>): NSData; 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; removeCoder(coder: SDImageCoder): void; respondsToSelector(aSelector: string): boolean; retainCount(): number; self(): this; } declare class SDImageCroppingTransformer extends NSObject implements SDImageTransformer { static alloc(): SDImageCroppingTransformer; // inherited from NSObject static new(): SDImageCroppingTransformer; // inherited from NSObject static transformerWithRect(rect: CGRect): SDImageCroppingTransformer; readonly rect: CGRect; 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 transformerKey: string; // inherited from SDImageTransformer 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; transformedImageWithImageForKey(image: UIImage, key: string): UIImage; } declare class SDImageFilterTransformer extends NSObject implements SDImageTransformer { static alloc(): SDImageFilterTransformer; // inherited from NSObject static new(): SDImageFilterTransformer; // inherited from NSObject static transformerWithFilter(filter: CIFilter): SDImageFilterTransformer; readonly filter: CIFilter; 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 transformerKey: string; // inherited from SDImageTransformer 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; transformedImageWithImageForKey(image: UIImage, key: string): UIImage; } declare class SDImageFlippingTransformer extends NSObject implements SDImageTransformer { static alloc(): SDImageFlippingTransformer; // inherited from NSObject static new(): SDImageFlippingTransformer; // inherited from NSObject static transformerWithHorizontalVertical(horizontal: boolean, vertical: boolean): SDImageFlippingTransformer; readonly horizontal: boolean; readonly vertical: 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 readonly superclass: typeof NSObject; // inherited from NSObjectProtocol readonly transformerKey: string; // inherited from SDImageTransformer 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; transformedImageWithImageForKey(image: UIImage, key: string): UIImage; } declare let SDImageFormatGIF: number; declare let SDImageFormatHEIC: number; declare let SDImageFormatHEIF: number; declare let SDImageFormatJPEG: number; declare let SDImageFormatPDF: number; declare let SDImageFormatPNG: number; declare let SDImageFormatSVG: number; declare let SDImageFormatTIFF: number; declare let SDImageFormatUndefined: number; declare let SDImageFormatWebP: number; declare class SDImageFrame extends NSObject { static alloc(): SDImageFrame; // inherited from NSObject static frameWithImageDuration(image: UIImage, duration: number): SDImageFrame; static new(): SDImageFrame; // inherited from NSObject readonly duration: number; readonly image: UIImage; } declare class SDImageGIFCoder extends SDImageIOAnimatedCoder implements SDAnimatedImageCoder, SDProgressiveImageCoder { static alloc(): SDImageGIFCoder; // inherited from NSObject static new(): SDImageGIFCoder; // inherited from NSObject static readonly sharedCoder: SDImageGIFCoder; readonly animatedImageData: NSData; // inherited from SDAnimatedImageProvider readonly animatedImageFrameCount: number; // inherited from SDAnimatedImageProvider readonly animatedImageLoopCount: number; // inherited from SDAnimatedImageProvider 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 constructor(o: { incrementalWithOptions: NSDictionary<string, any> }); // inherited from SDProgressiveImageCoder constructor(o: { animatedImageData: NSData; options: NSDictionary<string, any> }); // inherited from SDAnimatedImageCoder animatedImageDurationAtIndex(index: number): number; animatedImageFrameAtIndex(index: number): UIImage; canDecodeFromData(data: NSData): boolean; canEncodeToFormat(format: number): boolean; canIncrementalDecodeFromData(data: NSData): boolean; class(): typeof NSObject; conformsToProtocol(aProtocol: any /* Protocol */): boolean; decodedImageWithDataOptions(data: NSData, options: NSDictionary<string, any>): UIImage; encodedDataWithImageFormatOptions(image: UIImage, format: number, options: NSDictionary<string, any>): NSData; incrementalDecodedImageWithOptions(options: NSDictionary<string, any>): UIImage; initIncrementalWithOptions(options: NSDictionary<string, any>): this; initWithAnimatedImageDataOptions(data: NSData, options: NSDictionary<string, any>): 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; updateIncrementalDataFinished(data: NSData, finished: boolean): void; } declare class SDImageHEICCoder extends SDImageIOAnimatedCoder implements SDAnimatedImageCoder, SDProgressiveImageCoder { static alloc(): SDImageHEICCoder; // inherited from NSObject static new(): SDImageHEICCoder; // inherited from NSObject static readonly sharedCoder: SDImageHEICCoder; readonly animatedImageData: NSData; // inherited from SDAnimatedImageProvider readonly animatedImageFrameCount: number; // inherited from SDAnimatedImageProvider readonly animatedImageLoopCount: number; // inherited from SDAnimatedImageProvider 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 constructor(o: { incrementalWithOptions: NSDictionary<string, any> }); // inherited from SDProgressiveImageCoder constructor(o: { animatedImageData: NSData; options: NSDictionary<string, any> }); // inherited from SDAnimatedImageCoder animatedImageDurationAtIndex(index: number): number; animatedImageFrameAtIndex(index: number): UIImage; canDecodeFromData(data: NSData): boolean; canEncodeToFormat(format: number): boolean; canIncrementalDecodeFromData(data: NSData): boolean; class(): typeof NSObject; conformsToProtocol(aProtocol: any /* Protocol */): boolean; decodedImageWithDataOptions(data: NSData, options: NSDictionary<string, any>): UIImage; encodedDataWithImageFormatOptions(image: UIImage, format: number, options: NSDictionary<string, any>): NSData; incrementalDecodedImageWithOptions(options: NSDictionary<string, any>): UIImage; initIncrementalWithOptions(options: NSDictionary<string, any>): this; initWithAnimatedImageDataOptions(data: NSData, options: NSDictionary<string, any>): 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; updateIncrementalDataFinished(data: NSData, finished: boolean): void; } declare class SDImageIOAnimatedCoder extends NSObject implements SDAnimatedImageCoder, SDProgressiveImageCoder { static alloc(): SDImageIOAnimatedCoder; // inherited from NSObject static new(): SDImageIOAnimatedCoder; // inherited from NSObject static readonly defaultLoopCount: number; static readonly delayTimeProperty: string; static readonly dictionaryProperty: string; static readonly imageFormat: number; static readonly imageUTType: string; static readonly loopCountProperty: string; static readonly unclampedDelayTimeProperty: string; readonly animatedImageData: NSData; // inherited from SDAnimatedImageProvider readonly animatedImageFrameCount: number; // inherited from SDAnimatedImageProvider readonly animatedImageLoopCount: number; // inherited from SDAnimatedImageProvider 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 constructor(o: { incrementalWithOptions: NSDictionary<string, any> }); // inherited from SDProgressiveImageCoder constructor(o: { animatedImageData: NSData; options: NSDictionary<string, any> }); // inherited from SDAnimatedImageCoder animatedImageDurationAtIndex(index: number): number; animatedImageFrameAtIndex(index: number): UIImage; canDecodeFromData(data: NSData): boolean; canEncodeToFormat(format: number): boolean; canIncrementalDecodeFromData(data: NSData): boolean; class(): typeof NSObject; conformsToProtocol(aProtocol: any /* Protocol */): boolean; decodedImageWithDataOptions(data: NSData, options: NSDictionary<string, any>): UIImage; encodedDataWithImageFormatOptions(image: UIImage, format: number, options: NSDictionary<string, any>): NSData; incrementalDecodedImageWithOptions(options: NSDictionary<string, any>): UIImage; initIncrementalWithOptions(options: NSDictionary<string, any>): this; initWithAnimatedImageDataOptions(data: NSData, options: NSDictionary<string, any>): 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; updateIncrementalDataFinished(data: NSData, finished: boolean): void; } declare class SDImageIOCoder extends NSObject implements SDProgressiveImageCoder { static alloc(): SDImageIOCoder; // inherited from NSObject static new(): SDImageIOCoder; // inherited from NSObject static readonly sharedCoder: SDImageIOCoder; 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 constructor(o: { incrementalWithOptions: NSDictionary<string, any> }); // inherited from SDProgressiveImageCoder canDecodeFromData(data: NSData): boolean; canEncodeToFormat(format: number): boolean; canIncrementalDecodeFromData(data: NSData): boolean; class(): typeof NSObject; conformsToProtocol(aProtocol: any /* Protocol */): boolean; decodedImageWithDataOptions(data: NSData, options: NSDictionary<string, any>): UIImage; encodedDataWithImageFormatOptions(image: UIImage, format: number, options: NSDictionary<string, any>): NSData; incrementalDecodedImageWithOptions(options: NSDictionary<string, any>): UIImage; initIncrementalWithOptions(options: NSDictionary<string, any>): 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; updateIncrementalDataFinished(data: NSData, finished: boolean): void; } interface SDImageLoader extends NSObjectProtocol { canRequestImageForURL(url: NSURL): boolean; requestImageWithURLOptionsContextProgressCompleted(url: NSURL, options: SDWebImageOptions, context: NSDictionary<string, any>, progressBlock: (p1: number, p2: number, p3: NSURL) => void, completedBlock: (p1: UIImage, p2: NSData, p3: NSError, p4: boolean) => void): SDWebImageOperation; shouldBlockFailedURLWithURLError(url: NSURL, error: NSError): boolean; } declare var SDImageLoader: { prototype: SDImageLoader; }; declare function SDImageLoaderDecodeImageData(imageData: NSData, imageURL: NSURL, options: SDWebImageOptions, context: NSDictionary<string, any>): UIImage; declare function SDImageLoaderDecodeProgressiveImageData(imageData: NSData, imageURL: NSURL, finished: boolean, operation: SDWebImageOperation, options: SDWebImageOptions, context: NSDictionary<string, any>): UIImage; declare class SDImageLoadersManager extends NSObject implements SDImageLoader { static alloc(): SDImageLoadersManager; // inherited from NSObject static new(): SDImageLoadersManager; // inherited from NSObject loaders: NSArray<SDImageLoader>; static readonly sharedManager: SDImageLoadersManager; 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 addLoader(loader: SDImageLoader): void; canRequestImageForURL(url: NSURL): boolean; 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; removeLoader(loader: SDImageLoader): void; requestImageWithURLOptionsContextProgressCompleted(url: NSURL, options: SDWebImageOptions, context: NSDictionary<string, any>, progressBlock: (p1: number, p2: number, p3: NSURL) => void, completedBlock: (p1: UIImage, p2: NSData, p3: NSError, p4: boolean) => void): SDWebImageOperation; respondsToSelector(aSelector: string): boolean; retainCount(): number; self(): this; shouldBlockFailedURLWithURLError(url: NSURL, error: NSError): boolean; } declare class SDImagePipelineTransformer extends NSObject implements SDImageTransformer { static alloc(): SDImagePipelineTransformer; // inherited from NSObject static new(): SDImagePipelineTransformer; // inherited from NSObject static transformerWithTransformers(transformers: NSArray<SDImageTransformer> | SDImageTransformer[]): SDImagePipelineTransformer; readonly transformers: NSArray<SDImageTransformer>; readonly debugDescription: string; // inherited from NSObjectProtocol readonly description: string; // inherited from NSObjectProtocol readonly hash: number; // inherited from NS