objc2_app_kit/generated/
NSImage.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8#[cfg(feature = "objc2-core-graphics")]
9#[cfg(target_vendor = "apple")]
10use objc2_core_graphics::*;
11use objc2_foundation::*;
12
13use crate::*;
14
15/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagename?language=objc)
16pub type NSImageName = NSString;
17
18extern "C" {
19    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagehintctm?language=objc)
20    #[cfg(feature = "NSImageRep")]
21    pub static NSImageHintCTM: &'static NSImageHintKey;
22}
23
24extern "C" {
25    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagehintinterpolation?language=objc)
26    #[cfg(feature = "NSImageRep")]
27    pub static NSImageHintInterpolation: &'static NSImageHintKey;
28}
29
30extern "C" {
31    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagehintuserinterfacelayoutdirection?language=objc)
32    #[cfg(feature = "NSImageRep")]
33    pub static NSImageHintUserInterfaceLayoutDirection: &'static NSImageHintKey;
34}
35
36/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimageloadstatus?language=objc)
37// NS_ENUM
38#[repr(transparent)]
39#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
40pub struct NSImageLoadStatus(pub NSUInteger);
41impl NSImageLoadStatus {
42    #[doc(alias = "NSImageLoadStatusCompleted")]
43    pub const Completed: Self = Self(0);
44    #[doc(alias = "NSImageLoadStatusCancelled")]
45    pub const Cancelled: Self = Self(1);
46    #[doc(alias = "NSImageLoadStatusInvalidData")]
47    pub const InvalidData: Self = Self(2);
48    #[doc(alias = "NSImageLoadStatusUnexpectedEOF")]
49    pub const UnexpectedEOF: Self = Self(3);
50    #[doc(alias = "NSImageLoadStatusReadError")]
51    pub const ReadError: Self = Self(4);
52}
53
54unsafe impl Encode for NSImageLoadStatus {
55    const ENCODING: Encoding = NSUInteger::ENCODING;
56}
57
58unsafe impl RefEncode for NSImageLoadStatus {
59    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
60}
61
62/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagecachemode?language=objc)
63// NS_ENUM
64#[repr(transparent)]
65#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
66pub struct NSImageCacheMode(pub NSUInteger);
67impl NSImageCacheMode {
68    #[doc(alias = "NSImageCacheDefault")]
69    pub const Default: Self = Self(0);
70    #[doc(alias = "NSImageCacheAlways")]
71    pub const Always: Self = Self(1);
72    #[doc(alias = "NSImageCacheBySize")]
73    pub const BySize: Self = Self(2);
74    #[doc(alias = "NSImageCacheNever")]
75    pub const Never: Self = Self(3);
76}
77
78unsafe impl Encode for NSImageCacheMode {
79    const ENCODING: Encoding = NSUInteger::ENCODING;
80}
81
82unsafe impl RefEncode for NSImageCacheMode {
83    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
84}
85
86/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimageresizingmode?language=objc)
87// NS_ENUM
88#[repr(transparent)]
89#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
90pub struct NSImageResizingMode(pub NSInteger);
91impl NSImageResizingMode {}
92
93unsafe impl Encode for NSImageResizingMode {
94    const ENCODING: Encoding = NSInteger::ENCODING;
95}
96
97unsafe impl RefEncode for NSImageResizingMode {
98    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
99}
100
101extern_class!(
102    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimage?language=objc)
103    #[unsafe(super(NSObject))]
104    #[derive(Debug, PartialEq, Eq, Hash)]
105    pub struct NSImage;
106);
107
108extern_conformance!(
109    unsafe impl NSObjectProtocol for NSImage {}
110);
111
112impl NSImage {
113    extern_methods!(
114        #[unsafe(method(imageNamed:))]
115        #[unsafe(method_family = none)]
116        pub fn imageNamed(name: &NSImageName) -> Option<Retained<NSImage>>;
117
118        /// Creates a system symbol image with the specified name and value
119        ///
120        /// Parameter `name`: A name from the system’s SF Symbols catalog
121        ///
122        /// Parameter `description`: 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”.
123        #[unsafe(method(imageWithSystemSymbolName:accessibilityDescription:))]
124        #[unsafe(method_family = none)]
125        pub fn imageWithSystemSymbolName_accessibilityDescription(
126            name: &NSString,
127            description: Option<&NSString>,
128        ) -> Option<Retained<Self>>;
129
130        /// Creates a system symbol image with the specified name and value. The
131        /// `value`argument is only accommodated if the symbol supports variable rendering.
132        ///
133        /// Parameter `name`: A name from the system’s SF Symbols catalog
134        ///
135        /// Parameter `value`: The value represented by the symbol. The value should be between 0 and 1 inclusive ([0,1]).
136        ///
137        /// Parameter `description`: 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”.
138        ///
139        /// Note: Values less than 0 or greater than 1 will be clamped to 0 and 1, respectively.
140        #[unsafe(method(imageWithSystemSymbolName:variableValue:accessibilityDescription:))]
141        #[unsafe(method_family = none)]
142        pub fn imageWithSystemSymbolName_variableValue_accessibilityDescription(
143            name: &NSString,
144            value: c_double,
145            description: Option<&NSString>,
146        ) -> Option<Retained<Self>>;
147
148        /// Creates a symbol image with the specified name and value. The
149        /// `value`argument is only accommodated if the symbol supports variable rendering.
150        ///
151        /// Parameter `name`: A name of a symbol image file in the main bundle’s catalog
152        ///
153        /// Parameter `value`: The value represented by the symbol. The value should be between 0 and 1 inclusive ([0,1]).
154        ///
155        /// Note: Values less than 0 or greater than 1 will be clamped to 0 and 1, respectively.
156        #[unsafe(method(imageWithSymbolName:variableValue:))]
157        #[unsafe(method_family = none)]
158        pub fn imageWithSymbolName_variableValue(
159            name: &NSString,
160            value: c_double,
161        ) -> Option<Retained<Self>>;
162
163        /// Creates a symbol image with the specified name and value. The
164        /// `value`argument is only accommodated if the symbol supports variable rendering.
165        ///
166        /// Parameter `name`: A name of a symbol image file in the main bundle’s catalog
167        ///
168        /// Parameter `bundle`: The bundle containing the image file or asset catalog. Specify `nil` to search the app’s main bundle.
169        ///
170        /// Parameter `value`: The value represented by the symbol. The value should be between 0 and 1 inclusive ([0,1]).
171        ///
172        /// Note: Values less than 0 or greater than 1 will be clamped to 0 and 1, respectively.
173        #[unsafe(method(imageWithSymbolName:bundle:variableValue:))]
174        #[unsafe(method_family = none)]
175        pub fn imageWithSymbolName_bundle_variableValue(
176            name: &NSString,
177            bundle: Option<&NSBundle>,
178            value: c_double,
179        ) -> Option<Retained<Self>>;
180
181        #[unsafe(method(initWithSize:))]
182        #[unsafe(method_family = init)]
183        pub fn initWithSize(this: Allocated<Self>, size: NSSize) -> Retained<Self>;
184
185        /// # Safety
186        ///
187        /// `coder` possibly has further requirements.
188        #[unsafe(method(initWithCoder:))]
189        #[unsafe(method_family = init)]
190        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
191
192        #[unsafe(method(initWithData:))]
193        #[unsafe(method_family = init)]
194        pub fn initWithData(this: Allocated<Self>, data: &NSData) -> Option<Retained<Self>>;
195
196        #[unsafe(method(initWithContentsOfFile:))]
197        #[unsafe(method_family = init)]
198        pub fn initWithContentsOfFile(
199            this: Allocated<Self>,
200            file_name: &NSString,
201        ) -> Option<Retained<Self>>;
202
203        #[unsafe(method(initWithContentsOfURL:))]
204        #[unsafe(method_family = init)]
205        pub fn initWithContentsOfURL(this: Allocated<Self>, url: &NSURL) -> Option<Retained<Self>>;
206
207        #[unsafe(method(initByReferencingFile:))]
208        #[unsafe(method_family = init)]
209        pub fn initByReferencingFile(
210            this: Allocated<Self>,
211            file_name: &NSString,
212        ) -> Option<Retained<Self>>;
213
214        #[unsafe(method(initByReferencingURL:))]
215        #[unsafe(method_family = init)]
216        pub fn initByReferencingURL(this: Allocated<Self>, url: &NSURL) -> Retained<Self>;
217
218        #[cfg(feature = "NSPasteboard")]
219        #[unsafe(method(initWithPasteboard:))]
220        #[unsafe(method_family = init)]
221        pub fn initWithPasteboard(
222            this: Allocated<Self>,
223            pasteboard: &NSPasteboard,
224        ) -> Option<Retained<Self>>;
225
226        #[unsafe(method(initWithDataIgnoringOrientation:))]
227        #[unsafe(method_family = init)]
228        pub fn initWithDataIgnoringOrientation(
229            this: Allocated<Self>,
230            data: &NSData,
231        ) -> Option<Retained<Self>>;
232
233        #[cfg(feature = "block2")]
234        #[unsafe(method(imageWithSize:flipped:drawingHandler:))]
235        #[unsafe(method_family = none)]
236        pub fn imageWithSize_flipped_drawingHandler(
237            size: NSSize,
238            drawing_handler_should_be_called_with_flipped_context: bool,
239            drawing_handler: &block2::DynBlock<dyn Fn(NSRect) -> Bool>,
240        ) -> Retained<Self>;
241
242        #[unsafe(method(size))]
243        #[unsafe(method_family = none)]
244        pub fn size(&self) -> NSSize;
245
246        /// Setter for [`size`][Self::size].
247        #[unsafe(method(setSize:))]
248        #[unsafe(method_family = none)]
249        pub fn setSize(&self, size: NSSize);
250
251        #[unsafe(method(setName:))]
252        #[unsafe(method_family = none)]
253        pub fn setName(&self, string: Option<&NSImageName>) -> bool;
254
255        #[unsafe(method(name))]
256        #[unsafe(method_family = none)]
257        pub fn name(&self) -> Option<Retained<NSImageName>>;
258
259        #[cfg(feature = "NSColor")]
260        #[unsafe(method(backgroundColor))]
261        #[unsafe(method_family = none)]
262        pub fn backgroundColor(&self) -> Retained<NSColor>;
263
264        #[cfg(feature = "NSColor")]
265        /// Setter for [`backgroundColor`][Self::backgroundColor].
266        ///
267        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
268        #[unsafe(method(setBackgroundColor:))]
269        #[unsafe(method_family = none)]
270        pub fn setBackgroundColor(&self, background_color: &NSColor);
271
272        #[unsafe(method(usesEPSOnResolutionMismatch))]
273        #[unsafe(method_family = none)]
274        pub fn usesEPSOnResolutionMismatch(&self) -> bool;
275
276        /// Setter for [`usesEPSOnResolutionMismatch`][Self::usesEPSOnResolutionMismatch].
277        #[unsafe(method(setUsesEPSOnResolutionMismatch:))]
278        #[unsafe(method_family = none)]
279        pub fn setUsesEPSOnResolutionMismatch(&self, uses_eps_on_resolution_mismatch: bool);
280
281        #[unsafe(method(prefersColorMatch))]
282        #[unsafe(method_family = none)]
283        pub fn prefersColorMatch(&self) -> bool;
284
285        /// Setter for [`prefersColorMatch`][Self::prefersColorMatch].
286        #[unsafe(method(setPrefersColorMatch:))]
287        #[unsafe(method_family = none)]
288        pub fn setPrefersColorMatch(&self, prefers_color_match: bool);
289
290        #[unsafe(method(matchesOnMultipleResolution))]
291        #[unsafe(method_family = none)]
292        pub fn matchesOnMultipleResolution(&self) -> bool;
293
294        /// Setter for [`matchesOnMultipleResolution`][Self::matchesOnMultipleResolution].
295        #[unsafe(method(setMatchesOnMultipleResolution:))]
296        #[unsafe(method_family = none)]
297        pub fn setMatchesOnMultipleResolution(&self, matches_on_multiple_resolution: bool);
298
299        #[unsafe(method(matchesOnlyOnBestFittingAxis))]
300        #[unsafe(method_family = none)]
301        pub fn matchesOnlyOnBestFittingAxis(&self) -> bool;
302
303        /// Setter for [`matchesOnlyOnBestFittingAxis`][Self::matchesOnlyOnBestFittingAxis].
304        #[unsafe(method(setMatchesOnlyOnBestFittingAxis:))]
305        #[unsafe(method_family = none)]
306        pub fn setMatchesOnlyOnBestFittingAxis(&self, matches_only_on_best_fitting_axis: bool);
307
308        #[cfg(all(feature = "NSGraphics", feature = "objc2-core-foundation"))]
309        #[unsafe(method(drawAtPoint:fromRect:operation:fraction:))]
310        #[unsafe(method_family = none)]
311        pub fn drawAtPoint_fromRect_operation_fraction(
312            &self,
313            point: NSPoint,
314            from_rect: NSRect,
315            op: NSCompositingOperation,
316            delta: CGFloat,
317        );
318
319        #[cfg(all(feature = "NSGraphics", feature = "objc2-core-foundation"))]
320        #[unsafe(method(drawInRect:fromRect:operation:fraction:))]
321        #[unsafe(method_family = none)]
322        pub fn drawInRect_fromRect_operation_fraction(
323            &self,
324            rect: NSRect,
325            from_rect: NSRect,
326            op: NSCompositingOperation,
327            delta: CGFloat,
328        );
329
330        #[cfg(all(
331            feature = "NSGraphics",
332            feature = "NSImageRep",
333            feature = "objc2-core-foundation"
334        ))]
335        /// # Safety
336        ///
337        /// `hints` generic should be of the correct type.
338        #[unsafe(method(drawInRect:fromRect:operation:fraction:respectFlipped:hints:))]
339        #[unsafe(method_family = none)]
340        pub unsafe fn drawInRect_fromRect_operation_fraction_respectFlipped_hints(
341            &self,
342            dst_space_portion_rect: NSRect,
343            src_space_portion_rect: NSRect,
344            op: NSCompositingOperation,
345            requested_alpha: CGFloat,
346            respect_context_is_flipped: bool,
347            hints: Option<&NSDictionary<NSImageHintKey, AnyObject>>,
348        );
349
350        #[cfg(feature = "NSImageRep")]
351        #[unsafe(method(drawRepresentation:inRect:))]
352        #[unsafe(method_family = none)]
353        pub fn drawRepresentation_inRect(&self, image_rep: &NSImageRep, rect: NSRect) -> bool;
354
355        #[unsafe(method(drawInRect:))]
356        #[unsafe(method_family = none)]
357        pub fn drawInRect(&self, rect: NSRect);
358
359        #[unsafe(method(recache))]
360        #[unsafe(method_family = none)]
361        pub fn recache(&self);
362
363        #[unsafe(method(TIFFRepresentation))]
364        #[unsafe(method_family = none)]
365        pub fn TIFFRepresentation(&self) -> Option<Retained<NSData>>;
366
367        #[cfg(feature = "NSBitmapImageRep")]
368        #[unsafe(method(TIFFRepresentationUsingCompression:factor:))]
369        #[unsafe(method_family = none)]
370        pub fn TIFFRepresentationUsingCompression_factor(
371            &self,
372            comp: NSTIFFCompression,
373            factor: c_float,
374        ) -> Option<Retained<NSData>>;
375
376        #[cfg(feature = "NSImageRep")]
377        #[unsafe(method(representations))]
378        #[unsafe(method_family = none)]
379        pub fn representations(&self) -> Retained<NSArray<NSImageRep>>;
380
381        #[cfg(feature = "NSImageRep")]
382        #[unsafe(method(addRepresentations:))]
383        #[unsafe(method_family = none)]
384        pub fn addRepresentations(&self, image_reps: &NSArray<NSImageRep>);
385
386        #[cfg(feature = "NSImageRep")]
387        #[unsafe(method(addRepresentation:))]
388        #[unsafe(method_family = none)]
389        pub fn addRepresentation(&self, image_rep: &NSImageRep);
390
391        #[cfg(feature = "NSImageRep")]
392        #[unsafe(method(removeRepresentation:))]
393        #[unsafe(method_family = none)]
394        pub fn removeRepresentation(&self, image_rep: &NSImageRep);
395
396        #[unsafe(method(isValid))]
397        #[unsafe(method_family = none)]
398        pub fn isValid(&self) -> bool;
399
400        #[unsafe(method(delegate))]
401        #[unsafe(method_family = none)]
402        pub fn delegate(&self) -> Option<Retained<ProtocolObject<dyn NSImageDelegate>>>;
403
404        /// Setter for [`delegate`][Self::delegate].
405        ///
406        /// This is a [weak property][objc2::topics::weak_property].
407        #[unsafe(method(setDelegate:))]
408        #[unsafe(method_family = none)]
409        pub fn setDelegate(&self, delegate: Option<&ProtocolObject<dyn NSImageDelegate>>);
410
411        #[unsafe(method(imageTypes))]
412        #[unsafe(method_family = none)]
413        pub fn imageTypes() -> Retained<NSArray<NSString>>;
414
415        #[unsafe(method(imageUnfilteredTypes))]
416        #[unsafe(method_family = none)]
417        pub fn imageUnfilteredTypes() -> Retained<NSArray<NSString>>;
418
419        #[cfg(feature = "NSPasteboard")]
420        #[unsafe(method(canInitWithPasteboard:))]
421        #[unsafe(method_family = none)]
422        pub fn canInitWithPasteboard(pasteboard: &NSPasteboard) -> bool;
423
424        #[unsafe(method(cacheMode))]
425        #[unsafe(method_family = none)]
426        pub fn cacheMode(&self) -> NSImageCacheMode;
427
428        /// Setter for [`cacheMode`][Self::cacheMode].
429        #[unsafe(method(setCacheMode:))]
430        #[unsafe(method_family = none)]
431        pub fn setCacheMode(&self, cache_mode: NSImageCacheMode);
432
433        #[unsafe(method(alignmentRect))]
434        #[unsafe(method_family = none)]
435        pub fn alignmentRect(&self) -> NSRect;
436
437        /// Setter for [`alignmentRect`][Self::alignmentRect].
438        #[unsafe(method(setAlignmentRect:))]
439        #[unsafe(method_family = none)]
440        pub fn setAlignmentRect(&self, alignment_rect: NSRect);
441
442        #[unsafe(method(isTemplate))]
443        #[unsafe(method_family = none)]
444        pub fn isTemplate(&self) -> bool;
445
446        /// Setter for [`isTemplate`][Self::isTemplate].
447        #[unsafe(method(setTemplate:))]
448        #[unsafe(method_family = none)]
449        pub fn setTemplate(&self, template: bool);
450
451        #[unsafe(method(accessibilityDescription))]
452        #[unsafe(method_family = none)]
453        pub fn accessibilityDescription(&self) -> Option<Retained<NSString>>;
454
455        /// Setter for [`accessibilityDescription`][Self::accessibilityDescription].
456        ///
457        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
458        #[unsafe(method(setAccessibilityDescription:))]
459        #[unsafe(method_family = none)]
460        pub fn setAccessibilityDescription(&self, accessibility_description: Option<&NSString>);
461
462        #[cfg(feature = "objc2-core-graphics")]
463        #[cfg(target_vendor = "apple")]
464        #[unsafe(method(initWithCGImage:size:))]
465        #[unsafe(method_family = init)]
466        pub fn initWithCGImage_size(
467            this: Allocated<Self>,
468            cg_image: &CGImage,
469            size: NSSize,
470        ) -> Retained<Self>;
471
472        #[cfg(all(
473            feature = "NSGraphicsContext",
474            feature = "NSImageRep",
475            feature = "objc2-core-graphics"
476        ))]
477        #[cfg(target_vendor = "apple")]
478        /// # Safety
479        ///
480        /// - `proposed_dest_rect` must be a valid pointer or null.
481        /// - `hints` generic should be of the correct type.
482        #[unsafe(method(CGImageForProposedRect:context:hints:))]
483        #[unsafe(method_family = none)]
484        pub unsafe fn CGImageForProposedRect_context_hints(
485            &self,
486            proposed_dest_rect: *mut NSRect,
487            reference_context: Option<&NSGraphicsContext>,
488            hints: Option<&NSDictionary<NSImageHintKey, AnyObject>>,
489        ) -> Option<Retained<CGImage>>;
490
491        #[cfg(all(feature = "NSGraphicsContext", feature = "NSImageRep"))]
492        /// # Safety
493        ///
494        /// `hints` generic should be of the correct type.
495        #[unsafe(method(bestRepresentationForRect:context:hints:))]
496        #[unsafe(method_family = none)]
497        pub unsafe fn bestRepresentationForRect_context_hints(
498            &self,
499            rect: NSRect,
500            reference_context: Option<&NSGraphicsContext>,
501            hints: Option<&NSDictionary<NSImageHintKey, AnyObject>>,
502        ) -> Option<Retained<NSImageRep>>;
503
504        #[cfg(all(feature = "NSGraphicsContext", feature = "NSImageRep"))]
505        /// # Safety
506        ///
507        /// `hints` generic should be of the correct type.
508        #[unsafe(method(hitTestRect:withImageDestinationRect:context:hints:flipped:))]
509        #[unsafe(method_family = none)]
510        pub unsafe fn hitTestRect_withImageDestinationRect_context_hints_flipped(
511            &self,
512            test_rect_dest_space: NSRect,
513            image_rect_dest_space: NSRect,
514            context: Option<&NSGraphicsContext>,
515            hints: Option<&NSDictionary<NSImageHintKey, AnyObject>>,
516            flipped: bool,
517        ) -> bool;
518
519        #[cfg(feature = "objc2-core-foundation")]
520        #[unsafe(method(recommendedLayerContentsScale:))]
521        #[unsafe(method_family = none)]
522        pub fn recommendedLayerContentsScale(&self, preferred_contents_scale: CGFloat) -> CGFloat;
523
524        #[cfg(feature = "objc2-core-foundation")]
525        #[unsafe(method(layerContentsForContentsScale:))]
526        #[unsafe(method_family = none)]
527        pub fn layerContentsForContentsScale(
528            &self,
529            layer_contents_scale: CGFloat,
530        ) -> Retained<AnyObject>;
531
532        #[unsafe(method(capInsets))]
533        #[unsafe(method_family = none)]
534        pub fn capInsets(&self) -> NSEdgeInsets;
535
536        /// Setter for [`capInsets`][Self::capInsets].
537        #[unsafe(method(setCapInsets:))]
538        #[unsafe(method_family = none)]
539        pub fn setCapInsets(&self, cap_insets: NSEdgeInsets);
540
541        #[unsafe(method(resizingMode))]
542        #[unsafe(method_family = none)]
543        pub fn resizingMode(&self) -> NSImageResizingMode;
544
545        /// Setter for [`resizingMode`][Self::resizingMode].
546        #[unsafe(method(setResizingMode:))]
547        #[unsafe(method_family = none)]
548        pub fn setResizingMode(&self, resizing_mode: NSImageResizingMode);
549
550        #[unsafe(method(imageWithSymbolConfiguration:))]
551        #[unsafe(method_family = none)]
552        pub fn imageWithSymbolConfiguration(
553            &self,
554            configuration: &NSImageSymbolConfiguration,
555        ) -> Option<Retained<NSImage>>;
556
557        #[unsafe(method(symbolConfiguration))]
558        #[unsafe(method_family = none)]
559        pub fn symbolConfiguration(&self) -> Retained<NSImageSymbolConfiguration>;
560
561        /// 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.
562        #[unsafe(method(imageWithLocale:))]
563        #[unsafe(method_family = none)]
564        pub fn imageWithLocale(&self, locale: Option<&NSLocale>) -> Retained<NSImage>;
565
566        /// The image’s preferred locale for resolving representations, if one has been specified using `-imageWithLocale:`. Otherwise, `nil`.
567        #[unsafe(method(locale))]
568        #[unsafe(method_family = none)]
569        pub fn locale(&self) -> Option<Retained<NSLocale>>;
570    );
571}
572
573/// Methods declared on superclass `NSObject`.
574impl NSImage {
575    extern_methods!(
576        #[unsafe(method(init))]
577        #[unsafe(method_family = init)]
578        pub fn init(this: Allocated<Self>) -> Retained<Self>;
579
580        #[unsafe(method(new))]
581        #[unsafe(method_family = new)]
582        pub fn new() -> Retained<Self>;
583    );
584}
585
586impl DefaultRetained for NSImage {
587    #[inline]
588    fn default_retained() -> Retained<Self> {
589        Self::new()
590    }
591}
592
593impl NSImage {
594    extern_methods!();
595}
596
597extern_conformance!(
598    unsafe impl NSCopying for NSImage {}
599);
600
601unsafe impl CopyingHelper for NSImage {
602    type Result = Self;
603}
604
605#[cfg(feature = "NSPasteboard")]
606extern_conformance!(
607    unsafe impl NSPasteboardReading for NSImage {}
608);
609
610#[cfg(feature = "NSPasteboard")]
611extern_conformance!(
612    unsafe impl NSPasteboardWriting for NSImage {}
613);
614
615extern_conformance!(
616    unsafe impl NSSecureCoding for NSImage {}
617);
618
619impl NSImage {
620    extern_methods!();
621}
622
623extern_conformance!(
624    unsafe impl NSItemProviderReading for NSImage {}
625);
626
627extern_conformance!(
628    unsafe impl NSItemProviderWriting for NSImage {}
629);
630
631extern_protocol!(
632    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagedelegate?language=objc)
633    pub unsafe trait NSImageDelegate: NSObjectProtocol {
634        #[optional]
635        #[unsafe(method(imageDidNotDraw:inRect:))]
636        #[unsafe(method_family = none)]
637        fn imageDidNotDraw_inRect(
638            &self,
639            sender: &NSImage,
640            rect: NSRect,
641        ) -> Option<Retained<NSImage>>;
642
643        #[cfg(feature = "NSImageRep")]
644        #[deprecated = "This method is no longer called on 10.4 or later."]
645        #[optional]
646        #[unsafe(method(image:willLoadRepresentation:))]
647        #[unsafe(method_family = none)]
648        fn image_willLoadRepresentation(&self, image: &NSImage, rep: &NSImageRep);
649
650        #[cfg(feature = "NSImageRep")]
651        #[deprecated = "This method is no longer called on 10.4 or later."]
652        #[optional]
653        #[unsafe(method(image:didLoadRepresentationHeader:))]
654        #[unsafe(method_family = none)]
655        fn image_didLoadRepresentationHeader(&self, image: &NSImage, rep: &NSImageRep);
656
657        #[cfg(feature = "NSImageRep")]
658        #[deprecated = "This method is no longer called on 10.4 or later."]
659        #[optional]
660        #[unsafe(method(image:didLoadPartOfRepresentation:withValidRows:))]
661        #[unsafe(method_family = none)]
662        fn image_didLoadPartOfRepresentation_withValidRows(
663            &self,
664            image: &NSImage,
665            rep: &NSImageRep,
666            rows: NSInteger,
667        );
668
669        #[cfg(feature = "NSImageRep")]
670        #[deprecated = "This method is no longer called on 10.4 or later."]
671        #[optional]
672        #[unsafe(method(image:didLoadRepresentation:withStatus:))]
673        #[unsafe(method_family = none)]
674        fn image_didLoadRepresentation_withStatus(
675            &self,
676            image: &NSImage,
677            rep: &NSImageRep,
678            status: NSImageLoadStatus,
679        );
680    }
681);
682
683mod private_NSBundleImageExtension {
684    pub trait Sealed {}
685}
686
687/// Category on [`NSBundle`].
688pub unsafe trait NSBundleImageExtension:
689    ClassType + Sized + private_NSBundleImageExtension::Sealed
690{
691    extern_methods!(
692        #[unsafe(method(imageForResource:))]
693        #[unsafe(method_family = none)]
694        fn imageForResource(&self, name: &NSImageName) -> Option<Retained<NSImage>>;
695
696        #[unsafe(method(pathForImageResource:))]
697        #[unsafe(method_family = none)]
698        fn pathForImageResource(&self, name: &NSImageName) -> Option<Retained<NSString>>;
699
700        #[unsafe(method(URLForImageResource:))]
701        #[unsafe(method_family = none)]
702        fn URLForImageResource(&self, name: &NSImageName) -> Option<Retained<NSURL>>;
703    );
704}
705
706impl private_NSBundleImageExtension::Sealed for NSBundle {}
707unsafe impl NSBundleImageExtension for NSBundle {}
708
709/// Deprecated.
710impl NSImage {
711    extern_methods!(
712        #[deprecated = "Use +imageUnfilteredTypes instead"]
713        #[unsafe(method(imageUnfilteredFileTypes))]
714        #[unsafe(method_family = none)]
715        pub fn imageUnfilteredFileTypes() -> Retained<NSArray<NSString>>;
716
717        #[cfg(feature = "NSPasteboard")]
718        #[deprecated = "Use +imageUnfilteredTypes instead"]
719        #[unsafe(method(imageUnfilteredPasteboardTypes))]
720        #[unsafe(method_family = none)]
721        pub fn imageUnfilteredPasteboardTypes() -> Retained<NSArray<NSPasteboardType>>;
722
723        #[deprecated = "Use +imageTypes instead"]
724        #[unsafe(method(imageFileTypes))]
725        #[unsafe(method_family = none)]
726        pub fn imageFileTypes() -> Retained<NSArray<NSString>>;
727
728        #[cfg(feature = "NSPasteboard")]
729        #[deprecated = "Use +imageTypes instead"]
730        #[unsafe(method(imagePasteboardTypes))]
731        #[unsafe(method_family = none)]
732        pub fn imagePasteboardTypes() -> Retained<NSArray<NSPasteboardType>>;
733
734        #[cfg(feature = "NSImageRep")]
735        /// # Safety
736        ///
737        /// - `device_description` generic should be of the correct type.
738        /// - `device_description` might not allow `None`.
739        #[deprecated = "Use -[NSImage bestRepresentationForRect:context:hints:] instead.  Any deviceDescription dictionary is also a valid hints dictionary."]
740        #[unsafe(method(bestRepresentationForDevice:))]
741        #[unsafe(method_family = none)]
742        pub unsafe fn bestRepresentationForDevice(
743            &self,
744            device_description: Option<&NSDictionary>,
745        ) -> Option<Retained<NSImageRep>>;
746
747        #[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."]
748        #[unsafe(method(lockFocus))]
749        #[unsafe(method_family = none)]
750        pub fn lockFocus(&self);
751
752        #[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."]
753        #[unsafe(method(lockFocusFlipped:))]
754        #[unsafe(method_family = none)]
755        pub fn lockFocusFlipped(&self, flipped: bool);
756
757        #[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."]
758        #[unsafe(method(unlockFocus))]
759        #[unsafe(method_family = none)]
760        pub fn unlockFocus(&self);
761
762        #[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."]
763        #[unsafe(method(setFlipped:))]
764        #[unsafe(method_family = none)]
765        pub fn setFlipped(&self, flag: bool);
766
767        #[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."]
768        #[unsafe(method(isFlipped))]
769        #[unsafe(method_family = none)]
770        pub fn isFlipped(&self) -> bool;
771
772        #[deprecated = "You should be able to remove use of this method without any replacement.  See 10.6 AppKit release notes for details."]
773        #[unsafe(method(setScalesWhenResized:))]
774        #[unsafe(method_family = none)]
775        pub fn setScalesWhenResized(&self, flag: bool);
776
777        #[deprecated = "You should be able to remove use of this method without any replacement.  See 10.6 AppKit release notes for details."]
778        #[unsafe(method(scalesWhenResized))]
779        #[unsafe(method_family = none)]
780        pub fn scalesWhenResized(&self) -> bool;
781
782        #[deprecated = "You should be able to remove use of this method without any replacement.  See 10.6 AppKit release notes for details."]
783        #[unsafe(method(setDataRetained:))]
784        #[unsafe(method_family = none)]
785        pub fn setDataRetained(&self, flag: bool);
786
787        #[deprecated = "You should be able to remove use of this method without any replacement.  See 10.6 AppKit release notes for details."]
788        #[unsafe(method(isDataRetained))]
789        #[unsafe(method_family = none)]
790        pub fn isDataRetained(&self) -> bool;
791
792        #[deprecated = "You should be able to remove use of this method without any replacement.  See 10.6 AppKit release notes for details."]
793        #[unsafe(method(setCachedSeparately:))]
794        #[unsafe(method_family = none)]
795        pub fn setCachedSeparately(&self, flag: bool);
796
797        #[deprecated = "You should be able to remove use of this method without any replacement.  See 10.6 AppKit release notes for details."]
798        #[unsafe(method(isCachedSeparately))]
799        #[unsafe(method_family = none)]
800        pub fn isCachedSeparately(&self) -> bool;
801
802        #[deprecated = "You should be able to remove use of this method without any replacement.  See 10.6 AppKit release notes for details."]
803        #[unsafe(method(setCacheDepthMatchesImageDepth:))]
804        #[unsafe(method_family = none)]
805        pub fn setCacheDepthMatchesImageDepth(&self, flag: bool);
806
807        #[deprecated = "You should be able to remove use of this method without any replacement.  See 10.6 AppKit release notes for details."]
808        #[unsafe(method(cacheDepthMatchesImageDepth))]
809        #[unsafe(method_family = none)]
810        pub fn cacheDepthMatchesImageDepth(&self) -> bool;
811
812        #[cfg(feature = "objc2-core-foundation")]
813        #[deprecated = "Use -drawAtPoint:... or -drawInRect:... methods instead"]
814        #[unsafe(method(dissolveToPoint:fraction:))]
815        #[unsafe(method_family = none)]
816        pub fn dissolveToPoint_fraction(&self, point: NSPoint, fraction: CGFloat);
817
818        #[cfg(feature = "objc2-core-foundation")]
819        #[deprecated = "Use -drawAtPoint:... or -drawInRect:... methods instead"]
820        #[unsafe(method(dissolveToPoint:fromRect:fraction:))]
821        #[unsafe(method_family = none)]
822        pub fn dissolveToPoint_fromRect_fraction(
823            &self,
824            point: NSPoint,
825            rect: NSRect,
826            fraction: CGFloat,
827        );
828
829        #[cfg(feature = "NSGraphics")]
830        #[deprecated = "Use -drawAtPoint:... or -drawInRect:... methods instead"]
831        #[unsafe(method(compositeToPoint:operation:))]
832        #[unsafe(method_family = none)]
833        pub fn compositeToPoint_operation(&self, point: NSPoint, operation: NSCompositingOperation);
834
835        #[cfg(feature = "NSGraphics")]
836        #[deprecated = "Use -drawAtPoint:... or -drawInRect:... methods instead"]
837        #[unsafe(method(compositeToPoint:fromRect:operation:))]
838        #[unsafe(method_family = none)]
839        pub fn compositeToPoint_fromRect_operation(
840            &self,
841            point: NSPoint,
842            rect: NSRect,
843            operation: NSCompositingOperation,
844        );
845
846        #[cfg(all(feature = "NSGraphics", feature = "objc2-core-foundation"))]
847        #[deprecated = "Use -drawAtPoint:... or -drawInRect:... methods instead"]
848        #[unsafe(method(compositeToPoint:operation:fraction:))]
849        #[unsafe(method_family = none)]
850        pub fn compositeToPoint_operation_fraction(
851            &self,
852            point: NSPoint,
853            operation: NSCompositingOperation,
854            fraction: CGFloat,
855        );
856
857        #[cfg(all(feature = "NSGraphics", feature = "objc2-core-foundation"))]
858        #[deprecated = "Use -drawAtPoint:... or -drawInRect:... methods instead"]
859        #[unsafe(method(compositeToPoint:fromRect:operation:fraction:))]
860        #[unsafe(method_family = none)]
861        pub fn compositeToPoint_fromRect_operation_fraction(
862            &self,
863            point: NSPoint,
864            rect: NSRect,
865            operation: NSCompositingOperation,
866            fraction: CGFloat,
867        );
868
869        #[cfg(feature = "NSImageRep")]
870        /// # Safety
871        ///
872        /// `image_representation` might not allow `None`.
873        #[deprecated = "Create an image using +[NSImage imageWithSize:flipped:drawingHandler:], and begin your custom drawing with -[NSImageRep drawInRect:] instead."]
874        #[unsafe(method(lockFocusOnRepresentation:))]
875        #[unsafe(method_family = none)]
876        pub unsafe fn lockFocusOnRepresentation(&self, image_representation: Option<&NSImageRep>);
877
878        #[deprecated = "This method does not perform any operation on 10.4 or later."]
879        #[unsafe(method(cancelIncrementalLoad))]
880        #[unsafe(method_family = none)]
881        pub fn cancelIncrementalLoad(&self);
882    );
883}
884
885extern "C" {
886    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenameaddtemplate?language=objc)
887    pub static NSImageNameAddTemplate: &'static NSImageName;
888}
889
890extern "C" {
891    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamebluetoothtemplate?language=objc)
892    pub static NSImageNameBluetoothTemplate: &'static NSImageName;
893}
894
895extern "C" {
896    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamebonjour?language=objc)
897    pub static NSImageNameBonjour: &'static NSImageName;
898}
899
900extern "C" {
901    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamebookmarkstemplate?language=objc)
902    pub static NSImageNameBookmarksTemplate: &'static NSImageName;
903}
904
905extern "C" {
906    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamecaution?language=objc)
907    pub static NSImageNameCaution: &'static NSImageName;
908}
909
910extern "C" {
911    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamecomputer?language=objc)
912    pub static NSImageNameComputer: &'static NSImageName;
913}
914
915extern "C" {
916    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenameenterfullscreentemplate?language=objc)
917    pub static NSImageNameEnterFullScreenTemplate: &'static NSImageName;
918}
919
920extern "C" {
921    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenameexitfullscreentemplate?language=objc)
922    pub static NSImageNameExitFullScreenTemplate: &'static NSImageName;
923}
924
925extern "C" {
926    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamefolder?language=objc)
927    pub static NSImageNameFolder: &'static NSImageName;
928}
929
930extern "C" {
931    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamefolderburnable?language=objc)
932    pub static NSImageNameFolderBurnable: &'static NSImageName;
933}
934
935extern "C" {
936    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamefoldersmart?language=objc)
937    pub static NSImageNameFolderSmart: &'static NSImageName;
938}
939
940extern "C" {
941    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamefollowlinkfreestandingtemplate?language=objc)
942    pub static NSImageNameFollowLinkFreestandingTemplate: &'static NSImageName;
943}
944
945extern "C" {
946    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamehometemplate?language=objc)
947    pub static NSImageNameHomeTemplate: &'static NSImageName;
948}
949
950extern "C" {
951    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenameichattheatertemplate?language=objc)
952    pub static NSImageNameIChatTheaterTemplate: &'static NSImageName;
953}
954
955extern "C" {
956    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamelocklockedtemplate?language=objc)
957    pub static NSImageNameLockLockedTemplate: &'static NSImageName;
958}
959
960extern "C" {
961    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamelockunlockedtemplate?language=objc)
962    pub static NSImageNameLockUnlockedTemplate: &'static NSImageName;
963}
964
965extern "C" {
966    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamenetwork?language=objc)
967    pub static NSImageNameNetwork: &'static NSImageName;
968}
969
970extern "C" {
971    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamepathtemplate?language=objc)
972    pub static NSImageNamePathTemplate: &'static NSImageName;
973}
974
975extern "C" {
976    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamequicklooktemplate?language=objc)
977    pub static NSImageNameQuickLookTemplate: &'static NSImageName;
978}
979
980extern "C" {
981    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamerefreshfreestandingtemplate?language=objc)
982    pub static NSImageNameRefreshFreestandingTemplate: &'static NSImageName;
983}
984
985extern "C" {
986    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamerefreshtemplate?language=objc)
987    pub static NSImageNameRefreshTemplate: &'static NSImageName;
988}
989
990extern "C" {
991    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenameremovetemplate?language=objc)
992    pub static NSImageNameRemoveTemplate: &'static NSImageName;
993}
994
995extern "C" {
996    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamerevealfreestandingtemplate?language=objc)
997    pub static NSImageNameRevealFreestandingTemplate: &'static NSImageName;
998}
999
1000extern "C" {
1001    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamesharetemplate?language=objc)
1002    pub static NSImageNameShareTemplate: &'static NSImageName;
1003}
1004
1005extern "C" {
1006    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenameslideshowtemplate?language=objc)
1007    pub static NSImageNameSlideshowTemplate: &'static NSImageName;
1008}
1009
1010extern "C" {
1011    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamestatusavailable?language=objc)
1012    pub static NSImageNameStatusAvailable: &'static NSImageName;
1013}
1014
1015extern "C" {
1016    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamestatusnone?language=objc)
1017    pub static NSImageNameStatusNone: &'static NSImageName;
1018}
1019
1020extern "C" {
1021    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamestatuspartiallyavailable?language=objc)
1022    pub static NSImageNameStatusPartiallyAvailable: &'static NSImageName;
1023}
1024
1025extern "C" {
1026    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamestatusunavailable?language=objc)
1027    pub static NSImageNameStatusUnavailable: &'static NSImageName;
1028}
1029
1030extern "C" {
1031    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamestopprogressfreestandingtemplate?language=objc)
1032    pub static NSImageNameStopProgressFreestandingTemplate: &'static NSImageName;
1033}
1034
1035extern "C" {
1036    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamestopprogresstemplate?language=objc)
1037    pub static NSImageNameStopProgressTemplate: &'static NSImageName;
1038}
1039
1040extern "C" {
1041    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametrashempty?language=objc)
1042    pub static NSImageNameTrashEmpty: &'static NSImageName;
1043}
1044
1045extern "C" {
1046    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametrashfull?language=objc)
1047    pub static NSImageNameTrashFull: &'static NSImageName;
1048}
1049
1050extern "C" {
1051    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenameactiontemplate?language=objc)
1052    pub static NSImageNameActionTemplate: &'static NSImageName;
1053}
1054
1055extern "C" {
1056    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamesmartbadgetemplate?language=objc)
1057    pub static NSImageNameSmartBadgeTemplate: &'static NSImageName;
1058}
1059
1060extern "C" {
1061    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenameiconviewtemplate?language=objc)
1062    pub static NSImageNameIconViewTemplate: &'static NSImageName;
1063}
1064
1065extern "C" {
1066    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamelistviewtemplate?language=objc)
1067    pub static NSImageNameListViewTemplate: &'static NSImageName;
1068}
1069
1070extern "C" {
1071    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamecolumnviewtemplate?language=objc)
1072    pub static NSImageNameColumnViewTemplate: &'static NSImageName;
1073}
1074
1075extern "C" {
1076    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenameflowviewtemplate?language=objc)
1077    pub static NSImageNameFlowViewTemplate: &'static NSImageName;
1078}
1079
1080extern "C" {
1081    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenameinvaliddatafreestandingtemplate?language=objc)
1082    pub static NSImageNameInvalidDataFreestandingTemplate: &'static NSImageName;
1083}
1084
1085extern "C" {
1086    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamegoforwardtemplate?language=objc)
1087    pub static NSImageNameGoForwardTemplate: &'static NSImageName;
1088}
1089
1090extern "C" {
1091    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamegobacktemplate?language=objc)
1092    pub static NSImageNameGoBackTemplate: &'static NSImageName;
1093}
1094
1095extern "C" {
1096    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamegorighttemplate?language=objc)
1097    pub static NSImageNameGoRightTemplate: &'static NSImageName;
1098}
1099
1100extern "C" {
1101    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamegolefttemplate?language=objc)
1102    pub static NSImageNameGoLeftTemplate: &'static NSImageName;
1103}
1104
1105extern "C" {
1106    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamerightfacingtriangletemplate?language=objc)
1107    pub static NSImageNameRightFacingTriangleTemplate: &'static NSImageName;
1108}
1109
1110extern "C" {
1111    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenameleftfacingtriangletemplate?language=objc)
1112    pub static NSImageNameLeftFacingTriangleTemplate: &'static NSImageName;
1113}
1114
1115extern "C" {
1116    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamedotmac?language=objc)
1117    #[deprecated]
1118    pub static NSImageNameDotMac: &'static NSImageName;
1119}
1120
1121extern "C" {
1122    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamemobileme?language=objc)
1123    pub static NSImageNameMobileMe: &'static NSImageName;
1124}
1125
1126extern "C" {
1127    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamemultipledocuments?language=objc)
1128    pub static NSImageNameMultipleDocuments: &'static NSImageName;
1129}
1130
1131extern "C" {
1132    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenameuseraccounts?language=objc)
1133    pub static NSImageNameUserAccounts: &'static NSImageName;
1134}
1135
1136extern "C" {
1137    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamepreferencesgeneral?language=objc)
1138    pub static NSImageNamePreferencesGeneral: &'static NSImageName;
1139}
1140
1141extern "C" {
1142    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenameadvanced?language=objc)
1143    pub static NSImageNameAdvanced: &'static NSImageName;
1144}
1145
1146extern "C" {
1147    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenameinfo?language=objc)
1148    pub static NSImageNameInfo: &'static NSImageName;
1149}
1150
1151extern "C" {
1152    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamefontpanel?language=objc)
1153    pub static NSImageNameFontPanel: &'static NSImageName;
1154}
1155
1156extern "C" {
1157    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamecolorpanel?language=objc)
1158    pub static NSImageNameColorPanel: &'static NSImageName;
1159}
1160
1161extern "C" {
1162    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenameuser?language=objc)
1163    pub static NSImageNameUser: &'static NSImageName;
1164}
1165
1166extern "C" {
1167    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenameusergroup?language=objc)
1168    pub static NSImageNameUserGroup: &'static NSImageName;
1169}
1170
1171extern "C" {
1172    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenameeveryone?language=objc)
1173    pub static NSImageNameEveryone: &'static NSImageName;
1174}
1175
1176extern "C" {
1177    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenameuserguest?language=objc)
1178    pub static NSImageNameUserGuest: &'static NSImageName;
1179}
1180
1181extern "C" {
1182    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamemenuonstatetemplate?language=objc)
1183    pub static NSImageNameMenuOnStateTemplate: &'static NSImageName;
1184}
1185
1186extern "C" {
1187    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenamemenumixedstatetemplate?language=objc)
1188    pub static NSImageNameMenuMixedStateTemplate: &'static NSImageName;
1189}
1190
1191extern "C" {
1192    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenameapplicationicon?language=objc)
1193    pub static NSImageNameApplicationIcon: &'static NSImageName;
1194}
1195
1196extern "C" {
1197    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbaradddetailtemplate?language=objc)
1198    pub static NSImageNameTouchBarAddDetailTemplate: &'static NSImageName;
1199}
1200
1201extern "C" {
1202    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbaraddtemplate?language=objc)
1203    pub static NSImageNameTouchBarAddTemplate: &'static NSImageName;
1204}
1205
1206extern "C" {
1207    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbaralarmtemplate?language=objc)
1208    pub static NSImageNameTouchBarAlarmTemplate: &'static NSImageName;
1209}
1210
1211extern "C" {
1212    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbaraudioinputmutetemplate?language=objc)
1213    pub static NSImageNameTouchBarAudioInputMuteTemplate: &'static NSImageName;
1214}
1215
1216extern "C" {
1217    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbaraudioinputtemplate?language=objc)
1218    pub static NSImageNameTouchBarAudioInputTemplate: &'static NSImageName;
1219}
1220
1221extern "C" {
1222    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbaraudiooutputmutetemplate?language=objc)
1223    pub static NSImageNameTouchBarAudioOutputMuteTemplate: &'static NSImageName;
1224}
1225
1226extern "C" {
1227    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbaraudiooutputvolumehightemplate?language=objc)
1228    pub static NSImageNameTouchBarAudioOutputVolumeHighTemplate: &'static NSImageName;
1229}
1230
1231extern "C" {
1232    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbaraudiooutputvolumelowtemplate?language=objc)
1233    pub static NSImageNameTouchBarAudioOutputVolumeLowTemplate: &'static NSImageName;
1234}
1235
1236extern "C" {
1237    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbaraudiooutputvolumemediumtemplate?language=objc)
1238    pub static NSImageNameTouchBarAudioOutputVolumeMediumTemplate: &'static NSImageName;
1239}
1240
1241extern "C" {
1242    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbaraudiooutputvolumeofftemplate?language=objc)
1243    pub static NSImageNameTouchBarAudioOutputVolumeOffTemplate: &'static NSImageName;
1244}
1245
1246extern "C" {
1247    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarbookmarkstemplate?language=objc)
1248    pub static NSImageNameTouchBarBookmarksTemplate: &'static NSImageName;
1249}
1250
1251extern "C" {
1252    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarcolorpickerfill?language=objc)
1253    pub static NSImageNameTouchBarColorPickerFill: &'static NSImageName;
1254}
1255
1256extern "C" {
1257    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarcolorpickerfont?language=objc)
1258    pub static NSImageNameTouchBarColorPickerFont: &'static NSImageName;
1259}
1260
1261extern "C" {
1262    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarcolorpickerstroke?language=objc)
1263    pub static NSImageNameTouchBarColorPickerStroke: &'static NSImageName;
1264}
1265
1266extern "C" {
1267    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarcommunicationaudiotemplate?language=objc)
1268    pub static NSImageNameTouchBarCommunicationAudioTemplate: &'static NSImageName;
1269}
1270
1271extern "C" {
1272    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarcommunicationvideotemplate?language=objc)
1273    pub static NSImageNameTouchBarCommunicationVideoTemplate: &'static NSImageName;
1274}
1275
1276extern "C" {
1277    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarcomposetemplate?language=objc)
1278    pub static NSImageNameTouchBarComposeTemplate: &'static NSImageName;
1279}
1280
1281extern "C" {
1282    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbardeletetemplate?language=objc)
1283    pub static NSImageNameTouchBarDeleteTemplate: &'static NSImageName;
1284}
1285
1286extern "C" {
1287    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbardownloadtemplate?language=objc)
1288    pub static NSImageNameTouchBarDownloadTemplate: &'static NSImageName;
1289}
1290
1291extern "C" {
1292    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarenterfullscreentemplate?language=objc)
1293    pub static NSImageNameTouchBarEnterFullScreenTemplate: &'static NSImageName;
1294}
1295
1296extern "C" {
1297    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarexitfullscreentemplate?language=objc)
1298    pub static NSImageNameTouchBarExitFullScreenTemplate: &'static NSImageName;
1299}
1300
1301extern "C" {
1302    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarfastforwardtemplate?language=objc)
1303    pub static NSImageNameTouchBarFastForwardTemplate: &'static NSImageName;
1304}
1305
1306extern "C" {
1307    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarfoldercopytotemplate?language=objc)
1308    pub static NSImageNameTouchBarFolderCopyToTemplate: &'static NSImageName;
1309}
1310
1311extern "C" {
1312    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarfoldermovetotemplate?language=objc)
1313    pub static NSImageNameTouchBarFolderMoveToTemplate: &'static NSImageName;
1314}
1315
1316extern "C" {
1317    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarfoldertemplate?language=objc)
1318    pub static NSImageNameTouchBarFolderTemplate: &'static NSImageName;
1319}
1320
1321extern "C" {
1322    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbargetinfotemplate?language=objc)
1323    pub static NSImageNameTouchBarGetInfoTemplate: &'static NSImageName;
1324}
1325
1326extern "C" {
1327    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbargobacktemplate?language=objc)
1328    pub static NSImageNameTouchBarGoBackTemplate: &'static NSImageName;
1329}
1330
1331extern "C" {
1332    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbargodowntemplate?language=objc)
1333    pub static NSImageNameTouchBarGoDownTemplate: &'static NSImageName;
1334}
1335
1336extern "C" {
1337    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbargoforwardtemplate?language=objc)
1338    pub static NSImageNameTouchBarGoForwardTemplate: &'static NSImageName;
1339}
1340
1341extern "C" {
1342    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbargouptemplate?language=objc)
1343    pub static NSImageNameTouchBarGoUpTemplate: &'static NSImageName;
1344}
1345
1346extern "C" {
1347    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarhistorytemplate?language=objc)
1348    pub static NSImageNameTouchBarHistoryTemplate: &'static NSImageName;
1349}
1350
1351extern "C" {
1352    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbariconviewtemplate?language=objc)
1353    pub static NSImageNameTouchBarIconViewTemplate: &'static NSImageName;
1354}
1355
1356extern "C" {
1357    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarlistviewtemplate?language=objc)
1358    pub static NSImageNameTouchBarListViewTemplate: &'static NSImageName;
1359}
1360
1361extern "C" {
1362    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarmailtemplate?language=objc)
1363    pub static NSImageNameTouchBarMailTemplate: &'static NSImageName;
1364}
1365
1366extern "C" {
1367    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarnewfoldertemplate?language=objc)
1368    pub static NSImageNameTouchBarNewFolderTemplate: &'static NSImageName;
1369}
1370
1371extern "C" {
1372    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarnewmessagetemplate?language=objc)
1373    pub static NSImageNameTouchBarNewMessageTemplate: &'static NSImageName;
1374}
1375
1376extern "C" {
1377    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbaropeninbrowsertemplate?language=objc)
1378    pub static NSImageNameTouchBarOpenInBrowserTemplate: &'static NSImageName;
1379}
1380
1381extern "C" {
1382    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarpausetemplate?language=objc)
1383    pub static NSImageNameTouchBarPauseTemplate: &'static NSImageName;
1384}
1385
1386extern "C" {
1387    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarplaypausetemplate?language=objc)
1388    pub static NSImageNameTouchBarPlayPauseTemplate: &'static NSImageName;
1389}
1390
1391extern "C" {
1392    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarplaytemplate?language=objc)
1393    pub static NSImageNameTouchBarPlayTemplate: &'static NSImageName;
1394}
1395
1396extern "C" {
1397    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarquicklooktemplate?language=objc)
1398    pub static NSImageNameTouchBarQuickLookTemplate: &'static NSImageName;
1399}
1400
1401extern "C" {
1402    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarrecordstarttemplate?language=objc)
1403    pub static NSImageNameTouchBarRecordStartTemplate: &'static NSImageName;
1404}
1405
1406extern "C" {
1407    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarrecordstoptemplate?language=objc)
1408    pub static NSImageNameTouchBarRecordStopTemplate: &'static NSImageName;
1409}
1410
1411extern "C" {
1412    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarrefreshtemplate?language=objc)
1413    pub static NSImageNameTouchBarRefreshTemplate: &'static NSImageName;
1414}
1415
1416extern "C" {
1417    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarremovetemplate?language=objc)
1418    pub static NSImageNameTouchBarRemoveTemplate: &'static NSImageName;
1419}
1420
1421extern "C" {
1422    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarrewindtemplate?language=objc)
1423    pub static NSImageNameTouchBarRewindTemplate: &'static NSImageName;
1424}
1425
1426extern "C" {
1427    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarrotatelefttemplate?language=objc)
1428    pub static NSImageNameTouchBarRotateLeftTemplate: &'static NSImageName;
1429}
1430
1431extern "C" {
1432    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarrotaterighttemplate?language=objc)
1433    pub static NSImageNameTouchBarRotateRightTemplate: &'static NSImageName;
1434}
1435
1436extern "C" {
1437    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarsearchtemplate?language=objc)
1438    pub static NSImageNameTouchBarSearchTemplate: &'static NSImageName;
1439}
1440
1441extern "C" {
1442    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarsharetemplate?language=objc)
1443    pub static NSImageNameTouchBarShareTemplate: &'static NSImageName;
1444}
1445
1446extern "C" {
1447    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarsidebartemplate?language=objc)
1448    pub static NSImageNameTouchBarSidebarTemplate: &'static NSImageName;
1449}
1450
1451extern "C" {
1452    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarskipahead15secondstemplate?language=objc)
1453    pub static NSImageNameTouchBarSkipAhead15SecondsTemplate: &'static NSImageName;
1454}
1455
1456extern "C" {
1457    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarskipahead30secondstemplate?language=objc)
1458    pub static NSImageNameTouchBarSkipAhead30SecondsTemplate: &'static NSImageName;
1459}
1460
1461extern "C" {
1462    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarskipaheadtemplate?language=objc)
1463    pub static NSImageNameTouchBarSkipAheadTemplate: &'static NSImageName;
1464}
1465
1466extern "C" {
1467    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarskipback15secondstemplate?language=objc)
1468    pub static NSImageNameTouchBarSkipBack15SecondsTemplate: &'static NSImageName;
1469}
1470
1471extern "C" {
1472    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarskipback30secondstemplate?language=objc)
1473    pub static NSImageNameTouchBarSkipBack30SecondsTemplate: &'static NSImageName;
1474}
1475
1476extern "C" {
1477    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarskipbacktemplate?language=objc)
1478    pub static NSImageNameTouchBarSkipBackTemplate: &'static NSImageName;
1479}
1480
1481extern "C" {
1482    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarskiptoendtemplate?language=objc)
1483    pub static NSImageNameTouchBarSkipToEndTemplate: &'static NSImageName;
1484}
1485
1486extern "C" {
1487    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarskiptostarttemplate?language=objc)
1488    pub static NSImageNameTouchBarSkipToStartTemplate: &'static NSImageName;
1489}
1490
1491extern "C" {
1492    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarslideshowtemplate?language=objc)
1493    pub static NSImageNameTouchBarSlideshowTemplate: &'static NSImageName;
1494}
1495
1496extern "C" {
1497    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbartagicontemplate?language=objc)
1498    pub static NSImageNameTouchBarTagIconTemplate: &'static NSImageName;
1499}
1500
1501extern "C" {
1502    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbartextboldtemplate?language=objc)
1503    pub static NSImageNameTouchBarTextBoldTemplate: &'static NSImageName;
1504}
1505
1506extern "C" {
1507    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbartextboxtemplate?language=objc)
1508    pub static NSImageNameTouchBarTextBoxTemplate: &'static NSImageName;
1509}
1510
1511extern "C" {
1512    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbartextcenteraligntemplate?language=objc)
1513    pub static NSImageNameTouchBarTextCenterAlignTemplate: &'static NSImageName;
1514}
1515
1516extern "C" {
1517    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbartextitalictemplate?language=objc)
1518    pub static NSImageNameTouchBarTextItalicTemplate: &'static NSImageName;
1519}
1520
1521extern "C" {
1522    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbartextjustifiedaligntemplate?language=objc)
1523    pub static NSImageNameTouchBarTextJustifiedAlignTemplate: &'static NSImageName;
1524}
1525
1526extern "C" {
1527    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbartextleftaligntemplate?language=objc)
1528    pub static NSImageNameTouchBarTextLeftAlignTemplate: &'static NSImageName;
1529}
1530
1531extern "C" {
1532    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbartextlisttemplate?language=objc)
1533    pub static NSImageNameTouchBarTextListTemplate: &'static NSImageName;
1534}
1535
1536extern "C" {
1537    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbartextrightaligntemplate?language=objc)
1538    pub static NSImageNameTouchBarTextRightAlignTemplate: &'static NSImageName;
1539}
1540
1541extern "C" {
1542    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbartextstrikethroughtemplate?language=objc)
1543    pub static NSImageNameTouchBarTextStrikethroughTemplate: &'static NSImageName;
1544}
1545
1546extern "C" {
1547    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbartextunderlinetemplate?language=objc)
1548    pub static NSImageNameTouchBarTextUnderlineTemplate: &'static NSImageName;
1549}
1550
1551extern "C" {
1552    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbaruseraddtemplate?language=objc)
1553    pub static NSImageNameTouchBarUserAddTemplate: &'static NSImageName;
1554}
1555
1556extern "C" {
1557    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarusergrouptemplate?language=objc)
1558    pub static NSImageNameTouchBarUserGroupTemplate: &'static NSImageName;
1559}
1560
1561extern "C" {
1562    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarusertemplate?language=objc)
1563    pub static NSImageNameTouchBarUserTemplate: &'static NSImageName;
1564}
1565
1566extern "C" {
1567    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarvolumedowntemplate?language=objc)
1568    pub static NSImageNameTouchBarVolumeDownTemplate: &'static NSImageName;
1569}
1570
1571extern "C" {
1572    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarvolumeuptemplate?language=objc)
1573    pub static NSImageNameTouchBarVolumeUpTemplate: &'static NSImageName;
1574}
1575
1576extern "C" {
1577    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagenametouchbarplayheadtemplate?language=objc)
1578    pub static NSImageNameTouchBarPlayheadTemplate: &'static NSImageName;
1579}
1580
1581/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagesymbolscale?language=objc)
1582// NS_ENUM
1583#[repr(transparent)]
1584#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1585pub struct NSImageSymbolScale(pub NSInteger);
1586impl NSImageSymbolScale {
1587    #[doc(alias = "NSImageSymbolScaleSmall")]
1588    pub const Small: Self = Self(1);
1589    #[doc(alias = "NSImageSymbolScaleMedium")]
1590    pub const Medium: Self = Self(2);
1591    #[doc(alias = "NSImageSymbolScaleLarge")]
1592    pub const Large: Self = Self(3);
1593}
1594
1595unsafe impl Encode for NSImageSymbolScale {
1596    const ENCODING: Encoding = NSInteger::ENCODING;
1597}
1598
1599unsafe impl RefEncode for NSImageSymbolScale {
1600    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1601}
1602
1603/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagesymbolvariablevaluemode?language=objc)
1604// NS_ENUM
1605#[repr(transparent)]
1606#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1607pub struct NSImageSymbolVariableValueMode(pub NSInteger);
1608impl NSImageSymbolVariableValueMode {
1609    /// Automatically selects an appropriate variable value mode for the symbol.
1610    #[doc(alias = "NSImageSymbolVariableValueModeAutomatic")]
1611    pub const Automatic: Self = Self(0);
1612    /// The "color" variable value mode. Sets the opacity of each variable layer to
1613    /// either on or off depending on how its threshold compared to the current value.
1614    #[doc(alias = "NSImageSymbolVariableValueModeColor")]
1615    pub const Color: Self = Self(1);
1616    /// The "draw" variable value mode. Changes the drawn length of each variable layer
1617    /// to either based on how its range relates to the current value.
1618    #[doc(alias = "NSImageSymbolVariableValueModeDraw")]
1619    pub const Draw: Self = Self(2);
1620}
1621
1622unsafe impl Encode for NSImageSymbolVariableValueMode {
1623    const ENCODING: Encoding = NSInteger::ENCODING;
1624}
1625
1626unsafe impl RefEncode for NSImageSymbolVariableValueMode {
1627    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1628}
1629
1630unsafe impl Send for NSImageSymbolVariableValueMode {}
1631
1632unsafe impl Sync for NSImageSymbolVariableValueMode {}
1633
1634/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagesymbolcolorrenderingmode?language=objc)
1635// NS_ENUM
1636#[repr(transparent)]
1637#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1638pub struct NSImageSymbolColorRenderingMode(pub NSInteger);
1639impl NSImageSymbolColorRenderingMode {
1640    /// Automatically uses an appropriate color rendering mode for the symbol’s color layers.
1641    #[doc(alias = "NSImageSymbolColorRenderingModeAutomatic")]
1642    pub const Automatic: Self = Self(0);
1643    /// Renders the symbol’s color layers using flat colors.
1644    #[doc(alias = "NSImageSymbolColorRenderingModeFlat")]
1645    pub const Flat: Self = Self(1);
1646    /// Renders the symbol’s color layers using gradients.
1647    #[doc(alias = "NSImageSymbolColorRenderingModeGradient")]
1648    pub const Gradient: Self = Self(2);
1649}
1650
1651unsafe impl Encode for NSImageSymbolColorRenderingMode {
1652    const ENCODING: Encoding = NSInteger::ENCODING;
1653}
1654
1655unsafe impl RefEncode for NSImageSymbolColorRenderingMode {
1656    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1657}
1658
1659unsafe impl Send for NSImageSymbolColorRenderingMode {}
1660
1661unsafe impl Sync for NSImageSymbolColorRenderingMode {}
1662
1663extern_class!(
1664    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsimagesymbolconfiguration?language=objc)
1665    #[unsafe(super(NSObject))]
1666    #[derive(Debug, PartialEq, Eq, Hash)]
1667    pub struct NSImageSymbolConfiguration;
1668);
1669
1670extern_conformance!(
1671    unsafe impl NSCoding for NSImageSymbolConfiguration {}
1672);
1673
1674extern_conformance!(
1675    unsafe impl NSCopying for NSImageSymbolConfiguration {}
1676);
1677
1678unsafe impl CopyingHelper for NSImageSymbolConfiguration {
1679    type Result = Self;
1680}
1681
1682extern_conformance!(
1683    unsafe impl NSObjectProtocol for NSImageSymbolConfiguration {}
1684);
1685
1686extern_conformance!(
1687    unsafe impl NSSecureCoding for NSImageSymbolConfiguration {}
1688);
1689
1690impl NSImageSymbolConfiguration {
1691    extern_methods!(
1692        #[cfg(all(feature = "NSFontDescriptor", feature = "objc2-core-foundation"))]
1693        #[unsafe(method(configurationWithPointSize:weight:scale:))]
1694        #[unsafe(method_family = none)]
1695        pub fn configurationWithPointSize_weight_scale(
1696            point_size: CGFloat,
1697            weight: NSFontWeight,
1698            scale: NSImageSymbolScale,
1699        ) -> Retained<Self>;
1700
1701        #[cfg(all(feature = "NSFontDescriptor", feature = "objc2-core-foundation"))]
1702        #[unsafe(method(configurationWithPointSize:weight:))]
1703        #[unsafe(method_family = none)]
1704        pub fn configurationWithPointSize_weight(
1705            point_size: CGFloat,
1706            weight: NSFontWeight,
1707        ) -> Retained<Self>;
1708
1709        #[cfg(feature = "NSFontDescriptor")]
1710        #[unsafe(method(configurationWithTextStyle:scale:))]
1711        #[unsafe(method_family = none)]
1712        pub fn configurationWithTextStyle_scale(
1713            style: &NSFontTextStyle,
1714            scale: NSImageSymbolScale,
1715        ) -> Retained<Self>;
1716
1717        #[cfg(feature = "NSFontDescriptor")]
1718        #[unsafe(method(configurationWithTextStyle:))]
1719        #[unsafe(method_family = none)]
1720        pub fn configurationWithTextStyle(style: &NSFontTextStyle) -> Retained<Self>;
1721
1722        #[unsafe(method(configurationWithScale:))]
1723        #[unsafe(method_family = none)]
1724        pub fn configurationWithScale(scale: NSImageSymbolScale) -> Retained<Self>;
1725
1726        /// Create a configuration that specifies that the symbol should prefer its monochrome variant.
1727        #[unsafe(method(configurationPreferringMonochrome))]
1728        #[unsafe(method_family = none)]
1729        pub fn configurationPreferringMonochrome() -> Retained<Self>;
1730
1731        /// Create a configuration that specifies that the symbol should prefer its hierarchical variant, if one exists.
1732        ///
1733        /// If the symbol doesn’t support hierarchical, the result will be a monochrome (templated) symbol.
1734        #[unsafe(method(configurationPreferringHierarchical))]
1735        #[unsafe(method_family = none)]
1736        pub fn configurationPreferringHierarchical() -> Retained<Self>;
1737
1738        #[cfg(feature = "NSColor")]
1739        /// Create a color configuration with a palette derived from one color.
1740        ///
1741        /// A color scheme will be created based on the provided color, deriving secondary and tertiary colors by reducing the intensity of the base color. This is typically (but not only) accomplished by reducing opacity of the primary color.
1742        ///
1743        /// When combined with another configuration creating a palette, the last specified configuration will win, overwriting the other color configuration.
1744        ///
1745        /// If the symbol doesn’t have a palette-based variant, the configuration will have no effect and the result will be a monochrome (templated) symbol.
1746        #[unsafe(method(configurationWithHierarchicalColor:))]
1747        #[unsafe(method_family = none)]
1748        pub fn configurationWithHierarchicalColor(hierarchical_color: &NSColor) -> Retained<Self>;
1749
1750        #[cfg(feature = "NSColor")]
1751        /// Create a color configuration by specifying a palette of colors. The colors are used sequentially per layer: the first color for the first layer, the second color for the second layer etc. This is independent of the hierarchy level of the layer.
1752        ///
1753        /// When combined with another configuration creating a palette, the last specified configuration will win, overwriting the other color configuration.
1754        ///
1755        /// If the symbol doesn’t have a palette-based variant, the configuration will have no effect and the result will be a monochrome (templated) symbol.
1756        #[unsafe(method(configurationWithPaletteColors:))]
1757        #[unsafe(method_family = none)]
1758        pub fn configurationWithPaletteColors(palette_colors: &NSArray<NSColor>) -> Retained<Self>;
1759
1760        /// Create a configuration that specifies that the symbol should prefer its multicolor variant, if one exists.
1761        ///
1762        /// This configuration can be combined with one of the palette-based configurations; in that case, the symbol will use the multicolor variant if one exists, or the palette variant otherwise.
1763        ///
1764        /// If the symbol supports neither, the result will be a monochrome (templated) symbol.
1765        #[unsafe(method(configurationPreferringMulticolor))]
1766        #[unsafe(method_family = none)]
1767        pub fn configurationPreferringMulticolor() -> Retained<Self>;
1768
1769        /// Create a configuration with a specified variable value mode.
1770        #[unsafe(method(configurationWithVariableValueMode:))]
1771        #[unsafe(method_family = none)]
1772        pub fn configurationWithVariableValueMode(
1773            variable_value_mode: NSImageSymbolVariableValueMode,
1774        ) -> Retained<Self>;
1775
1776        /// Create a configuration with a specific color rendering mode.
1777        #[unsafe(method(configurationWithColorRenderingMode:))]
1778        #[unsafe(method_family = none)]
1779        pub fn configurationWithColorRenderingMode(
1780            mode: NSImageSymbolColorRenderingMode,
1781        ) -> Retained<Self>;
1782
1783        /// Returns a new configuration object whose values are defined by applying values from the provided configuration and the receiver.
1784        ///
1785        /// Values defined by both configurations will use the provided configuration’s values.
1786        #[unsafe(method(configurationByApplyingConfiguration:))]
1787        #[unsafe(method_family = none)]
1788        pub fn configurationByApplyingConfiguration(
1789            &self,
1790            configuration: &NSImageSymbolConfiguration,
1791        ) -> Retained<Self>;
1792    );
1793}
1794
1795/// Methods declared on superclass `NSObject`.
1796impl NSImageSymbolConfiguration {
1797    extern_methods!(
1798        #[unsafe(method(init))]
1799        #[unsafe(method_family = init)]
1800        pub fn init(this: Allocated<Self>) -> Retained<Self>;
1801
1802        #[unsafe(method(new))]
1803        #[unsafe(method_family = new)]
1804        pub fn new() -> Retained<Self>;
1805    );
1806}
1807
1808impl DefaultRetained for NSImageSymbolConfiguration {
1809    #[inline]
1810    fn default_retained() -> Retained<Self> {
1811        Self::new()
1812    }
1813}