objc2_app_kit/generated/
NSCIImageRep.rs1use 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-image")]
9#[cfg(target_vendor = "apple")]
10use objc2_core_image::*;
11use objc2_foundation::*;
12
13use crate::*;
14
15extern_class!(
16 #[unsafe(super(NSImageRep, NSObject))]
18 #[derive(Debug, PartialEq, Eq, Hash)]
19 #[cfg(feature = "NSImageRep")]
20 pub struct NSCIImageRep;
21);
22
23#[cfg(feature = "NSImageRep")]
24extern_conformance!(
25 unsafe impl NSCoding for NSCIImageRep {}
26);
27
28#[cfg(feature = "NSImageRep")]
29extern_conformance!(
30 unsafe impl NSCopying for NSCIImageRep {}
31);
32
33#[cfg(feature = "NSImageRep")]
34unsafe impl CopyingHelper for NSCIImageRep {
35 type Result = Self;
36}
37
38#[cfg(feature = "NSImageRep")]
39extern_conformance!(
40 unsafe impl NSObjectProtocol for NSCIImageRep {}
41);
42
43#[cfg(feature = "NSImageRep")]
44impl NSCIImageRep {
45 extern_methods!(
46 #[cfg(feature = "objc2-core-image")]
47 #[cfg(target_vendor = "apple")]
48 #[unsafe(method(imageRepWithCIImage:))]
49 #[unsafe(method_family = none)]
50 pub fn imageRepWithCIImage(image: &CIImage) -> Retained<Self>;
51
52 #[cfg(feature = "objc2-core-image")]
53 #[cfg(target_vendor = "apple")]
54 #[unsafe(method(initWithCIImage:))]
55 #[unsafe(method_family = init)]
56 pub fn initWithCIImage(this: Allocated<Self>, image: &CIImage) -> Retained<Self>;
57
58 #[cfg(feature = "objc2-core-image")]
59 #[cfg(target_vendor = "apple")]
60 #[unsafe(method(CIImage))]
61 #[unsafe(method_family = none)]
62 pub fn CIImage(&self) -> Retained<CIImage>;
63 );
64}
65
66#[cfg(feature = "NSImageRep")]
68impl NSCIImageRep {
69 extern_methods!(
70 #[unsafe(method(init))]
71 #[unsafe(method_family = init)]
72 pub fn init(this: Allocated<Self>) -> Retained<Self>;
73
74 #[unsafe(method(initWithCoder:))]
78 #[unsafe(method_family = init)]
79 pub unsafe fn initWithCoder(
80 this: Allocated<Self>,
81 coder: &NSCoder,
82 ) -> Option<Retained<Self>>;
83 );
84}
85
86#[cfg(feature = "NSImageRep")]
88impl NSCIImageRep {
89 extern_methods!(
90 #[unsafe(method(new))]
91 #[unsafe(method_family = new)]
92 pub fn new() -> Retained<Self>;
93 );
94}
95
96#[cfg(feature = "NSImageRep")]
97impl DefaultRetained for NSCIImageRep {
98 #[inline]
99 fn default_retained() -> Retained<Self> {
100 Self::new()
101 }
102}
103
104mod private_CIImageNSAppKitAdditions {
105 pub trait Sealed {}
106}
107
108#[doc(alias = "NSAppKitAdditions")]
110pub unsafe trait CIImageNSAppKitAdditions:
111 ClassType + Sized + private_CIImageNSAppKitAdditions::Sealed
112{
113 extern_methods!(
114 #[cfg(all(feature = "NSBitmapImageRep", feature = "NSImageRep"))]
115 #[unsafe(method(initWithBitmapImageRep:))]
116 #[unsafe(method_family = init)]
117 fn initWithBitmapImageRep(
118 this: Allocated<Self>,
119 bitmap_image_rep: &NSBitmapImageRep,
120 ) -> Option<Retained<Self>>;
121
122 #[cfg(all(feature = "NSGraphics", feature = "objc2-core-foundation"))]
123 #[unsafe(method(drawInRect:fromRect:operation:fraction:))]
124 #[unsafe(method_family = none)]
125 fn drawInRect_fromRect_operation_fraction(
126 &self,
127 rect: NSRect,
128 from_rect: NSRect,
129 op: NSCompositingOperation,
130 delta: CGFloat,
131 );
132
133 #[cfg(all(feature = "NSGraphics", feature = "objc2-core-foundation"))]
134 #[unsafe(method(drawAtPoint:fromRect:operation:fraction:))]
135 #[unsafe(method_family = none)]
136 fn drawAtPoint_fromRect_operation_fraction(
137 &self,
138 point: NSPoint,
139 from_rect: NSRect,
140 op: NSCompositingOperation,
141 delta: CGFloat,
142 );
143 );
144}
145
146#[cfg(feature = "objc2-core-image")]
147#[cfg(target_vendor = "apple")]
148impl private_CIImageNSAppKitAdditions::Sealed for CIImage {}
149#[cfg(feature = "objc2-core-image")]
150#[cfg(target_vendor = "apple")]
151unsafe impl CIImageNSAppKitAdditions for CIImage {}