objc2_core_image/generated/
CISampler.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-foundation")]
6use objc2_core_foundation::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11extern_class!(
12 #[unsafe(super(NSObject))]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 pub struct CISampler;
16);
17
18extern_conformance!(
19 unsafe impl NSCopying for CISampler {}
20);
21
22unsafe impl CopyingHelper for CISampler {
23 type Result = Self;
24}
25
26extern_conformance!(
27 unsafe impl NSObjectProtocol for CISampler {}
28);
29
30impl CISampler {
31 extern_methods!(
32 #[cfg(feature = "CIImage")]
33 #[unsafe(method(samplerWithImage:))]
34 #[unsafe(method_family = none)]
35 pub unsafe fn samplerWithImage(im: &CIImage) -> Retained<Self>;
36
37 #[cfg(feature = "CIImage")]
38 #[unsafe(method(samplerWithImage:options:))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn samplerWithImage_options(
44 im: &CIImage,
45 dict: Option<&NSDictionary>,
46 ) -> Retained<Self>;
47
48 #[cfg(feature = "CIImage")]
49 #[unsafe(method(initWithImage:))]
50 #[unsafe(method_family = init)]
51 pub unsafe fn initWithImage(this: Allocated<Self>, im: &CIImage) -> Retained<Self>;
52
53 #[cfg(feature = "CIImage")]
54 #[unsafe(method(initWithImage:options:))]
58 #[unsafe(method_family = init)]
59 pub unsafe fn initWithImage_options(
60 this: Allocated<Self>,
61 im: &CIImage,
62 dict: Option<&NSDictionary>,
63 ) -> Retained<Self>;
64
65 #[cfg(feature = "CIFilterShape")]
66 #[unsafe(method(definition))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn definition(&self) -> Retained<CIFilterShape>;
69
70 #[cfg(feature = "objc2-core-foundation")]
71 #[unsafe(method(extent))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn extent(&self) -> CGRect;
74 );
75}
76
77impl CISampler {
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(new))]
85 #[unsafe(method_family = new)]
86 pub unsafe fn new() -> Retained<Self>;
87 );
88}
89
90extern "C" {
91 pub static kCISamplerAffineMatrix: &'static NSString;
93}
94
95extern "C" {
96 pub static kCISamplerWrapMode: &'static NSString;
98}
99
100extern "C" {
101 pub static kCISamplerFilterMode: &'static NSString;
103}
104
105extern "C" {
106 pub static kCISamplerWrapBlack: &'static NSString;
108}
109
110extern "C" {
111 pub static kCISamplerWrapClamp: &'static NSString;
113}
114
115extern "C" {
116 pub static kCISamplerFilterNearest: &'static NSString;
118}
119
120extern "C" {
121 pub static kCISamplerFilterLinear: &'static NSString;
123}
124
125extern "C" {
126 pub static kCISamplerColorSpace: &'static NSString;
128}