objc2_app_kit/generated/
NSCachedImageRep.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nscachedimagerep?language=objc)
11    #[unsafe(super(NSImageRep, NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    #[cfg(feature = "NSImageRep")]
14    #[deprecated]
15    pub struct NSCachedImageRep;
16);
17
18#[cfg(feature = "NSImageRep")]
19extern_conformance!(
20    unsafe impl NSCoding for NSCachedImageRep {}
21);
22
23#[cfg(feature = "NSImageRep")]
24extern_conformance!(
25    unsafe impl NSCopying for NSCachedImageRep {}
26);
27
28#[cfg(feature = "NSImageRep")]
29unsafe impl CopyingHelper for NSCachedImageRep {
30    type Result = Self;
31}
32
33#[cfg(feature = "NSImageRep")]
34extern_conformance!(
35    unsafe impl NSObjectProtocol for NSCachedImageRep {}
36);
37
38#[cfg(feature = "NSImageRep")]
39impl NSCachedImageRep {
40    extern_methods!(
41        #[cfg(all(feature = "NSResponder", feature = "NSWindow"))]
42        #[deprecated]
43        #[unsafe(method(initWithWindow:rect:))]
44        #[unsafe(method_family = init)]
45        pub unsafe fn initWithWindow_rect(
46            this: Allocated<Self>,
47            win: Option<&NSWindow>,
48            rect: NSRect,
49        ) -> Option<Retained<Self>>;
50
51        #[cfg(feature = "NSGraphics")]
52        #[deprecated]
53        #[unsafe(method(initWithSize:depth:separate:alpha:))]
54        #[unsafe(method_family = init)]
55        pub unsafe fn initWithSize_depth_separate_alpha(
56            this: Allocated<Self>,
57            size: NSSize,
58            depth: NSWindowDepth,
59            flag: bool,
60            alpha: bool,
61        ) -> Option<Retained<Self>>;
62
63        #[cfg(all(feature = "NSResponder", feature = "NSWindow"))]
64        #[deprecated]
65        #[unsafe(method(window))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn window(&self, mtm: MainThreadMarker) -> Option<Retained<NSWindow>>;
68
69        #[deprecated]
70        #[unsafe(method(rect))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn rect(&self) -> NSRect;
73    );
74}
75
76/// Methods declared on superclass `NSImageRep`.
77#[cfg(feature = "NSImageRep")]
78impl NSCachedImageRep {
79    extern_methods!(
80        #[unsafe(method(init))]
81        #[unsafe(method_family = init)]
82        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
83
84        #[unsafe(method(initWithCoder:))]
85        #[unsafe(method_family = init)]
86        pub unsafe fn initWithCoder(
87            this: Allocated<Self>,
88            coder: &NSCoder,
89        ) -> Option<Retained<Self>>;
90    );
91}
92
93/// Methods declared on superclass `NSObject`.
94#[cfg(feature = "NSImageRep")]
95impl NSCachedImageRep {
96    extern_methods!(
97        #[unsafe(method(new))]
98        #[unsafe(method_family = new)]
99        pub unsafe fn new() -> Retained<Self>;
100    );
101}