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")]
24unsafe impl NSCoding for NSCIImageRep {}
25
26#[cfg(feature = "NSImageRep")]
27unsafe impl NSCopying for NSCIImageRep {}
28
29#[cfg(feature = "NSImageRep")]
30unsafe impl CopyingHelper for NSCIImageRep {
31 type Result = Self;
32}
33
34#[cfg(feature = "NSImageRep")]
35unsafe impl NSObjectProtocol for NSCIImageRep {}
36
37#[cfg(feature = "NSImageRep")]
38impl NSCIImageRep {
39 extern_methods!(
40 #[cfg(feature = "objc2-core-image")]
41 #[cfg(target_vendor = "apple")]
42 #[unsafe(method(imageRepWithCIImage:))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn imageRepWithCIImage(image: &CIImage) -> Retained<Self>;
45
46 #[cfg(feature = "objc2-core-image")]
47 #[cfg(target_vendor = "apple")]
48 #[unsafe(method(initWithCIImage:))]
49 #[unsafe(method_family = init)]
50 pub unsafe fn initWithCIImage(this: Allocated<Self>, image: &CIImage) -> Retained<Self>;
51
52 #[cfg(feature = "objc2-core-image")]
53 #[cfg(target_vendor = "apple")]
54 #[unsafe(method(CIImage))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn CIImage(&self) -> Retained<CIImage>;
57 );
58}
59
60#[cfg(feature = "NSImageRep")]
62impl NSCIImageRep {
63 extern_methods!(
64 #[unsafe(method(init))]
65 #[unsafe(method_family = init)]
66 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
67
68 #[unsafe(method(initWithCoder:))]
69 #[unsafe(method_family = init)]
70 pub unsafe fn initWithCoder(
71 this: Allocated<Self>,
72 coder: &NSCoder,
73 ) -> Option<Retained<Self>>;
74 );
75}
76
77#[cfg(feature = "NSImageRep")]
79impl NSCIImageRep {
80 extern_methods!(
81 #[unsafe(method(new))]
82 #[unsafe(method_family = new)]
83 pub unsafe fn new() -> Retained<Self>;
84 );
85}
86
87mod private_CIImageNSAppKitAdditions {
88 pub trait Sealed {}
89}
90
91#[doc(alias = "NSAppKitAdditions")]
93pub unsafe trait CIImageNSAppKitAdditions:
94 ClassType + Sized + private_CIImageNSAppKitAdditions::Sealed
95{
96 extern_methods!(
97 #[cfg(all(feature = "NSBitmapImageRep", feature = "NSImageRep"))]
98 #[unsafe(method(initWithBitmapImageRep:))]
99 #[unsafe(method_family = init)]
100 unsafe fn initWithBitmapImageRep(
101 this: Allocated<Self>,
102 bitmap_image_rep: &NSBitmapImageRep,
103 ) -> Option<Retained<Self>>;
104
105 #[cfg(all(feature = "NSGraphics", feature = "objc2-core-foundation"))]
106 #[unsafe(method(drawInRect:fromRect:operation:fraction:))]
107 #[unsafe(method_family = none)]
108 unsafe fn drawInRect_fromRect_operation_fraction(
109 &self,
110 rect: NSRect,
111 from_rect: NSRect,
112 op: NSCompositingOperation,
113 delta: CGFloat,
114 );
115
116 #[cfg(all(feature = "NSGraphics", feature = "objc2-core-foundation"))]
117 #[unsafe(method(drawAtPoint:fromRect:operation:fraction:))]
118 #[unsafe(method_family = none)]
119 unsafe fn drawAtPoint_fromRect_operation_fraction(
120 &self,
121 point: NSPoint,
122 from_rect: NSRect,
123 op: NSCompositingOperation,
124 delta: CGFloat,
125 );
126 );
127}
128
129#[cfg(feature = "objc2-core-image")]
130#[cfg(target_vendor = "apple")]
131impl private_CIImageNSAppKitAdditions::Sealed for CIImage {}
132#[cfg(feature = "objc2-core-image")]
133#[cfg(target_vendor = "apple")]
134unsafe impl CIImageNSAppKitAdditions for CIImage {}