import type { NobjcObject } from "objc-js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSBundle } from "../Foundation/NSBundle.js";
import type { _NSCoder } from "../Foundation/NSCoder.js";
import type { _NSCopying } from "../Foundation/NSCopying.js";
import type { _NSData } from "../Foundation/NSData.js";
import type { _NSDictionary } from "../Foundation/NSDictionary.js";
import type { _NSItemProviderReading } from "../Foundation/NSItemProviderReading.js";
import type { _NSItemProviderWriting } from "../Foundation/NSItemProviderWriting.js";
import type { _NSLocale } from "../Foundation/NSLocale.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { _NSURL } from "../Foundation/NSURL.js";
import type { _NSColor } from "./NSColor.js";
import type { _NSGraphicsContext } from "./NSGraphicsContext.js";
import type { _NSImageDelegate } from "./NSImageDelegate.js";
import type { _NSImageRep } from "./NSImageRep.js";
import type { _NSImageSymbolConfiguration } from "./NSImageSymbolConfiguration.js";
import type { _NSPasteboard } from "./NSPasteboard.js";
import type { _NSPasteboardReading } from "./NSPasteboardReading.js";
import type { _NSPasteboardWriting } from "./NSPasteboardWriting.js";
import type { CGPoint } from "../structs/CGPoint.js";
import type { CGRect } from "../structs/CGRect.js";
import type { CGSize } from "../structs/CGSize.js";
import type { NSEdgeInsets } from "../structs/NSEdgeInsets.js";
import type { NSCompositingOperation } from "./NSCompositingOperation.js";
import type { NSImageCacheMode } from "./NSImageCacheMode.js";
import type { NSImageResizingMode } from "./NSImageResizingMode.js";
import type { NSTIFFCompression } from "./NSTIFFCompression.js";
export declare class _NSImage extends _NSObject {
    static alloc(): _NSImage;
    static new(): _NSImage;
    init(): _NSImage;
    /** If this finds & creates the image, only name is saved when archived */
    static imageNamed$(name: _NSString): _NSImage | null;
    /**
     * Creates a system symbol image with the specified name and value A name from the system’s SF Symbols catalog The image’s accessibility description. This description is used automatically by interface elements that display images. Like all accessibility descriptions, use a short localized string that does not include the name of the interface element. For instance, “delete” rather than “delete button”.
     */
    static imageWithSystemSymbolName$accessibilityDescription$(name: _NSString, description: _NSString | null): _NSImage | null;
    /**
     * Creates a system symbol image with the specified name and value. The argument is only accommodated if the symbol supports variable rendering. A name from the system’s SF Symbols catalog The value represented by the symbol. The value should be between 0 and 1 inclusive ([0,1]). The image’s accessibility description. This description is used automatically by interface elements that display images. Like all accessibility descriptions, use a short localized string that does not include the name of the interface element. For instance, “delete” rather than “delete button”. Values less than 0 or greater than 1 will be clamped to 0 and 1, respectively.
     */
    static imageWithSystemSymbolName$variableValue$accessibilityDescription$(name: _NSString, value: number, description: _NSString | null): _NSImage | null;
    /**
     * Creates a symbol image with the specified name and value. The argument is only accommodated if the symbol supports variable rendering. A name of a symbol image file in the main bundle’s catalog The value represented by the symbol. The value should be between 0 and 1 inclusive ([0,1]). Values less than 0 or greater than 1 will be clamped to 0 and 1, respectively.
     */
    static imageWithSymbolName$variableValue$(name: _NSString, value: number): _NSImage | null;
    /**
     * Creates a symbol image with the specified name and value. The argument is only accommodated if the symbol supports variable rendering. A name of a symbol image file in the main bundle’s catalog The bundle containing the image file or asset catalog. Specify `nil` to search the app’s main bundle. The value represented by the symbol. The value should be between 0 and 1 inclusive ([0,1]). Values less than 0 or greater than 1 will be clamped to 0 and 1, respectively.
     */
    static imageWithSymbolName$bundle$variableValue$(name: _NSString, bundle: _NSBundle | null, value: number): _NSImage | null;
    /**
     * Note that the block passed to the below method may be invoked whenever and on whatever thread the image itself is drawn on. Care should be taken to ensure that all state accessed within the drawingHandler block is done so in a thread safe manner.
     */
    static imageWithSize$flipped$drawingHandler$(size: CGSize, drawingHandlerShouldBeCalledWithFlippedContext: boolean, drawingHandler: (dstRect: CGRect) => boolean): _NSImage;
    static canInitWithPasteboard$(pasteboard: _NSPasteboard): boolean;
    /**
     * These return union of all the types registered with NSImageRep.
     * @deprecated Use +imageUnfilteredTypes instead
     */
    static imageUnfilteredFileTypes(): _NSArray;
    /** @deprecated Use +imageUnfilteredTypes instead */
    static imageUnfilteredPasteboardTypes(): _NSArray;
    /** @deprecated Use +imageTypes instead */
    static imageFileTypes(): _NSArray;
    /** @deprecated Use +imageTypes instead */
    static imagePasteboardTypes(): _NSArray;
    static imageTypes(): _NSArray;
    static imageUnfilteredTypes(): _NSArray;
    initWithSize$(size: CGSize): _NSImage;
    initWithCoder$(coder: _NSCoder): _NSImage;
    /** When archived, saves contents */
    initWithData$(data: _NSData): _NSImage | null;
    /** When archived, saves contents */
    initWithContentsOfFile$(fileName: _NSString): _NSImage | null;
    /** When archived, saves contents */
    initWithContentsOfURL$(url: _NSURL): _NSImage | null;
    /** When archived, saves fileName */
    initByReferencingFile$(fileName: _NSString): _NSImage | null;
    /** When archived, saves url, supports progressive loading */
    initByReferencingURL$(url: _NSURL): _NSImage;
    /**
     * - (instancetype)initByReferencingURL:(NSURL *)url; When archived, saves url, supports progressive loading
     */
    initWithPasteboard$(pasteboard: _NSPasteboard): _NSImage | null;
    /**
     * not for general use, but useful for compatibility with old NSImage behavior. Ignore exif orientation tags in JPEG and such. See AppKit release notes.
     */
    initWithDataIgnoringOrientation$(data: _NSData): _NSImage | null;
    setName$(string_: _NSString | null): boolean;
    name(): _NSString | null;
    drawAtPoint$fromRect$operation$fraction$(point: CGPoint, fromRect: CGRect, op: NSCompositingOperation, delta: number): void;
    drawInRect$fromRect$operation$fraction$(rect: CGRect, fromRect: CGRect, op: NSCompositingOperation, delta: number): void;
    drawInRect$fromRect$operation$fraction$respectFlipped$hints$(dstSpacePortionRect: CGRect, srcSpacePortionRect: CGRect, op: NSCompositingOperation, requestedAlpha: number, respectContextIsFlipped: boolean, hints: _NSDictionary | null): void;
    drawRepresentation$inRect$(imageRep: _NSImageRep, rect: CGRect): boolean;
    /**
     * This is exactly equivalent to calling -[image drawInRect:rect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1 respectFlipped:YES hints:nil].
     */
    drawInRect$(rect: CGRect): void;
    recache(): void;
    TIFFRepresentationUsingCompression$factor$(comp: NSTIFFCompression, factor: number): _NSData | null;
    addRepresentations$(imageReps: _NSArray): void;
    addRepresentation$(imageRep: _NSImageRep): void;
    removeRepresentation$(imageRep: _NSImageRep): void;
    /**
     * Make an NSImage referencing a CGImage. The client should not assume anything about the image, other than that drawing it is equivalent to drawing the CGImage. If size is NSZeroSize, the pixel dimensions of cgImage are the returned image's size. This is not a designated initializer. Size of an NSImage is distinct from pixel dimensions. If an NSImage is placed in an NSButton, it will be drawn in a rect with the provided size in the ambient coordinate system.
     */
    initWithCGImage$size$(cgImage: Uint8Array, size: CGSize): _NSImage;
    /**
     * Returns a CGImage capturing the drawing of the receiver. This method returns an existing CGImage if one is available, or creates one if not. It behaves the same as drawing the image with respect to caching and related behaviors. This method is typically called, not overridden. An NSImage is potentially resolution independent, and may have representations that allow it to draw well in many contexts. A CGImage is more like a single pixel-based representation. This method produces a snapshot of how the NSImage would draw if it was asked to draw in *proposedDestRect in the passed context. Producing this snapshot may be more expensive than just drawing the NSImage, so prefer to use -[NSImage drawInRect:fromRect:operation:fraction:] unless you require a CGImage. The return value in *proposedDestRect tells the client where to draw the CGImage. This rect may be outset from the requested rect, because a CGImage must have pixel-integral dimensions while an NSImage need not. All input parameters are optional. They provide hints for how to choose among existing CGImages, or how to create one if there isn't already a CGImage available. The parameters are _only_ hints. Any CGImage is a valid return. If proposedDestRect is NULL, it defaults to the smallest pixel-integral rectangle containing {{0,0}, [self size]}. The proposedDestRect is in user space in the reference context. If referenceContext is nil, the method behaves as if a window context scaled by the default user space scaling factor was passed, though no context is actually created. The properties of the context are used as hints for choosing the best representation and for creating a CGImage if creation is necessary. It also provides the coordinate space in which the proposedDestRect is interpreted. Only the snapshotted state of the context at the moment its passed to this method is relevant. Future changes to the context have no bearing on image behavior. The hints provide more context for selecting or generating a CGImage, and may override properties of the referenceContext. Hints may be nil. Any entries in a device description dictionary (see NSScreen) are valid, as are all CIContext creation options, plus a few extra hints defined below. Unrecognized hints are ignored, but passed down to image reps (see -[NSImageRep CGImageForProposedRect:context:hints:]). Explicit hints are particularly useful when it is not draw time and you don't have a context to pass in. For example, if you want to pass a rect in pixels for proposedDestRect, you should pass a dictionary with the identity transform for NSImageHintCTM. This method will always return a valid CGImage provided the NSImage is able to draw. If the receiver is unable to draw for whatever reason, the error behavior is the same as when drawing the image. The CGImageRef returned is guaranteed to live as long as the current autorelease pool. The caller should not release the CGImage. This is the standard Cocoa convention, but people may not realize that it applies to CFTypes.
     */
    CGImageForProposedRect$context$hints$(proposedDestRect: NobjcObject | null, referenceContext: _NSGraphicsContext | null, hints: _NSDictionary | null): NobjcObject;
    /**
     * Select best representation. The parameters have the same meaning and behavior as in -CGImageForProposedRect:context:hints:.
     */
    bestRepresentationForRect$context$hints$(rect: CGRect, referenceContext: _NSGraphicsContext | null, hints: _NSDictionary | null): _NSImageRep | null;
    /**
     * Answers the question, "If you were to draw the image in the passed destination rect in the passed context respecting the passed flippedness with the passed hints, would the test rect in the context intersect a non-transparent portion of the image?"
     */
    hitTestRect$withImageDestinationRect$context$hints$flipped$(testRectDestSpace: CGRect, imageRectDestSpace: CGRect, context: _NSGraphicsContext | null, hints: _NSDictionary | null, flipped: boolean): boolean;
    recommendedLayerContentsScale$(preferredContentsScale: number): number;
    layerContentsForContentsScale$(layerContentsScale: number): NobjcObject;
    imageWithSymbolConfiguration$(configuration: _NSImageSymbolConfiguration): _NSImage | null;
    /**
     * Creates and returns a new image with the specified locale. If the receiver contains locale-sensitive representations, the returned image will prefer to draw using representations appropriate for the specified locale. If locale is `nil`, the returned image uses the default behavior of choosing representations appropriate for the system’s currently-configured locale.
     */
    imageWithLocale$(locale: _NSLocale | null): _NSImage;
    /**
     * @deprecated Use -[NSWorkspace iconForFile:], -[NSWorkspace iconForFiles:], -[NSWorkspace iconForFileType:], or +[NSImage imageNamed:] instead.
     */
    initWithIconRef$(iconRef: NobjcObject): _NSImage;
    /**
     * @deprecated Use -[NSImage bestRepresentationForRect:context:hints:] instead.  Any deviceDescription dictionary is also a valid hints dictionary.
     */
    bestRepresentationForDevice$(deviceDescription: _NSDictionary): _NSImageRep;
    /**
     * @deprecated This method is incompatible with resolution-independent drawing and should not be used. Instead, use +[NSImage imageWithSize:flipped:drawingHandler:] to create a block-based image describing the desired image drawing, or use +[NSGraphicsContext graphicsContextWithBitmapImageRep:] to manipulate specific bitmap image representations.
     */
    lockFocus(): void;
    /**
     * @deprecated This method is incompatible with resolution-independent drawing and should not be used. Instead, use +[NSImage imageWithSize:flipped:drawingHandler:] to create a block-based image describing the desired image drawing, or use +[NSGraphicsContext graphicsContextWithBitmapImageRep:] to manipulate specific bitmap image representations.
     */
    lockFocusFlipped$(flipped: boolean): void;
    /**
     * @deprecated This method is incompatible with resolution-independent drawing and should not be used. Instead, use +[NSImage imageWithSize:flipped:drawingHandler:] to create a block-based image describing the desired image drawing, or use +[NSGraphicsContext graphicsContextWithBitmapImageRep:] to manipulate specific bitmap image representations.
     */
    unlockFocus(): void;
    /**
     * @deprecated The concept of flippedness for NSImage is deprecated.  Please see the AppKit 10.6 release notes for a discussion of why and for how to replace existing usage.
     */
    setFlipped$(flag: boolean): void;
    /**
     * @deprecated The concept of flippedness for NSImage is deprecated.  Please see the AppKit 10.6 release notes for a discussion of why and for how to replace existing usage.
     */
    isFlipped(): boolean;
    /**
     * @deprecated You should be able to remove use of this method without any replacement.  See 10.6 AppKit release notes for details.
     */
    setScalesWhenResized$(flag: boolean): void;
    /**
     * @deprecated You should be able to remove use of this method without any replacement.  See 10.6 AppKit release notes for details.
     */
    scalesWhenResized(): boolean;
    /**
     * @deprecated You should be able to remove use of this method without any replacement.  See 10.6 AppKit release notes for details.
     */
    setDataRetained$(flag: boolean): void;
    /**
     * @deprecated You should be able to remove use of this method without any replacement.  See 10.6 AppKit release notes for details.
     */
    isDataRetained(): boolean;
    /**
     * @deprecated You should be able to remove use of this method without any replacement.  See 10.6 AppKit release notes for details.
     */
    setCachedSeparately$(flag: boolean): void;
    /**
     * @deprecated You should be able to remove use of this method without any replacement.  See 10.6 AppKit release notes for details.
     */
    isCachedSeparately(): boolean;
    /**
     * @deprecated You should be able to remove use of this method without any replacement.  See 10.6 AppKit release notes for details.
     */
    setCacheDepthMatchesImageDepth$(flag: boolean): void;
    /**
     * @deprecated You should be able to remove use of this method without any replacement.  See 10.6 AppKit release notes for details.
     */
    cacheDepthMatchesImageDepth(): boolean;
    /**
     * These methods have surprising semantics. Prefer to use the 'draw' methods (and note the new draw method taking respectContextIsFlipped as a parameter). Please see the AppKit 10.6 release notes for exactly what's going on.
     * @deprecated Use -drawAtPoint:... or -drawInRect:... methods instead
     */
    dissolveToPoint$fraction$(point: CGPoint, fraction: number): void;
    /** @deprecated Use -drawAtPoint:... or -drawInRect:... methods instead */
    dissolveToPoint$fromRect$fraction$(point: CGPoint, rect: CGRect, fraction: number): void;
    /** @deprecated Use -drawAtPoint:... or -drawInRect:... methods instead */
    compositeToPoint$operation$(point: CGPoint, operation: NSCompositingOperation): void;
    /** @deprecated Use -drawAtPoint:... or -drawInRect:... methods instead */
    compositeToPoint$fromRect$operation$(point: CGPoint, rect: CGRect, operation: NSCompositingOperation): void;
    /** @deprecated Use -drawAtPoint:... or -drawInRect:... methods instead */
    compositeToPoint$operation$fraction$(point: CGPoint, operation: NSCompositingOperation, fraction: number): void;
    /** @deprecated Use -drawAtPoint:... or -drawInRect:... methods instead */
    compositeToPoint$fromRect$operation$fraction$(point: CGPoint, rect: CGRect, operation: NSCompositingOperation, fraction: number): void;
    /**
     * This method doesn't do what people expect. See AppKit 10.6 release notes. Briefly, you can replace invocation of this method with code that locks focus on the image and then draws the rep in the image.
     * @deprecated Create an image using +[NSImage imageWithSize:flipped:drawingHandler:], and begin your custom drawing with -[NSImageRep drawInRect:] instead.
     */
    lockFocusOnRepresentation$(imageRepresentation: _NSImageRep): void;
    /** @deprecated This method does not perform any operation on 10.4 or later. */
    cancelIncrementalLoad(): void;
    size(): CGSize;
    setSize$(value: CGSize): void;
    backgroundColor(): _NSColor;
    setBackgroundColor$(value: _NSColor): void;
    usesEPSOnResolutionMismatch(): boolean;
    setUsesEPSOnResolutionMismatch$(value: boolean): void;
    prefersColorMatch(): boolean;
    setPrefersColorMatch$(value: boolean): void;
    matchesOnMultipleResolution(): boolean;
    setMatchesOnMultipleResolution$(value: boolean): void;
    /** Available in MacOSX 10.7.4 // Available in MacOSX 10.7.4 */
    matchesOnlyOnBestFittingAxis(): boolean;
    setMatchesOnlyOnBestFittingAxis$(value: boolean): void;
    TIFFRepresentation(): _NSData | null;
    representations(): _NSArray;
    valid(): boolean;
    delegate(): _NSImageDelegate | null;
    setDelegate$(value: _NSImageDelegate | null): void;
    cacheMode(): NSImageCacheMode;
    setCacheMode$(value: NSImageCacheMode): void;
    /**
     * The alignmentRect of an image is metadata that a client may use to help determine layout. The bottom of the rect gives the baseline of the image. The other edges give similar information in other directions. A 20x20 image of a phone icon with a glow might specify an alignmentRect of {{2,2},{16,16}} that excludes the glow. NSButtonCell can take advantage of the alignmentRect to place the image in the same visual location as an 16x16 phone icon without the glow. A 5x5 star that should render high when aligned with text might specify a rect of {{0,-7},{5,12}}. The alignmentRect of an image has no effect on methods such as drawInRect:fromRect:operation:Fraction: or drawAtPoint:fromRect:operation:fraction:. It is the client's responsibility to take the alignmentRect into account where applicable. The default alignmentRect of an image is {{0,0},imageSize}. The rect is adjusted when setSize: is called.
     */
    alignmentRect(): CGRect;
    setAlignmentRect$(value: CGRect): void;
    template(): boolean;
    setTemplate$(value: boolean): void;
    /**
     * An accessibility description can be set on an image. This description will be used automatically by interface elements that display images. Like all accessibility descriptions, the string should be a short localized string that does not include the name of the interface element. For instance, "delete" rather than "delete button".
     */
    accessibilityDescription(): _NSString;
    setAccessibilityDescription$(value: _NSString): void;
    capInsets(): NSEdgeInsets;
    setCapInsets$(value: NSEdgeInsets): void;
    resizingMode(): NSImageResizingMode;
    setResizingMode$(value: NSImageResizingMode): void;
    symbolConfiguration(): _NSImageSymbolConfiguration;
    /**
     * The image’s preferred locale for resolving representations, if one has been specified using `-imageWithLocale:`. Otherwise, `nil`.
     */
    locale(): _NSLocale;
}
export interface _NSImage extends _NSCopying, _NSPasteboardReading, _NSPasteboardWriting, _NSItemProviderReading, _NSItemProviderWriting {
}
