objc2_app_kit/generated/
NSCachedImageRep.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[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")]
19unsafe impl NSCoding for NSCachedImageRep {}
20
21#[cfg(feature = "NSImageRep")]
22unsafe impl NSCopying for NSCachedImageRep {}
23
24#[cfg(feature = "NSImageRep")]
25unsafe impl CopyingHelper for NSCachedImageRep {
26 type Result = Self;
27}
28
29#[cfg(feature = "NSImageRep")]
30unsafe impl NSObjectProtocol for NSCachedImageRep {}
31
32#[cfg(feature = "NSImageRep")]
33impl NSCachedImageRep {
34 extern_methods!(
35 #[cfg(all(feature = "NSResponder", feature = "NSWindow"))]
36 #[deprecated]
37 #[unsafe(method(initWithWindow:rect:))]
38 #[unsafe(method_family = init)]
39 pub unsafe fn initWithWindow_rect(
40 this: Allocated<Self>,
41 win: Option<&NSWindow>,
42 rect: NSRect,
43 ) -> Option<Retained<Self>>;
44
45 #[cfg(feature = "NSGraphics")]
46 #[deprecated]
47 #[unsafe(method(initWithSize:depth:separate:alpha:))]
48 #[unsafe(method_family = init)]
49 pub unsafe fn initWithSize_depth_separate_alpha(
50 this: Allocated<Self>,
51 size: NSSize,
52 depth: NSWindowDepth,
53 flag: bool,
54 alpha: bool,
55 ) -> Option<Retained<Self>>;
56
57 #[cfg(all(feature = "NSResponder", feature = "NSWindow"))]
58 #[deprecated]
59 #[unsafe(method(window))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn window(&self, mtm: MainThreadMarker) -> Option<Retained<NSWindow>>;
62
63 #[deprecated]
64 #[unsafe(method(rect))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn rect(&self) -> NSRect;
67 );
68}
69
70#[cfg(feature = "NSImageRep")]
72impl NSCachedImageRep {
73 extern_methods!(
74 #[unsafe(method(init))]
75 #[unsafe(method_family = init)]
76 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
77
78 #[unsafe(method(initWithCoder:))]
79 #[unsafe(method_family = init)]
80 pub unsafe fn initWithCoder(
81 this: Allocated<Self>,
82 coder: &NSCoder,
83 ) -> Option<Retained<Self>>;
84 );
85}
86
87#[cfg(feature = "NSImageRep")]
89impl NSCachedImageRep {
90 extern_methods!(
91 #[unsafe(method(new))]
92 #[unsafe(method_family = new)]
93 pub unsafe fn new() -> Retained<Self>;
94 );
95}