use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
#[cfg(feature = "objc2-core-graphics")]
#[cfg(target_vendor = "apple")]
use objc2_core_graphics::*;
use objc2_foundation::*;
use crate::*;
pub type NSImageName = NSString;
extern "C" {
#[cfg(feature = "NSImageRep")]
pub static NSImageHintCTM: &'static NSImageHintKey;
}
extern "C" {
#[cfg(feature = "NSImageRep")]
pub static NSImageHintInterpolation: &'static NSImageHintKey;
}
extern "C" {
#[cfg(feature = "NSImageRep")]
pub static NSImageHintUserInterfaceLayoutDirection: &'static NSImageHintKey;
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSImageLoadStatus(pub NSUInteger);
impl NSImageLoadStatus {
#[doc(alias = "NSImageLoadStatusCompleted")]
pub const Completed: Self = Self(0);
#[doc(alias = "NSImageLoadStatusCancelled")]
pub const Cancelled: Self = Self(1);
#[doc(alias = "NSImageLoadStatusInvalidData")]
pub const InvalidData: Self = Self(2);
#[doc(alias = "NSImageLoadStatusUnexpectedEOF")]
pub const UnexpectedEOF: Self = Self(3);
#[doc(alias = "NSImageLoadStatusReadError")]
pub const ReadError: Self = Self(4);
}
unsafe impl Encode for NSImageLoadStatus {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSImageLoadStatus {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSImageCacheMode(pub NSUInteger);
impl NSImageCacheMode {
#[doc(alias = "NSImageCacheDefault")]
pub const Default: Self = Self(0);
#[doc(alias = "NSImageCacheAlways")]
pub const Always: Self = Self(1);
#[doc(alias = "NSImageCacheBySize")]
pub const BySize: Self = Self(2);
#[doc(alias = "NSImageCacheNever")]
pub const Never: Self = Self(3);
}
unsafe impl Encode for NSImageCacheMode {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSImageCacheMode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSImageResizingMode(pub NSInteger);
impl NSImageResizingMode {}
unsafe impl Encode for NSImageResizingMode {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for NSImageResizingMode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSImage;
);
extern_conformance!(
unsafe impl NSObjectProtocol for NSImage {}
);
impl NSImage {
extern_methods!(
#[unsafe(method(imageNamed:))]
#[unsafe(method_family = none)]
pub fn imageNamed(name: &NSImageName) -> Option<Retained<NSImage>>;
#[unsafe(method(imageWithSystemSymbolName:accessibilityDescription:))]
#[unsafe(method_family = none)]
pub fn imageWithSystemSymbolName_accessibilityDescription(
name: &NSString,
description: Option<&NSString>,
) -> Option<Retained<Self>>;
#[unsafe(method(imageWithSystemSymbolName:variableValue:accessibilityDescription:))]
#[unsafe(method_family = none)]
pub fn imageWithSystemSymbolName_variableValue_accessibilityDescription(
name: &NSString,
value: c_double,
description: Option<&NSString>,
) -> Option<Retained<Self>>;
#[unsafe(method(imageWithSymbolName:variableValue:))]
#[unsafe(method_family = none)]
pub fn imageWithSymbolName_variableValue(
name: &NSString,
value: c_double,
) -> Option<Retained<Self>>;
#[unsafe(method(imageWithSymbolName:bundle:variableValue:))]
#[unsafe(method_family = none)]
pub fn imageWithSymbolName_bundle_variableValue(
name: &NSString,
bundle: Option<&NSBundle>,
value: c_double,
) -> Option<Retained<Self>>;
#[unsafe(method(initWithSize:))]
#[unsafe(method_family = init)]
pub fn initWithSize(this: Allocated<Self>, size: NSSize) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
#[unsafe(method(initWithData:))]
#[unsafe(method_family = init)]
pub fn initWithData(this: Allocated<Self>, data: &NSData) -> Option<Retained<Self>>;
#[unsafe(method(initWithContentsOfFile:))]
#[unsafe(method_family = init)]
pub fn initWithContentsOfFile(
this: Allocated<Self>,
file_name: &NSString,
) -> Option<Retained<Self>>;
#[unsafe(method(initWithContentsOfURL:))]
#[unsafe(method_family = init)]
pub fn initWithContentsOfURL(this: Allocated<Self>, url: &NSURL) -> Option<Retained<Self>>;
#[unsafe(method(initByReferencingFile:))]
#[unsafe(method_family = init)]
pub fn initByReferencingFile(
this: Allocated<Self>,
file_name: &NSString,
) -> Option<Retained<Self>>;
#[unsafe(method(initByReferencingURL:))]
#[unsafe(method_family = init)]
pub fn initByReferencingURL(this: Allocated<Self>, url: &NSURL) -> Retained<Self>;
#[cfg(feature = "NSPasteboard")]
#[unsafe(method(initWithPasteboard:))]
#[unsafe(method_family = init)]
pub fn initWithPasteboard(
this: Allocated<Self>,
pasteboard: &NSPasteboard,
) -> Option<Retained<Self>>;
#[unsafe(method(initWithDataIgnoringOrientation:))]
#[unsafe(method_family = init)]
pub fn initWithDataIgnoringOrientation(
this: Allocated<Self>,
data: &NSData,
) -> Option<Retained<Self>>;
#[cfg(feature = "block2")]
#[unsafe(method(imageWithSize:flipped:drawingHandler:))]
#[unsafe(method_family = none)]
pub fn imageWithSize_flipped_drawingHandler(
size: NSSize,
drawing_handler_should_be_called_with_flipped_context: bool,
drawing_handler: &block2::DynBlock<dyn Fn(NSRect) -> Bool>,
) -> Retained<Self>;
#[unsafe(method(size))]
#[unsafe(method_family = none)]
pub fn size(&self) -> NSSize;
#[unsafe(method(setSize:))]
#[unsafe(method_family = none)]
pub fn setSize(&self, size: NSSize);
#[unsafe(method(setName:))]
#[unsafe(method_family = none)]
pub fn setName(&self, string: Option<&NSImageName>) -> bool;
#[unsafe(method(name))]
#[unsafe(method_family = none)]
pub fn name(&self) -> Option<Retained<NSImageName>>;
#[cfg(feature = "NSColor")]
#[unsafe(method(backgroundColor))]
#[unsafe(method_family = none)]
pub fn backgroundColor(&self) -> Retained<NSColor>;
#[cfg(feature = "NSColor")]
#[unsafe(method(setBackgroundColor:))]
#[unsafe(method_family = none)]
pub fn setBackgroundColor(&self, background_color: &NSColor);
#[unsafe(method(usesEPSOnResolutionMismatch))]
#[unsafe(method_family = none)]
pub fn usesEPSOnResolutionMismatch(&self) -> bool;
#[unsafe(method(setUsesEPSOnResolutionMismatch:))]
#[unsafe(method_family = none)]
pub fn setUsesEPSOnResolutionMismatch(&self, uses_eps_on_resolution_mismatch: bool);
#[unsafe(method(prefersColorMatch))]
#[unsafe(method_family = none)]
pub fn prefersColorMatch(&self) -> bool;
#[unsafe(method(setPrefersColorMatch:))]
#[unsafe(method_family = none)]
pub fn setPrefersColorMatch(&self, prefers_color_match: bool);
#[unsafe(method(matchesOnMultipleResolution))]
#[unsafe(method_family = none)]
pub fn matchesOnMultipleResolution(&self) -> bool;
#[unsafe(method(setMatchesOnMultipleResolution:))]
#[unsafe(method_family = none)]
pub fn setMatchesOnMultipleResolution(&self, matches_on_multiple_resolution: bool);
#[unsafe(method(matchesOnlyOnBestFittingAxis))]
#[unsafe(method_family = none)]
pub fn matchesOnlyOnBestFittingAxis(&self) -> bool;
#[unsafe(method(setMatchesOnlyOnBestFittingAxis:))]
#[unsafe(method_family = none)]
pub fn setMatchesOnlyOnBestFittingAxis(&self, matches_only_on_best_fitting_axis: bool);
#[cfg(all(feature = "NSGraphics", feature = "objc2-core-foundation"))]
#[unsafe(method(drawAtPoint:fromRect:operation:fraction:))]
#[unsafe(method_family = none)]
pub fn drawAtPoint_fromRect_operation_fraction(
&self,
point: NSPoint,
from_rect: NSRect,
op: NSCompositingOperation,
delta: CGFloat,
);
#[cfg(all(feature = "NSGraphics", feature = "objc2-core-foundation"))]
#[unsafe(method(drawInRect:fromRect:operation:fraction:))]
#[unsafe(method_family = none)]
pub fn drawInRect_fromRect_operation_fraction(
&self,
rect: NSRect,
from_rect: NSRect,
op: NSCompositingOperation,
delta: CGFloat,
);
#[cfg(all(
feature = "NSGraphics",
feature = "NSImageRep",
feature = "objc2-core-foundation"
))]
#[unsafe(method(drawInRect:fromRect:operation:fraction:respectFlipped:hints:))]
#[unsafe(method_family = none)]
pub unsafe fn drawInRect_fromRect_operation_fraction_respectFlipped_hints(
&self,
dst_space_portion_rect: NSRect,
src_space_portion_rect: NSRect,
op: NSCompositingOperation,
requested_alpha: CGFloat,
respect_context_is_flipped: bool,
hints: Option<&NSDictionary<NSImageHintKey, AnyObject>>,
);
#[cfg(feature = "NSImageRep")]
#[unsafe(method(drawRepresentation:inRect:))]
#[unsafe(method_family = none)]
pub fn drawRepresentation_inRect(&self, image_rep: &NSImageRep, rect: NSRect) -> bool;
#[unsafe(method(drawInRect:))]
#[unsafe(method_family = none)]
pub fn drawInRect(&self, rect: NSRect);
#[unsafe(method(recache))]
#[unsafe(method_family = none)]
pub fn recache(&self);
#[unsafe(method(TIFFRepresentation))]
#[unsafe(method_family = none)]
pub fn TIFFRepresentation(&self) -> Option<Retained<NSData>>;
#[cfg(feature = "NSBitmapImageRep")]
#[unsafe(method(TIFFRepresentationUsingCompression:factor:))]
#[unsafe(method_family = none)]
pub fn TIFFRepresentationUsingCompression_factor(
&self,
comp: NSTIFFCompression,
factor: c_float,
) -> Option<Retained<NSData>>;
#[cfg(feature = "NSImageRep")]
#[unsafe(method(representations))]
#[unsafe(method_family = none)]
pub fn representations(&self) -> Retained<NSArray<NSImageRep>>;
#[cfg(feature = "NSImageRep")]
#[unsafe(method(addRepresentations:))]
#[unsafe(method_family = none)]
pub fn addRepresentations(&self, image_reps: &NSArray<NSImageRep>);
#[cfg(feature = "NSImageRep")]
#[unsafe(method(addRepresentation:))]
#[unsafe(method_family = none)]
pub fn addRepresentation(&self, image_rep: &NSImageRep);
#[cfg(feature = "NSImageRep")]
#[unsafe(method(removeRepresentation:))]
#[unsafe(method_family = none)]
pub fn removeRepresentation(&self, image_rep: &NSImageRep);
#[unsafe(method(isValid))]
#[unsafe(method_family = none)]
pub fn isValid(&self) -> bool;
#[unsafe(method(delegate))]
#[unsafe(method_family = none)]
pub fn delegate(&self) -> Option<Retained<ProtocolObject<dyn NSImageDelegate>>>;
#[unsafe(method(setDelegate:))]
#[unsafe(method_family = none)]
pub fn setDelegate(&self, delegate: Option<&ProtocolObject<dyn NSImageDelegate>>);
#[unsafe(method(imageTypes))]
#[unsafe(method_family = none)]
pub fn imageTypes() -> Retained<NSArray<NSString>>;
#[unsafe(method(imageUnfilteredTypes))]
#[unsafe(method_family = none)]
pub fn imageUnfilteredTypes() -> Retained<NSArray<NSString>>;
#[cfg(feature = "NSPasteboard")]
#[unsafe(method(canInitWithPasteboard:))]
#[unsafe(method_family = none)]
pub fn canInitWithPasteboard(pasteboard: &NSPasteboard) -> bool;
#[unsafe(method(cacheMode))]
#[unsafe(method_family = none)]
pub fn cacheMode(&self) -> NSImageCacheMode;
#[unsafe(method(setCacheMode:))]
#[unsafe(method_family = none)]
pub fn setCacheMode(&self, cache_mode: NSImageCacheMode);
#[unsafe(method(alignmentRect))]
#[unsafe(method_family = none)]
pub fn alignmentRect(&self) -> NSRect;
#[unsafe(method(setAlignmentRect:))]
#[unsafe(method_family = none)]
pub fn setAlignmentRect(&self, alignment_rect: NSRect);
#[unsafe(method(isTemplate))]
#[unsafe(method_family = none)]
pub fn isTemplate(&self) -> bool;
#[unsafe(method(setTemplate:))]
#[unsafe(method_family = none)]
pub fn setTemplate(&self, template: bool);
#[unsafe(method(accessibilityDescription))]
#[unsafe(method_family = none)]
pub fn accessibilityDescription(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setAccessibilityDescription:))]
#[unsafe(method_family = none)]
pub fn setAccessibilityDescription(&self, accessibility_description: Option<&NSString>);
#[cfg(feature = "objc2-core-graphics")]
#[cfg(target_vendor = "apple")]
#[unsafe(method(initWithCGImage:size:))]
#[unsafe(method_family = init)]
pub fn initWithCGImage_size(
this: Allocated<Self>,
cg_image: &CGImage,
size: NSSize,
) -> Retained<Self>;
#[cfg(all(
feature = "NSGraphicsContext",
feature = "NSImageRep",
feature = "objc2-core-graphics"
))]
#[cfg(target_vendor = "apple")]
#[unsafe(method(CGImageForProposedRect:context:hints:))]
#[unsafe(method_family = none)]
pub unsafe fn CGImageForProposedRect_context_hints(
&self,
proposed_dest_rect: *mut NSRect,
reference_context: Option<&NSGraphicsContext>,
hints: Option<&NSDictionary<NSImageHintKey, AnyObject>>,
) -> Option<Retained<CGImage>>;
#[cfg(all(feature = "NSGraphicsContext", feature = "NSImageRep"))]
#[unsafe(method(bestRepresentationForRect:context:hints:))]
#[unsafe(method_family = none)]
pub unsafe fn bestRepresentationForRect_context_hints(
&self,
rect: NSRect,
reference_context: Option<&NSGraphicsContext>,
hints: Option<&NSDictionary<NSImageHintKey, AnyObject>>,
) -> Option<Retained<NSImageRep>>;
#[cfg(all(feature = "NSGraphicsContext", feature = "NSImageRep"))]
#[unsafe(method(hitTestRect:withImageDestinationRect:context:hints:flipped:))]
#[unsafe(method_family = none)]
pub unsafe fn hitTestRect_withImageDestinationRect_context_hints_flipped(
&self,
test_rect_dest_space: NSRect,
image_rect_dest_space: NSRect,
context: Option<&NSGraphicsContext>,
hints: Option<&NSDictionary<NSImageHintKey, AnyObject>>,
flipped: bool,
) -> bool;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(recommendedLayerContentsScale:))]
#[unsafe(method_family = none)]
pub fn recommendedLayerContentsScale(&self, preferred_contents_scale: CGFloat) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(layerContentsForContentsScale:))]
#[unsafe(method_family = none)]
pub fn layerContentsForContentsScale(
&self,
layer_contents_scale: CGFloat,
) -> Retained<AnyObject>;
#[unsafe(method(capInsets))]
#[unsafe(method_family = none)]
pub fn capInsets(&self) -> NSEdgeInsets;
#[unsafe(method(setCapInsets:))]
#[unsafe(method_family = none)]
pub fn setCapInsets(&self, cap_insets: NSEdgeInsets);
#[unsafe(method(resizingMode))]
#[unsafe(method_family = none)]
pub fn resizingMode(&self) -> NSImageResizingMode;
#[unsafe(method(setResizingMode:))]
#[unsafe(method_family = none)]
pub fn setResizingMode(&self, resizing_mode: NSImageResizingMode);
#[unsafe(method(imageWithSymbolConfiguration:))]
#[unsafe(method_family = none)]
pub fn imageWithSymbolConfiguration(
&self,
configuration: &NSImageSymbolConfiguration,
) -> Option<Retained<NSImage>>;
#[unsafe(method(symbolConfiguration))]
#[unsafe(method_family = none)]
pub fn symbolConfiguration(&self) -> Retained<NSImageSymbolConfiguration>;
#[unsafe(method(imageWithLocale:))]
#[unsafe(method_family = none)]
pub fn imageWithLocale(&self, locale: Option<&NSLocale>) -> Retained<NSImage>;
#[unsafe(method(locale))]
#[unsafe(method_family = none)]
pub fn locale(&self) -> Option<Retained<NSLocale>>;
);
}
impl NSImage {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
impl DefaultRetained for NSImage {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}
impl NSImage {
extern_methods!();
}
extern_conformance!(
unsafe impl NSCopying for NSImage {}
);
unsafe impl CopyingHelper for NSImage {
type Result = Self;
}
#[cfg(feature = "NSPasteboard")]
extern_conformance!(
unsafe impl NSPasteboardReading for NSImage {}
);
#[cfg(feature = "NSPasteboard")]
extern_conformance!(
unsafe impl NSPasteboardWriting for NSImage {}
);
extern_conformance!(
unsafe impl NSSecureCoding for NSImage {}
);
impl NSImage {
extern_methods!();
}
extern_conformance!(
unsafe impl NSItemProviderReading for NSImage {}
);
extern_conformance!(
unsafe impl NSItemProviderWriting for NSImage {}
);
extern_protocol!(
pub unsafe trait NSImageDelegate: NSObjectProtocol {
#[optional]
#[unsafe(method(imageDidNotDraw:inRect:))]
#[unsafe(method_family = none)]
fn imageDidNotDraw_inRect(
&self,
sender: &NSImage,
rect: NSRect,
) -> Option<Retained<NSImage>>;
#[cfg(feature = "NSImageRep")]
#[deprecated = "This method is no longer called on 10.4 or later."]
#[optional]
#[unsafe(method(image:willLoadRepresentation:))]
#[unsafe(method_family = none)]
fn image_willLoadRepresentation(&self, image: &NSImage, rep: &NSImageRep);
#[cfg(feature = "NSImageRep")]
#[deprecated = "This method is no longer called on 10.4 or later."]
#[optional]
#[unsafe(method(image:didLoadRepresentationHeader:))]
#[unsafe(method_family = none)]
fn image_didLoadRepresentationHeader(&self, image: &NSImage, rep: &NSImageRep);
#[cfg(feature = "NSImageRep")]
#[deprecated = "This method is no longer called on 10.4 or later."]
#[optional]
#[unsafe(method(image:didLoadPartOfRepresentation:withValidRows:))]
#[unsafe(method_family = none)]
fn image_didLoadPartOfRepresentation_withValidRows(
&self,
image: &NSImage,
rep: &NSImageRep,
rows: NSInteger,
);
#[cfg(feature = "NSImageRep")]
#[deprecated = "This method is no longer called on 10.4 or later."]
#[optional]
#[unsafe(method(image:didLoadRepresentation:withStatus:))]
#[unsafe(method_family = none)]
fn image_didLoadRepresentation_withStatus(
&self,
image: &NSImage,
rep: &NSImageRep,
status: NSImageLoadStatus,
);
}
);
mod private_NSBundleImageExtension {
pub trait Sealed {}
}
pub unsafe trait NSBundleImageExtension:
ClassType + Sized + private_NSBundleImageExtension::Sealed
{
extern_methods!(
#[unsafe(method(imageForResource:))]
#[unsafe(method_family = none)]
fn imageForResource(&self, name: &NSImageName) -> Option<Retained<NSImage>>;
#[unsafe(method(pathForImageResource:))]
#[unsafe(method_family = none)]
fn pathForImageResource(&self, name: &NSImageName) -> Option<Retained<NSString>>;
#[unsafe(method(URLForImageResource:))]
#[unsafe(method_family = none)]
fn URLForImageResource(&self, name: &NSImageName) -> Option<Retained<NSURL>>;
);
}
impl private_NSBundleImageExtension::Sealed for NSBundle {}
unsafe impl NSBundleImageExtension for NSBundle {}
impl NSImage {
extern_methods!(
#[deprecated = "Use +imageUnfilteredTypes instead"]
#[unsafe(method(imageUnfilteredFileTypes))]
#[unsafe(method_family = none)]
pub fn imageUnfilteredFileTypes() -> Retained<NSArray<NSString>>;
#[cfg(feature = "NSPasteboard")]
#[deprecated = "Use +imageUnfilteredTypes instead"]
#[unsafe(method(imageUnfilteredPasteboardTypes))]
#[unsafe(method_family = none)]
pub fn imageUnfilteredPasteboardTypes() -> Retained<NSArray<NSPasteboardType>>;
#[deprecated = "Use +imageTypes instead"]
#[unsafe(method(imageFileTypes))]
#[unsafe(method_family = none)]
pub fn imageFileTypes() -> Retained<NSArray<NSString>>;
#[cfg(feature = "NSPasteboard")]
#[deprecated = "Use +imageTypes instead"]
#[unsafe(method(imagePasteboardTypes))]
#[unsafe(method_family = none)]
pub fn imagePasteboardTypes() -> Retained<NSArray<NSPasteboardType>>;
#[cfg(feature = "NSImageRep")]
#[deprecated = "Use -[NSImage bestRepresentationForRect:context:hints:] instead. Any deviceDescription dictionary is also a valid hints dictionary."]
#[unsafe(method(bestRepresentationForDevice:))]
#[unsafe(method_family = none)]
pub unsafe fn bestRepresentationForDevice(
&self,
device_description: Option<&NSDictionary>,
) -> Option<Retained<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."]
#[unsafe(method(lockFocus))]
#[unsafe(method_family = none)]
pub fn lockFocus(&self);
#[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."]
#[unsafe(method(lockFocusFlipped:))]
#[unsafe(method_family = none)]
pub fn lockFocusFlipped(&self, flipped: bool);
#[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."]
#[unsafe(method(unlockFocus))]
#[unsafe(method_family = none)]
pub fn unlockFocus(&self);
#[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."]
#[unsafe(method(setFlipped:))]
#[unsafe(method_family = none)]
pub fn setFlipped(&self, flag: bool);
#[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."]
#[unsafe(method(isFlipped))]
#[unsafe(method_family = none)]
pub fn isFlipped(&self) -> bool;
#[deprecated = "You should be able to remove use of this method without any replacement. See 10.6 AppKit release notes for details."]
#[unsafe(method(setScalesWhenResized:))]
#[unsafe(method_family = none)]
pub fn setScalesWhenResized(&self, flag: bool);
#[deprecated = "You should be able to remove use of this method without any replacement. See 10.6 AppKit release notes for details."]
#[unsafe(method(scalesWhenResized))]
#[unsafe(method_family = none)]
pub fn scalesWhenResized(&self) -> bool;
#[deprecated = "You should be able to remove use of this method without any replacement. See 10.6 AppKit release notes for details."]
#[unsafe(method(setDataRetained:))]
#[unsafe(method_family = none)]
pub fn setDataRetained(&self, flag: bool);
#[deprecated = "You should be able to remove use of this method without any replacement. See 10.6 AppKit release notes for details."]
#[unsafe(method(isDataRetained))]
#[unsafe(method_family = none)]
pub fn isDataRetained(&self) -> bool;
#[deprecated = "You should be able to remove use of this method without any replacement. See 10.6 AppKit release notes for details."]
#[unsafe(method(setCachedSeparately:))]
#[unsafe(method_family = none)]
pub fn setCachedSeparately(&self, flag: bool);
#[deprecated = "You should be able to remove use of this method without any replacement. See 10.6 AppKit release notes for details."]
#[unsafe(method(isCachedSeparately))]
#[unsafe(method_family = none)]
pub fn isCachedSeparately(&self) -> bool;
#[deprecated = "You should be able to remove use of this method without any replacement. See 10.6 AppKit release notes for details."]
#[unsafe(method(setCacheDepthMatchesImageDepth:))]
#[unsafe(method_family = none)]
pub fn setCacheDepthMatchesImageDepth(&self, flag: bool);
#[deprecated = "You should be able to remove use of this method without any replacement. See 10.6 AppKit release notes for details."]
#[unsafe(method(cacheDepthMatchesImageDepth))]
#[unsafe(method_family = none)]
pub fn cacheDepthMatchesImageDepth(&self) -> bool;
#[cfg(feature = "objc2-core-foundation")]
#[deprecated = "Use -drawAtPoint:... or -drawInRect:... methods instead"]
#[unsafe(method(dissolveToPoint:fraction:))]
#[unsafe(method_family = none)]
pub fn dissolveToPoint_fraction(&self, point: NSPoint, fraction: CGFloat);
#[cfg(feature = "objc2-core-foundation")]
#[deprecated = "Use -drawAtPoint:... or -drawInRect:... methods instead"]
#[unsafe(method(dissolveToPoint:fromRect:fraction:))]
#[unsafe(method_family = none)]
pub fn dissolveToPoint_fromRect_fraction(
&self,
point: NSPoint,
rect: NSRect,
fraction: CGFloat,
);
#[cfg(feature = "NSGraphics")]
#[deprecated = "Use -drawAtPoint:... or -drawInRect:... methods instead"]
#[unsafe(method(compositeToPoint:operation:))]
#[unsafe(method_family = none)]
pub fn compositeToPoint_operation(&self, point: NSPoint, operation: NSCompositingOperation);
#[cfg(feature = "NSGraphics")]
#[deprecated = "Use -drawAtPoint:... or -drawInRect:... methods instead"]
#[unsafe(method(compositeToPoint:fromRect:operation:))]
#[unsafe(method_family = none)]
pub fn compositeToPoint_fromRect_operation(
&self,
point: NSPoint,
rect: NSRect,
operation: NSCompositingOperation,
);
#[cfg(all(feature = "NSGraphics", feature = "objc2-core-foundation"))]
#[deprecated = "Use -drawAtPoint:... or -drawInRect:... methods instead"]
#[unsafe(method(compositeToPoint:operation:fraction:))]
#[unsafe(method_family = none)]
pub fn compositeToPoint_operation_fraction(
&self,
point: NSPoint,
operation: NSCompositingOperation,
fraction: CGFloat,
);
#[cfg(all(feature = "NSGraphics", feature = "objc2-core-foundation"))]
#[deprecated = "Use -drawAtPoint:... or -drawInRect:... methods instead"]
#[unsafe(method(compositeToPoint:fromRect:operation:fraction:))]
#[unsafe(method_family = none)]
pub fn compositeToPoint_fromRect_operation_fraction(
&self,
point: NSPoint,
rect: NSRect,
operation: NSCompositingOperation,
fraction: CGFloat,
);
#[cfg(feature = "NSImageRep")]
#[deprecated = "Create an image using +[NSImage imageWithSize:flipped:drawingHandler:], and begin your custom drawing with -[NSImageRep drawInRect:] instead."]
#[unsafe(method(lockFocusOnRepresentation:))]
#[unsafe(method_family = none)]
pub unsafe fn lockFocusOnRepresentation(&self, image_representation: Option<&NSImageRep>);
#[deprecated = "This method does not perform any operation on 10.4 or later."]
#[unsafe(method(cancelIncrementalLoad))]
#[unsafe(method_family = none)]
pub fn cancelIncrementalLoad(&self);
);
}
extern "C" {
pub static NSImageNameAddTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameBluetoothTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameBonjour: &'static NSImageName;
}
extern "C" {
pub static NSImageNameBookmarksTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameCaution: &'static NSImageName;
}
extern "C" {
pub static NSImageNameComputer: &'static NSImageName;
}
extern "C" {
pub static NSImageNameEnterFullScreenTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameExitFullScreenTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameFolder: &'static NSImageName;
}
extern "C" {
pub static NSImageNameFolderBurnable: &'static NSImageName;
}
extern "C" {
pub static NSImageNameFolderSmart: &'static NSImageName;
}
extern "C" {
pub static NSImageNameFollowLinkFreestandingTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameHomeTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameIChatTheaterTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameLockLockedTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameLockUnlockedTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameNetwork: &'static NSImageName;
}
extern "C" {
pub static NSImageNamePathTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameQuickLookTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameRefreshFreestandingTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameRefreshTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameRemoveTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameRevealFreestandingTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameShareTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameSlideshowTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameStatusAvailable: &'static NSImageName;
}
extern "C" {
pub static NSImageNameStatusNone: &'static NSImageName;
}
extern "C" {
pub static NSImageNameStatusPartiallyAvailable: &'static NSImageName;
}
extern "C" {
pub static NSImageNameStatusUnavailable: &'static NSImageName;
}
extern "C" {
pub static NSImageNameStopProgressFreestandingTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameStopProgressTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTrashEmpty: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTrashFull: &'static NSImageName;
}
extern "C" {
pub static NSImageNameActionTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameSmartBadgeTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameIconViewTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameListViewTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameColumnViewTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameFlowViewTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameInvalidDataFreestandingTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameGoForwardTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameGoBackTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameGoRightTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameGoLeftTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameRightFacingTriangleTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameLeftFacingTriangleTemplate: &'static NSImageName;
}
extern "C" {
#[deprecated]
pub static NSImageNameDotMac: &'static NSImageName;
}
extern "C" {
pub static NSImageNameMobileMe: &'static NSImageName;
}
extern "C" {
pub static NSImageNameMultipleDocuments: &'static NSImageName;
}
extern "C" {
pub static NSImageNameUserAccounts: &'static NSImageName;
}
extern "C" {
pub static NSImageNamePreferencesGeneral: &'static NSImageName;
}
extern "C" {
pub static NSImageNameAdvanced: &'static NSImageName;
}
extern "C" {
pub static NSImageNameInfo: &'static NSImageName;
}
extern "C" {
pub static NSImageNameFontPanel: &'static NSImageName;
}
extern "C" {
pub static NSImageNameColorPanel: &'static NSImageName;
}
extern "C" {
pub static NSImageNameUser: &'static NSImageName;
}
extern "C" {
pub static NSImageNameUserGroup: &'static NSImageName;
}
extern "C" {
pub static NSImageNameEveryone: &'static NSImageName;
}
extern "C" {
pub static NSImageNameUserGuest: &'static NSImageName;
}
extern "C" {
pub static NSImageNameMenuOnStateTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameMenuMixedStateTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameApplicationIcon: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarAddDetailTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarAddTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarAlarmTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarAudioInputMuteTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarAudioInputTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarAudioOutputMuteTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarAudioOutputVolumeHighTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarAudioOutputVolumeLowTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarAudioOutputVolumeMediumTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarAudioOutputVolumeOffTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarBookmarksTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarColorPickerFill: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarColorPickerFont: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarColorPickerStroke: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarCommunicationAudioTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarCommunicationVideoTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarComposeTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarDeleteTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarDownloadTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarEnterFullScreenTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarExitFullScreenTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarFastForwardTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarFolderCopyToTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarFolderMoveToTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarFolderTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarGetInfoTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarGoBackTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarGoDownTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarGoForwardTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarGoUpTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarHistoryTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarIconViewTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarListViewTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarMailTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarNewFolderTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarNewMessageTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarOpenInBrowserTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarPauseTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarPlayPauseTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarPlayTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarQuickLookTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarRecordStartTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarRecordStopTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarRefreshTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarRemoveTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarRewindTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarRotateLeftTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarRotateRightTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarSearchTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarShareTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarSidebarTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarSkipAhead15SecondsTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarSkipAhead30SecondsTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarSkipAheadTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarSkipBack15SecondsTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarSkipBack30SecondsTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarSkipBackTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarSkipToEndTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarSkipToStartTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarSlideshowTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarTagIconTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarTextBoldTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarTextBoxTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarTextCenterAlignTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarTextItalicTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarTextJustifiedAlignTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarTextLeftAlignTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarTextListTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarTextRightAlignTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarTextStrikethroughTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarTextUnderlineTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarUserAddTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarUserGroupTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarUserTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarVolumeDownTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarVolumeUpTemplate: &'static NSImageName;
}
extern "C" {
pub static NSImageNameTouchBarPlayheadTemplate: &'static NSImageName;
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSImageSymbolScale(pub NSInteger);
impl NSImageSymbolScale {
#[doc(alias = "NSImageSymbolScaleSmall")]
pub const Small: Self = Self(1);
#[doc(alias = "NSImageSymbolScaleMedium")]
pub const Medium: Self = Self(2);
#[doc(alias = "NSImageSymbolScaleLarge")]
pub const Large: Self = Self(3);
}
unsafe impl Encode for NSImageSymbolScale {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for NSImageSymbolScale {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSImageSymbolVariableValueMode(pub NSInteger);
impl NSImageSymbolVariableValueMode {
#[doc(alias = "NSImageSymbolVariableValueModeAutomatic")]
pub const Automatic: Self = Self(0);
#[doc(alias = "NSImageSymbolVariableValueModeColor")]
pub const Color: Self = Self(1);
#[doc(alias = "NSImageSymbolVariableValueModeDraw")]
pub const Draw: Self = Self(2);
}
unsafe impl Encode for NSImageSymbolVariableValueMode {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for NSImageSymbolVariableValueMode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
unsafe impl Send for NSImageSymbolVariableValueMode {}
unsafe impl Sync for NSImageSymbolVariableValueMode {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSImageSymbolColorRenderingMode(pub NSInteger);
impl NSImageSymbolColorRenderingMode {
#[doc(alias = "NSImageSymbolColorRenderingModeAutomatic")]
pub const Automatic: Self = Self(0);
#[doc(alias = "NSImageSymbolColorRenderingModeFlat")]
pub const Flat: Self = Self(1);
#[doc(alias = "NSImageSymbolColorRenderingModeGradient")]
pub const Gradient: Self = Self(2);
}
unsafe impl Encode for NSImageSymbolColorRenderingMode {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for NSImageSymbolColorRenderingMode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
unsafe impl Send for NSImageSymbolColorRenderingMode {}
unsafe impl Sync for NSImageSymbolColorRenderingMode {}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSImageSymbolConfiguration;
);
extern_conformance!(
unsafe impl NSCoding for NSImageSymbolConfiguration {}
);
extern_conformance!(
unsafe impl NSCopying for NSImageSymbolConfiguration {}
);
unsafe impl CopyingHelper for NSImageSymbolConfiguration {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for NSImageSymbolConfiguration {}
);
extern_conformance!(
unsafe impl NSSecureCoding for NSImageSymbolConfiguration {}
);
impl NSImageSymbolConfiguration {
extern_methods!(
#[cfg(all(feature = "NSFontDescriptor", feature = "objc2-core-foundation"))]
#[unsafe(method(configurationWithPointSize:weight:scale:))]
#[unsafe(method_family = none)]
pub fn configurationWithPointSize_weight_scale(
point_size: CGFloat,
weight: NSFontWeight,
scale: NSImageSymbolScale,
) -> Retained<Self>;
#[cfg(all(feature = "NSFontDescriptor", feature = "objc2-core-foundation"))]
#[unsafe(method(configurationWithPointSize:weight:))]
#[unsafe(method_family = none)]
pub fn configurationWithPointSize_weight(
point_size: CGFloat,
weight: NSFontWeight,
) -> Retained<Self>;
#[cfg(feature = "NSFontDescriptor")]
#[unsafe(method(configurationWithTextStyle:scale:))]
#[unsafe(method_family = none)]
pub fn configurationWithTextStyle_scale(
style: &NSFontTextStyle,
scale: NSImageSymbolScale,
) -> Retained<Self>;
#[cfg(feature = "NSFontDescriptor")]
#[unsafe(method(configurationWithTextStyle:))]
#[unsafe(method_family = none)]
pub fn configurationWithTextStyle(style: &NSFontTextStyle) -> Retained<Self>;
#[unsafe(method(configurationWithScale:))]
#[unsafe(method_family = none)]
pub fn configurationWithScale(scale: NSImageSymbolScale) -> Retained<Self>;
#[unsafe(method(configurationPreferringMonochrome))]
#[unsafe(method_family = none)]
pub fn configurationPreferringMonochrome() -> Retained<Self>;
#[unsafe(method(configurationPreferringHierarchical))]
#[unsafe(method_family = none)]
pub fn configurationPreferringHierarchical() -> Retained<Self>;
#[cfg(feature = "NSColor")]
#[unsafe(method(configurationWithHierarchicalColor:))]
#[unsafe(method_family = none)]
pub fn configurationWithHierarchicalColor(hierarchical_color: &NSColor) -> Retained<Self>;
#[cfg(feature = "NSColor")]
#[unsafe(method(configurationWithPaletteColors:))]
#[unsafe(method_family = none)]
pub fn configurationWithPaletteColors(palette_colors: &NSArray<NSColor>) -> Retained<Self>;
#[unsafe(method(configurationPreferringMulticolor))]
#[unsafe(method_family = none)]
pub fn configurationPreferringMulticolor() -> Retained<Self>;
#[unsafe(method(configurationWithVariableValueMode:))]
#[unsafe(method_family = none)]
pub fn configurationWithVariableValueMode(
variable_value_mode: NSImageSymbolVariableValueMode,
) -> Retained<Self>;
#[unsafe(method(configurationWithColorRenderingMode:))]
#[unsafe(method_family = none)]
pub fn configurationWithColorRenderingMode(
mode: NSImageSymbolColorRenderingMode,
) -> Retained<Self>;
#[unsafe(method(configurationByApplyingConfiguration:))]
#[unsafe(method_family = none)]
pub fn configurationByApplyingConfiguration(
&self,
configuration: &NSImageSymbolConfiguration,
) -> Retained<Self>;
);
}
impl NSImageSymbolConfiguration {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
impl DefaultRetained for NSImageSymbolConfiguration {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}