1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12#[repr(transparent)]
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub struct NSCompositingOperation(pub NSUInteger);
17impl NSCompositingOperation {
18 #[doc(alias = "NSCompositingOperationClear")]
19 pub const Clear: Self = Self(0);
20 #[doc(alias = "NSCompositingOperationCopy")]
21 pub const Copy: Self = Self(1);
22 #[doc(alias = "NSCompositingOperationSourceOver")]
23 pub const SourceOver: Self = Self(2);
24 #[doc(alias = "NSCompositingOperationSourceIn")]
25 pub const SourceIn: Self = Self(3);
26 #[doc(alias = "NSCompositingOperationSourceOut")]
27 pub const SourceOut: Self = Self(4);
28 #[doc(alias = "NSCompositingOperationSourceAtop")]
29 pub const SourceAtop: Self = Self(5);
30 #[doc(alias = "NSCompositingOperationDestinationOver")]
31 pub const DestinationOver: Self = Self(6);
32 #[doc(alias = "NSCompositingOperationDestinationIn")]
33 pub const DestinationIn: Self = Self(7);
34 #[doc(alias = "NSCompositingOperationDestinationOut")]
35 pub const DestinationOut: Self = Self(8);
36 #[doc(alias = "NSCompositingOperationDestinationAtop")]
37 pub const DestinationAtop: Self = Self(9);
38 #[doc(alias = "NSCompositingOperationXOR")]
39 pub const XOR: Self = Self(10);
40 #[doc(alias = "NSCompositingOperationPlusDarker")]
41 pub const PlusDarker: Self = Self(11);
42 #[doc(alias = "NSCompositingOperationHighlight")]
43 #[deprecated = "Use NSCompositingOperationSourceOver instead"]
44 pub const Highlight: Self = Self(12);
45 #[doc(alias = "NSCompositingOperationPlusLighter")]
46 pub const PlusLighter: Self = Self(13);
47 #[doc(alias = "NSCompositingOperationMultiply")]
48 pub const Multiply: Self = Self(14);
49 #[doc(alias = "NSCompositingOperationScreen")]
50 pub const Screen: Self = Self(15);
51 #[doc(alias = "NSCompositingOperationOverlay")]
52 pub const Overlay: Self = Self(16);
53 #[doc(alias = "NSCompositingOperationDarken")]
54 pub const Darken: Self = Self(17);
55 #[doc(alias = "NSCompositingOperationLighten")]
56 pub const Lighten: Self = Self(18);
57 #[doc(alias = "NSCompositingOperationColorDodge")]
58 pub const ColorDodge: Self = Self(19);
59 #[doc(alias = "NSCompositingOperationColorBurn")]
60 pub const ColorBurn: Self = Self(20);
61 #[doc(alias = "NSCompositingOperationSoftLight")]
62 pub const SoftLight: Self = Self(21);
63 #[doc(alias = "NSCompositingOperationHardLight")]
64 pub const HardLight: Self = Self(22);
65 #[doc(alias = "NSCompositingOperationDifference")]
66 pub const Difference: Self = Self(23);
67 #[doc(alias = "NSCompositingOperationExclusion")]
68 pub const Exclusion: Self = Self(24);
69 #[doc(alias = "NSCompositingOperationHue")]
70 pub const Hue: Self = Self(25);
71 #[doc(alias = "NSCompositingOperationSaturation")]
72 pub const Saturation: Self = Self(26);
73 #[doc(alias = "NSCompositingOperationColor")]
74 pub const Color: Self = Self(27);
75 #[doc(alias = "NSCompositingOperationLuminosity")]
76 pub const Luminosity: Self = Self(28);
77}
78
79unsafe impl Encode for NSCompositingOperation {
80 const ENCODING: Encoding = NSUInteger::ENCODING;
81}
82
83unsafe impl RefEncode for NSCompositingOperation {
84 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
85}
86
87pub static NSCompositeClear: NSCompositingOperation =
89 NSCompositingOperation(NSCompositingOperation::Clear.0);
90
91pub static NSCompositeCopy: NSCompositingOperation =
93 NSCompositingOperation(NSCompositingOperation::Copy.0);
94
95pub static NSCompositeSourceOver: NSCompositingOperation =
97 NSCompositingOperation(NSCompositingOperation::SourceOver.0);
98
99pub static NSCompositeSourceIn: NSCompositingOperation =
101 NSCompositingOperation(NSCompositingOperation::SourceIn.0);
102
103pub static NSCompositeSourceOut: NSCompositingOperation =
105 NSCompositingOperation(NSCompositingOperation::SourceOut.0);
106
107pub static NSCompositeSourceAtop: NSCompositingOperation =
109 NSCompositingOperation(NSCompositingOperation::SourceAtop.0);
110
111pub static NSCompositeDestinationOver: NSCompositingOperation =
113 NSCompositingOperation(NSCompositingOperation::DestinationOver.0);
114
115pub static NSCompositeDestinationIn: NSCompositingOperation =
117 NSCompositingOperation(NSCompositingOperation::DestinationIn.0);
118
119pub static NSCompositeDestinationOut: NSCompositingOperation =
121 NSCompositingOperation(NSCompositingOperation::DestinationOut.0);
122
123pub static NSCompositeDestinationAtop: NSCompositingOperation =
125 NSCompositingOperation(NSCompositingOperation::DestinationAtop.0);
126
127pub static NSCompositeXOR: NSCompositingOperation =
129 NSCompositingOperation(NSCompositingOperation::XOR.0);
130
131pub static NSCompositePlusDarker: NSCompositingOperation =
133 NSCompositingOperation(NSCompositingOperation::PlusDarker.0);
134
135pub static NSCompositeHighlight: NSCompositingOperation =
137 NSCompositingOperation(NSCompositingOperation::Highlight.0);
138
139pub static NSCompositePlusLighter: NSCompositingOperation =
141 NSCompositingOperation(NSCompositingOperation::PlusLighter.0);
142
143pub static NSCompositeMultiply: NSCompositingOperation =
145 NSCompositingOperation(NSCompositingOperation::Multiply.0);
146
147pub static NSCompositeScreen: NSCompositingOperation =
149 NSCompositingOperation(NSCompositingOperation::Screen.0);
150
151pub static NSCompositeOverlay: NSCompositingOperation =
153 NSCompositingOperation(NSCompositingOperation::Overlay.0);
154
155pub static NSCompositeDarken: NSCompositingOperation =
157 NSCompositingOperation(NSCompositingOperation::Darken.0);
158
159pub static NSCompositeLighten: NSCompositingOperation =
161 NSCompositingOperation(NSCompositingOperation::Lighten.0);
162
163pub static NSCompositeColorDodge: NSCompositingOperation =
165 NSCompositingOperation(NSCompositingOperation::ColorDodge.0);
166
167pub static NSCompositeColorBurn: NSCompositingOperation =
169 NSCompositingOperation(NSCompositingOperation::ColorBurn.0);
170
171pub static NSCompositeSoftLight: NSCompositingOperation =
173 NSCompositingOperation(NSCompositingOperation::SoftLight.0);
174
175pub static NSCompositeHardLight: NSCompositingOperation =
177 NSCompositingOperation(NSCompositingOperation::HardLight.0);
178
179pub static NSCompositeDifference: NSCompositingOperation =
181 NSCompositingOperation(NSCompositingOperation::Difference.0);
182
183pub static NSCompositeExclusion: NSCompositingOperation =
185 NSCompositingOperation(NSCompositingOperation::Exclusion.0);
186
187pub static NSCompositeHue: NSCompositingOperation =
189 NSCompositingOperation(NSCompositingOperation::Hue.0);
190
191pub static NSCompositeSaturation: NSCompositingOperation =
193 NSCompositingOperation(NSCompositingOperation::Saturation.0);
194
195pub static NSCompositeColor: NSCompositingOperation =
197 NSCompositingOperation(NSCompositingOperation::Color.0);
198
199pub static NSCompositeLuminosity: NSCompositingOperation =
201 NSCompositingOperation(NSCompositingOperation::Luminosity.0);
202
203#[repr(transparent)]
206#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
207pub struct NSBackingStoreType(pub NSUInteger);
208impl NSBackingStoreType {
209 #[doc(alias = "NSBackingStoreRetained")]
210 #[deprecated]
211 pub const Retained: Self = Self(0);
212 #[doc(alias = "NSBackingStoreNonretained")]
213 #[deprecated]
214 pub const Nonretained: Self = Self(1);
215 #[doc(alias = "NSBackingStoreBuffered")]
216 pub const Buffered: Self = Self(2);
217}
218
219unsafe impl Encode for NSBackingStoreType {
220 const ENCODING: Encoding = NSUInteger::ENCODING;
221}
222
223unsafe impl RefEncode for NSBackingStoreType {
224 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
225}
226
227#[repr(transparent)]
230#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
231pub struct NSWindowOrderingMode(pub NSInteger);
232impl NSWindowOrderingMode {
233 #[doc(alias = "NSWindowAbove")]
234 pub const Above: Self = Self(1);
235 #[doc(alias = "NSWindowBelow")]
236 pub const Below: Self = Self(-1);
237 #[doc(alias = "NSWindowOut")]
238 pub const Out: Self = Self(0);
239}
240
241unsafe impl Encode for NSWindowOrderingMode {
242 const ENCODING: Encoding = NSInteger::ENCODING;
243}
244
245unsafe impl RefEncode for NSWindowOrderingMode {
246 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
247}
248
249#[repr(transparent)]
252#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
253pub struct NSFocusRingPlacement(pub NSUInteger);
254impl NSFocusRingPlacement {
255 #[doc(alias = "NSFocusRingOnly")]
256 pub const Only: Self = Self(0);
257 #[doc(alias = "NSFocusRingBelow")]
258 pub const Below: Self = Self(1);
259 #[doc(alias = "NSFocusRingAbove")]
260 pub const Above: Self = Self(2);
261}
262
263unsafe impl Encode for NSFocusRingPlacement {
264 const ENCODING: Encoding = NSUInteger::ENCODING;
265}
266
267unsafe impl RefEncode for NSFocusRingPlacement {
268 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
269}
270
271#[repr(transparent)]
274#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
275pub struct NSFocusRingType(pub NSUInteger);
276impl NSFocusRingType {
277 #[doc(alias = "NSFocusRingTypeDefault")]
278 pub const Default: Self = Self(0);
279 #[doc(alias = "NSFocusRingTypeNone")]
280 pub const None: Self = Self(1);
281 #[doc(alias = "NSFocusRingTypeExterior")]
282 pub const Exterior: Self = Self(2);
283}
284
285unsafe impl Encode for NSFocusRingType {
286 const ENCODING: Encoding = NSUInteger::ENCODING;
287}
288
289unsafe impl RefEncode for NSFocusRingType {
290 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
291}
292
293#[repr(transparent)]
296#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
297pub struct NSColorRenderingIntent(pub NSInteger);
298impl NSColorRenderingIntent {
299 #[doc(alias = "NSColorRenderingIntentDefault")]
300 pub const Default: Self = Self(0);
301 #[doc(alias = "NSColorRenderingIntentAbsoluteColorimetric")]
302 pub const AbsoluteColorimetric: Self = Self(1);
303 #[doc(alias = "NSColorRenderingIntentRelativeColorimetric")]
304 pub const RelativeColorimetric: Self = Self(2);
305 #[doc(alias = "NSColorRenderingIntentPerceptual")]
306 pub const Perceptual: Self = Self(3);
307 #[doc(alias = "NSColorRenderingIntentSaturation")]
308 pub const Saturation: Self = Self(4);
309}
310
311unsafe impl Encode for NSColorRenderingIntent {
312 const ENCODING: Encoding = NSInteger::ENCODING;
313}
314
315unsafe impl RefEncode for NSColorRenderingIntent {
316 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
317}
318
319pub type NSColorSpaceName = NSString;
322
323extern "C" {
324 pub static NSCalibratedWhiteColorSpace: &'static NSColorSpaceName;
326}
327
328extern "C" {
329 pub static NSCalibratedRGBColorSpace: &'static NSColorSpaceName;
331}
332
333extern "C" {
334 pub static NSDeviceWhiteColorSpace: &'static NSColorSpaceName;
336}
337
338extern "C" {
339 pub static NSDeviceRGBColorSpace: &'static NSColorSpaceName;
341}
342
343extern "C" {
344 pub static NSDeviceCMYKColorSpace: &'static NSColorSpaceName;
346}
347
348extern "C" {
349 pub static NSNamedColorSpace: &'static NSColorSpaceName;
351}
352
353extern "C" {
354 pub static NSPatternColorSpace: &'static NSColorSpaceName;
356}
357
358extern "C" {
359 pub static NSCustomColorSpace: &'static NSColorSpaceName;
361}
362
363extern "C" {
364 pub static NSCalibratedBlackColorSpace: &'static NSColorSpaceName;
366}
367
368extern "C" {
369 pub static NSDeviceBlackColorSpace: &'static NSColorSpaceName;
371}
372
373#[repr(transparent)]
376#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
377pub struct NSWindowDepth(pub i32);
378impl NSWindowDepth {
379 #[doc(alias = "NSWindowDepthTwentyfourBitRGB")]
380 pub const TwentyfourBitRGB: Self = Self(0x208);
381 #[doc(alias = "NSWindowDepthSixtyfourBitRGB")]
382 pub const SixtyfourBitRGB: Self = Self(0x210);
383 #[doc(alias = "NSWindowDepthOnehundredtwentyeightBitRGB")]
384 pub const OnehundredtwentyeightBitRGB: Self = Self(0x220);
385}
386
387unsafe impl Encode for NSWindowDepth {
388 const ENCODING: Encoding = i32::ENCODING;
389}
390
391unsafe impl RefEncode for NSWindowDepth {
392 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
393}
394
395#[inline]
396pub unsafe extern "C-unwind" fn NSBestDepth(
397 color_space: &NSColorSpaceName,
398 bps: NSInteger,
399 bpp: NSInteger,
400 planar: bool,
401 exact_match: *mut Bool,
402) -> NSWindowDepth {
403 extern "C-unwind" {
404 fn NSBestDepth(
405 color_space: &NSColorSpaceName,
406 bps: NSInteger,
407 bpp: NSInteger,
408 planar: Bool,
409 exact_match: *mut Bool,
410 ) -> NSWindowDepth;
411 }
412 unsafe { NSBestDepth(color_space, bps, bpp, Bool::new(planar), exact_match) }
413}
414
415#[inline]
416pub unsafe extern "C-unwind" fn NSPlanarFromDepth(depth: NSWindowDepth) -> bool {
417 extern "C-unwind" {
418 fn NSPlanarFromDepth(depth: NSWindowDepth) -> Bool;
419 }
420 unsafe { NSPlanarFromDepth(depth) }.as_bool()
421}
422
423#[inline]
424pub unsafe extern "C-unwind" fn NSColorSpaceFromDepth(
425 depth: NSWindowDepth,
426) -> Option<Retained<NSColorSpaceName>> {
427 extern "C-unwind" {
428 fn NSColorSpaceFromDepth(depth: NSWindowDepth) -> *mut NSColorSpaceName;
429 }
430 let ret = unsafe { NSColorSpaceFromDepth(depth) };
431 unsafe { Retained::retain_autoreleased(ret) }
432}
433
434extern "C-unwind" {
435 pub fn NSBitsPerSampleFromDepth(depth: NSWindowDepth) -> NSInteger;
436}
437
438extern "C-unwind" {
439 pub fn NSBitsPerPixelFromDepth(depth: NSWindowDepth) -> NSInteger;
440}
441
442extern "C-unwind" {
443 pub fn NSNumberOfColorComponents(color_space_name: &NSColorSpaceName) -> NSInteger;
444}
445
446#[inline]
447pub unsafe extern "C-unwind" fn NSAvailableWindowDepths() -> NonNull<NSWindowDepth> {
448 extern "C-unwind" {
449 fn NSAvailableWindowDepths() -> Option<NonNull<NSWindowDepth>>;
450 }
451 let ret = unsafe { NSAvailableWindowDepths() };
452 ret.expect("function was marked as returning non-null, but actually returned NULL")
453}
454
455extern "C" {
456 #[cfg(feature = "objc2-core-foundation")]
458 pub static NSWhite: CGFloat;
459}
460
461extern "C" {
462 #[cfg(feature = "objc2-core-foundation")]
464 pub static NSLightGray: CGFloat;
465}
466
467extern "C" {
468 #[cfg(feature = "objc2-core-foundation")]
470 pub static NSDarkGray: CGFloat;
471}
472
473extern "C" {
474 #[cfg(feature = "objc2-core-foundation")]
476 pub static NSBlack: CGFloat;
477}
478
479#[repr(transparent)]
482#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
483pub struct NSDisplayGamut(pub NSInteger);
484impl NSDisplayGamut {
485 #[doc(alias = "NSDisplayGamutSRGB")]
486 pub const SRGB: Self = Self(1);
487 #[doc(alias = "NSDisplayGamutP3")]
488 pub const P3: Self = Self(2);
489}
490
491unsafe impl Encode for NSDisplayGamut {
492 const ENCODING: Encoding = NSInteger::ENCODING;
493}
494
495unsafe impl RefEncode for NSDisplayGamut {
496 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
497}
498
499pub type NSDeviceDescriptionKey = NSString;
502
503extern "C" {
504 pub static NSDeviceResolution: &'static NSDeviceDescriptionKey;
506}
507
508extern "C" {
509 pub static NSDeviceColorSpaceName: &'static NSDeviceDescriptionKey;
511}
512
513extern "C" {
514 pub static NSDeviceBitsPerSample: &'static NSDeviceDescriptionKey;
516}
517
518extern "C" {
519 pub static NSDeviceIsScreen: &'static NSDeviceDescriptionKey;
521}
522
523extern "C" {
524 pub static NSDeviceIsPrinter: &'static NSDeviceDescriptionKey;
526}
527
528extern "C" {
529 pub static NSDeviceSize: &'static NSDeviceDescriptionKey;
531}
532
533extern "C-unwind" {
534 pub fn NSRectFill(rect: NSRect);
535}
536
537extern "C-unwind" {
538 pub fn NSRectFillList(rects: NonNull<NSRect>, count: NSInteger);
539}
540
541extern "C-unwind" {
542 #[cfg(feature = "objc2-core-foundation")]
543 pub fn NSRectFillListWithGrays(rects: NonNull<NSRect>, grays: NonNull<CGFloat>, num: NSInteger);
544}
545
546extern "C-unwind" {
547 #[cfg(feature = "NSColor")]
548 pub fn NSRectFillListWithColors(
549 rects: NonNull<NSRect>,
550 colors: NonNull<NonNull<NSColor>>,
551 num: NSInteger,
552 );
553}
554
555extern "C-unwind" {
556 pub fn NSRectFillUsingOperation(rect: NSRect, op: NSCompositingOperation);
557}
558
559extern "C-unwind" {
560 pub fn NSRectFillListUsingOperation(
561 rects: NonNull<NSRect>,
562 count: NSInteger,
563 op: NSCompositingOperation,
564 );
565}
566
567extern "C-unwind" {
568 #[cfg(feature = "NSColor")]
569 pub fn NSRectFillListWithColorsUsingOperation(
570 rects: NonNull<NSRect>,
571 colors: NonNull<NonNull<NSColor>>,
572 num: NSInteger,
573 op: NSCompositingOperation,
574 );
575}
576
577extern "C-unwind" {
578 pub fn NSFrameRect(rect: NSRect);
579}
580
581extern "C-unwind" {
582 #[cfg(feature = "objc2-core-foundation")]
583 pub fn NSFrameRectWithWidth(rect: NSRect, frame_width: CGFloat);
584}
585
586extern "C-unwind" {
587 #[cfg(feature = "objc2-core-foundation")]
588 pub fn NSFrameRectWithWidthUsingOperation(
589 rect: NSRect,
590 frame_width: CGFloat,
591 op: NSCompositingOperation,
592 );
593}
594
595extern "C-unwind" {
596 pub fn NSRectClip(rect: NSRect);
597}
598
599extern "C-unwind" {
600 pub fn NSRectClipList(rects: NonNull<NSRect>, count: NSInteger);
601}
602
603extern "C-unwind" {
604 #[cfg(feature = "objc2-core-foundation")]
605 pub fn NSDrawTiledRects(
606 bounds_rect: NSRect,
607 clip_rect: NSRect,
608 sides: NonNull<NSRectEdge>,
609 grays: NonNull<CGFloat>,
610 count: NSInteger,
611 ) -> NSRect;
612}
613
614extern "C-unwind" {
615 pub fn NSDrawGrayBezel(rect: NSRect, clip_rect: NSRect);
616}
617
618extern "C-unwind" {
619 pub fn NSDrawGroove(rect: NSRect, clip_rect: NSRect);
620}
621
622extern "C-unwind" {
623 pub fn NSDrawWhiteBezel(rect: NSRect, clip_rect: NSRect);
624}
625
626extern "C-unwind" {
627 pub fn NSDrawButton(rect: NSRect, clip_rect: NSRect);
628}
629
630extern "C-unwind" {
631 pub fn NSEraseRect(rect: NSRect);
632}
633
634#[cfg(feature = "NSColor")]
635#[deprecated = "Use -[NSBitmapImageRep colorAtX:y:] to interrogate pixel values. If necessary, use -[NSView cacheDisplayInRect:toBitmapImageRep:] to snapshot a view hierarchy into an NSBitmapImageRep."]
636#[inline]
637pub unsafe extern "C-unwind" fn NSReadPixel(passed_point: NSPoint) -> Option<Retained<NSColor>> {
638 extern "C-unwind" {
639 fn NSReadPixel(passed_point: NSPoint) -> *mut NSColor;
640 }
641 let ret = unsafe { NSReadPixel(passed_point) };
642 unsafe { Retained::retain_autoreleased(ret) }
643}
644
645extern "C-unwind" {
646 #[deprecated]
647 pub fn NSHighlightRect(rect: NSRect);
648}
649
650extern "C-unwind" {
651 pub fn NSBeep();
652}
653
654extern "C-unwind" {
655 #[deprecated = "Doesn't return anything useful since 10.0"]
656 pub fn NSGetWindowServerMemory(
657 context: NSInteger,
658 virtual_memory: NonNull<NSInteger>,
659 window_backing_memory: NonNull<NSInteger>,
660 window_dump_string: NonNull<NonNull<NSString>>,
661 ) -> NSInteger;
662}
663
664extern "C-unwind" {
665 #[cfg(feature = "NSColor")]
666 pub fn NSDrawColorTiledRects(
667 bounds_rect: NSRect,
668 clip_rect: NSRect,
669 sides: NonNull<NSRectEdge>,
670 colors: NonNull<NonNull<NSColor>>,
671 count: NSInteger,
672 ) -> NSRect;
673}
674
675extern "C-unwind" {
676 pub fn NSDrawDarkBezel(rect: NSRect, clip_rect: NSRect);
677}
678
679extern "C-unwind" {
680 pub fn NSDrawLightBezel(rect: NSRect, clip_rect: NSRect);
681}
682
683extern "C-unwind" {
684 pub fn NSDottedFrameRect(rect: NSRect);
685}
686
687extern "C-unwind" {
688 pub fn NSDrawWindowBackground(rect: NSRect);
689}
690
691extern "C-unwind" {
692 pub fn NSSetFocusRingStyle(placement: NSFocusRingPlacement);
693}
694
695extern "C-unwind" {
696 #[deprecated = "As of 10.11 it is not generally necessary to take explicit action to achieve visual atomicity. +[NSAnimationContext runAnimationGroup:] and other similar methods can be used when a stronger than normal need for visual atomicity is required. The NSAnimationContext methods do not suffer from the same performance problems as NSDisableScreenUpdates."]
697 pub fn NSDisableScreenUpdates();
698}
699
700extern "C-unwind" {
701 #[deprecated = "As of 10.11 it is not generally necessary to take explicit action to achieve visual atomicity. +[NSAnimationContext runAnimationGroup:] and other similar methods can be used when a stronger than normal need for visual atomicity is required. The NSAnimationContext methods do not suffer from the same performance problems as NSEnableScreenUpdates."]
702 pub fn NSEnableScreenUpdates();
703}
704
705#[deprecated = "Use +[NSCursor disappearingItemCursor] instead"]
708#[repr(transparent)]
709#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
710pub struct NSAnimationEffect(pub NSUInteger);
711impl NSAnimationEffect {
712 #[doc(alias = "NSAnimationEffectDisappearingItemDefault")]
713 pub const DisappearingItemDefault: Self = Self(0);
714 #[doc(alias = "NSAnimationEffectPoof")]
715 pub const Poof: Self = Self(10);
716}
717
718unsafe impl Encode for NSAnimationEffect {
719 const ENCODING: Encoding = NSUInteger::ENCODING;
720}
721
722unsafe impl RefEncode for NSAnimationEffect {
723 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
724}
725
726extern "C-unwind" {
727 #[deprecated = "Use +[NSCursor disappearingItemCursor] instead"]
728 pub fn NSShowAnimationEffect(
729 animation_effect: NSAnimationEffect,
730 center_location: NSPoint,
731 size: NSSize,
732 animation_delegate: Option<&AnyObject>,
733 did_end_selector: Option<Sel>,
734 context_info: *mut c_void,
735 );
736}
737
738extern "C-unwind" {
739 #[deprecated = "Use +[NSWindow windowNumbersWithOptions:] instead"]
740 pub fn NSCountWindows(count: NonNull<NSInteger>);
741}
742
743extern "C-unwind" {
744 #[deprecated = "Use +[NSWindow windowNumbersWithOptions:] instead"]
745 pub fn NSWindowList(size: NSInteger, list: NonNull<NSInteger>);
746}
747
748extern "C-unwind" {
749 #[deprecated = "Use +[NSWindow windowNumbersWithOptions:] instead"]
750 pub fn NSCountWindowsForContext(context: NSInteger, count: NonNull<NSInteger>);
751}
752
753extern "C-unwind" {
754 #[deprecated = "Use +[NSWindow windowNumbersWithOptions:] instead"]
755 pub fn NSWindowListForContext(context: NSInteger, size: NSInteger, list: NonNull<NSInteger>);
756}
757
758extern "C-unwind" {
759 #[deprecated]
760 pub fn NSCopyBits(src_g_state: NSInteger, src_rect: NSRect, dest_point: NSPoint);
761}