objc2_core_image/generated/
CIImage.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use 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-graphics")]
9use objc2_core_graphics::*;
10#[cfg(feature = "objc2-core-video")]
11use objc2_core_video::*;
12use objc2_foundation::*;
13#[cfg(feature = "objc2-io-surface")]
14use objc2_io_surface::*;
15#[cfg(feature = "objc2-metal")]
16use objc2_metal::*;
17
18use crate::*;
19
20/// [Apple's documentation](https://developer.apple.com/documentation/coreimage/ciformat?language=objc)
21// NS_TYPED_ENUM
22pub type CIFormat = c_int;
23
24extern "C" {
25    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatargb8?language=objc)
26    pub static kCIFormatARGB8: CIFormat;
27}
28
29extern "C" {
30    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatbgra8?language=objc)
31    pub static kCIFormatBGRA8: CIFormat;
32}
33
34extern "C" {
35    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatrgba8?language=objc)
36    pub static kCIFormatRGBA8: CIFormat;
37}
38
39extern "C" {
40    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatabgr8?language=objc)
41    pub static kCIFormatABGR8: CIFormat;
42}
43
44extern "C" {
45    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatrgbah?language=objc)
46    pub static kCIFormatRGBAh: CIFormat;
47}
48
49extern "C" {
50    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatrgba16?language=objc)
51    pub static kCIFormatRGBA16: CIFormat;
52}
53
54extern "C" {
55    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatrgbaf?language=objc)
56    pub static kCIFormatRGBAf: CIFormat;
57}
58
59extern "C" {
60    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatrgbx16?language=objc)
61    pub static kCIFormatRGBX16: CIFormat;
62}
63
64extern "C" {
65    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatrgbxh?language=objc)
66    pub static kCIFormatRGBXh: CIFormat;
67}
68
69extern "C" {
70    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatrgbxf?language=objc)
71    pub static kCIFormatRGBXf: CIFormat;
72}
73
74extern "C" {
75    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatrgb10?language=objc)
76    pub static kCIFormatRGB10: CIFormat;
77}
78
79extern "C" {
80    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformata8?language=objc)
81    pub static kCIFormatA8: CIFormat;
82}
83
84extern "C" {
85    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformata16?language=objc)
86    pub static kCIFormatA16: CIFormat;
87}
88
89extern "C" {
90    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatah?language=objc)
91    pub static kCIFormatAh: CIFormat;
92}
93
94extern "C" {
95    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformataf?language=objc)
96    pub static kCIFormatAf: CIFormat;
97}
98
99extern "C" {
100    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatr8?language=objc)
101    pub static kCIFormatR8: CIFormat;
102}
103
104extern "C" {
105    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatr16?language=objc)
106    pub static kCIFormatR16: CIFormat;
107}
108
109extern "C" {
110    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatrh?language=objc)
111    pub static kCIFormatRh: CIFormat;
112}
113
114extern "C" {
115    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatrf?language=objc)
116    pub static kCIFormatRf: CIFormat;
117}
118
119extern "C" {
120    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatrg8?language=objc)
121    pub static kCIFormatRG8: CIFormat;
122}
123
124extern "C" {
125    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatrg16?language=objc)
126    pub static kCIFormatRG16: CIFormat;
127}
128
129extern "C" {
130    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatrgh?language=objc)
131    pub static kCIFormatRGh: CIFormat;
132}
133
134extern "C" {
135    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatrgf?language=objc)
136    pub static kCIFormatRGf: CIFormat;
137}
138
139extern "C" {
140    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatl8?language=objc)
141    pub static kCIFormatL8: CIFormat;
142}
143
144extern "C" {
145    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatl16?language=objc)
146    pub static kCIFormatL16: CIFormat;
147}
148
149extern "C" {
150    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatlh?language=objc)
151    pub static kCIFormatLh: CIFormat;
152}
153
154extern "C" {
155    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatlf?language=objc)
156    pub static kCIFormatLf: CIFormat;
157}
158
159extern "C" {
160    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatla8?language=objc)
161    pub static kCIFormatLA8: CIFormat;
162}
163
164extern "C" {
165    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatla16?language=objc)
166    pub static kCIFormatLA16: CIFormat;
167}
168
169extern "C" {
170    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatlah?language=objc)
171    pub static kCIFormatLAh: CIFormat;
172}
173
174extern "C" {
175    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciformatlaf?language=objc)
176    pub static kCIFormatLAf: CIFormat;
177}
178
179/// [Apple's documentation](https://developer.apple.com/documentation/coreimage/ciimageoption?language=objc)
180// NS_TYPED_ENUM
181pub type CIImageOption = NSString;
182
183extern "C" {
184    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimagecolorspace?language=objc)
185    pub static kCIImageColorSpace: &'static CIImageOption;
186}
187
188extern "C" {
189    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimagetonemaphdrtosdr?language=objc)
190    pub static kCIImageToneMapHDRtoSDR: &'static CIImageOption;
191}
192
193extern "C" {
194    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimageexpandtohdr?language=objc)
195    pub static kCIImageExpandToHDR: &'static CIImageOption;
196}
197
198extern "C" {
199    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimagecontentheadroom?language=objc)
200    pub static kCIImageContentHeadroom: &'static CIImageOption;
201}
202
203extern "C" {
204    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimagenearestsampling?language=objc)
205    pub static kCIImageNearestSampling: &'static CIImageOption;
206}
207
208extern "C" {
209    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimagecacheimmediately?language=objc)
210    pub static kCIImageCacheImmediately: &'static CIImageOption;
211}
212
213extern "C" {
214    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimageproperties?language=objc)
215    pub static kCIImageProperties: &'static CIImageOption;
216}
217
218extern "C" {
219    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimageapplyorientationproperty?language=objc)
220    pub static kCIImageApplyOrientationProperty: &'static CIImageOption;
221}
222
223extern "C" {
224    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimagetexturetarget?language=objc)
225    pub static kCIImageTextureTarget: &'static CIImageOption;
226}
227
228extern "C" {
229    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimagetextureformat?language=objc)
230    pub static kCIImageTextureFormat: &'static CIImageOption;
231}
232
233extern "C" {
234    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimageauxiliarydepth?language=objc)
235    pub static kCIImageAuxiliaryDepth: &'static CIImageOption;
236}
237
238extern "C" {
239    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimageauxiliarydisparity?language=objc)
240    pub static kCIImageAuxiliaryDisparity: &'static CIImageOption;
241}
242
243extern "C" {
244    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimageauxiliaryportraiteffectsmatte?language=objc)
245    pub static kCIImageAuxiliaryPortraitEffectsMatte: &'static CIImageOption;
246}
247
248extern "C" {
249    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimageauxiliarysemanticsegmentationskinmatte?language=objc)
250    pub static kCIImageAuxiliarySemanticSegmentationSkinMatte: &'static CIImageOption;
251}
252
253extern "C" {
254    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimageauxiliarysemanticsegmentationhairmatte?language=objc)
255    pub static kCIImageAuxiliarySemanticSegmentationHairMatte: &'static CIImageOption;
256}
257
258extern "C" {
259    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimageauxiliarysemanticsegmentationteethmatte?language=objc)
260    pub static kCIImageAuxiliarySemanticSegmentationTeethMatte: &'static CIImageOption;
261}
262
263extern "C" {
264    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimageauxiliarysemanticsegmentationglassesmatte?language=objc)
265    pub static kCIImageAuxiliarySemanticSegmentationGlassesMatte: &'static CIImageOption;
266}
267
268extern "C" {
269    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimageauxiliarysemanticsegmentationskymatte?language=objc)
270    pub static kCIImageAuxiliarySemanticSegmentationSkyMatte: &'static CIImageOption;
271}
272
273extern "C" {
274    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimageauxiliaryhdrgainmap?language=objc)
275    pub static kCIImageAuxiliaryHDRGainMap: &'static CIImageOption;
276}
277
278extern_class!(
279    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/ciimage?language=objc)
280    #[unsafe(super(NSObject))]
281    #[derive(Debug, PartialEq, Eq, Hash)]
282    pub struct CIImage;
283);
284
285extern_conformance!(
286    unsafe impl NSCoding for CIImage {}
287);
288
289extern_conformance!(
290    unsafe impl NSCopying for CIImage {}
291);
292
293unsafe impl CopyingHelper for CIImage {
294    type Result = Self;
295}
296
297extern_conformance!(
298    unsafe impl NSObjectProtocol for CIImage {}
299);
300
301extern_conformance!(
302    unsafe impl NSSecureCoding for CIImage {}
303);
304
305impl CIImage {
306    extern_methods!(
307        #[cfg(feature = "objc2-core-graphics")]
308        #[unsafe(method(imageWithCGImage:))]
309        #[unsafe(method_family = none)]
310        pub unsafe fn imageWithCGImage(image: &CGImage) -> Retained<CIImage>;
311
312        #[cfg(feature = "objc2-core-graphics")]
313        #[unsafe(method(imageWithCGImage:options:))]
314        #[unsafe(method_family = none)]
315        pub unsafe fn imageWithCGImage_options(
316            image: &CGImage,
317            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
318        ) -> Retained<CIImage>;
319
320        #[cfg(feature = "objc2-core-graphics")]
321        #[deprecated]
322        #[unsafe(method(imageWithCGLayer:))]
323        #[unsafe(method_family = none)]
324        pub unsafe fn imageWithCGLayer(layer: &CGLayer) -> Retained<CIImage>;
325
326        #[cfg(feature = "objc2-core-graphics")]
327        #[deprecated]
328        #[unsafe(method(imageWithCGLayer:options:))]
329        #[unsafe(method_family = none)]
330        pub unsafe fn imageWithCGLayer_options(
331            layer: &CGLayer,
332            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
333        ) -> Retained<CIImage>;
334
335        #[cfg(all(feature = "objc2-core-foundation", feature = "objc2-core-graphics"))]
336        #[unsafe(method(imageWithBitmapData:bytesPerRow:size:format:colorSpace:))]
337        #[unsafe(method_family = none)]
338        pub unsafe fn imageWithBitmapData_bytesPerRow_size_format_colorSpace(
339            data: &NSData,
340            bytes_per_row: usize,
341            size: CGSize,
342            format: CIFormat,
343            color_space: Option<&CGColorSpace>,
344        ) -> Retained<CIImage>;
345
346        #[cfg(all(feature = "objc2-core-foundation", feature = "objc2-core-graphics"))]
347        #[deprecated = "Core Image OpenGL API deprecated. (Define CI_SILENCE_GL_DEPRECATION to silence these warnings)"]
348        #[unsafe(method(imageWithTexture:size:flipped:colorSpace:))]
349        #[unsafe(method_family = none)]
350        pub unsafe fn imageWithTexture_size_flipped_colorSpace(
351            name: c_uint,
352            size: CGSize,
353            flipped: bool,
354            color_space: Option<&CGColorSpace>,
355        ) -> Retained<CIImage>;
356
357        #[cfg(feature = "objc2-core-foundation")]
358        #[deprecated = "Core Image OpenGL API deprecated. (Define CI_SILENCE_GL_DEPRECATION to silence these warnings)"]
359        #[unsafe(method(imageWithTexture:size:flipped:options:))]
360        #[unsafe(method_family = none)]
361        pub unsafe fn imageWithTexture_size_flipped_options(
362            name: c_uint,
363            size: CGSize,
364            flipped: bool,
365            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
366        ) -> Retained<CIImage>;
367
368        #[cfg(feature = "objc2-metal")]
369        #[unsafe(method(imageWithMTLTexture:options:))]
370        #[unsafe(method_family = none)]
371        pub unsafe fn imageWithMTLTexture_options(
372            texture: &ProtocolObject<dyn MTLTexture>,
373            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
374        ) -> Option<Retained<CIImage>>;
375
376        #[unsafe(method(imageWithContentsOfURL:))]
377        #[unsafe(method_family = none)]
378        pub unsafe fn imageWithContentsOfURL(url: &NSURL) -> Option<Retained<CIImage>>;
379
380        #[unsafe(method(imageWithContentsOfURL:options:))]
381        #[unsafe(method_family = none)]
382        pub unsafe fn imageWithContentsOfURL_options(
383            url: &NSURL,
384            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
385        ) -> Option<Retained<CIImage>>;
386
387        #[unsafe(method(imageWithData:))]
388        #[unsafe(method_family = none)]
389        pub unsafe fn imageWithData(data: &NSData) -> Option<Retained<CIImage>>;
390
391        #[unsafe(method(imageWithData:options:))]
392        #[unsafe(method_family = none)]
393        pub unsafe fn imageWithData_options(
394            data: &NSData,
395            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
396        ) -> Option<Retained<CIImage>>;
397
398        #[cfg(feature = "objc2-core-video")]
399        #[unsafe(method(imageWithCVImageBuffer:))]
400        #[unsafe(method_family = none)]
401        pub unsafe fn imageWithCVImageBuffer(image_buffer: &CVImageBuffer) -> Retained<CIImage>;
402
403        #[cfg(feature = "objc2-core-video")]
404        #[unsafe(method(imageWithCVImageBuffer:options:))]
405        #[unsafe(method_family = none)]
406        pub unsafe fn imageWithCVImageBuffer_options(
407            image_buffer: &CVImageBuffer,
408            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
409        ) -> Retained<CIImage>;
410
411        #[cfg(feature = "objc2-core-video")]
412        #[unsafe(method(imageWithCVPixelBuffer:))]
413        #[unsafe(method_family = none)]
414        pub unsafe fn imageWithCVPixelBuffer(pixel_buffer: &CVPixelBuffer) -> Retained<CIImage>;
415
416        #[cfg(feature = "objc2-core-video")]
417        #[unsafe(method(imageWithCVPixelBuffer:options:))]
418        #[unsafe(method_family = none)]
419        pub unsafe fn imageWithCVPixelBuffer_options(
420            pixel_buffer: &CVPixelBuffer,
421            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
422        ) -> Retained<CIImage>;
423
424        #[cfg(feature = "objc2-io-surface")]
425        #[unsafe(method(imageWithIOSurface:))]
426        #[unsafe(method_family = none)]
427        pub unsafe fn imageWithIOSurface(surface: &IOSurfaceRef) -> Retained<CIImage>;
428
429        #[cfg(feature = "objc2-io-surface")]
430        #[unsafe(method(imageWithIOSurface:options:))]
431        #[unsafe(method_family = none)]
432        pub unsafe fn imageWithIOSurface_options(
433            surface: &IOSurfaceRef,
434            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
435        ) -> Retained<CIImage>;
436
437        #[cfg(feature = "CIColor")]
438        #[unsafe(method(imageWithColor:))]
439        #[unsafe(method_family = none)]
440        pub unsafe fn imageWithColor(color: &CIColor) -> Retained<CIImage>;
441
442        #[unsafe(method(emptyImage))]
443        #[unsafe(method_family = none)]
444        pub unsafe fn emptyImage() -> Retained<CIImage>;
445
446        #[unsafe(method(blackImage))]
447        #[unsafe(method_family = none)]
448        pub unsafe fn blackImage() -> Retained<CIImage>;
449
450        #[unsafe(method(whiteImage))]
451        #[unsafe(method_family = none)]
452        pub unsafe fn whiteImage() -> Retained<CIImage>;
453
454        #[unsafe(method(grayImage))]
455        #[unsafe(method_family = none)]
456        pub unsafe fn grayImage() -> Retained<CIImage>;
457
458        #[unsafe(method(redImage))]
459        #[unsafe(method_family = none)]
460        pub unsafe fn redImage() -> Retained<CIImage>;
461
462        #[unsafe(method(greenImage))]
463        #[unsafe(method_family = none)]
464        pub unsafe fn greenImage() -> Retained<CIImage>;
465
466        #[unsafe(method(blueImage))]
467        #[unsafe(method_family = none)]
468        pub unsafe fn blueImage() -> Retained<CIImage>;
469
470        #[unsafe(method(cyanImage))]
471        #[unsafe(method_family = none)]
472        pub unsafe fn cyanImage() -> Retained<CIImage>;
473
474        #[unsafe(method(magentaImage))]
475        #[unsafe(method_family = none)]
476        pub unsafe fn magentaImage() -> Retained<CIImage>;
477
478        #[unsafe(method(yellowImage))]
479        #[unsafe(method_family = none)]
480        pub unsafe fn yellowImage() -> Retained<CIImage>;
481
482        #[unsafe(method(clearImage))]
483        #[unsafe(method_family = none)]
484        pub unsafe fn clearImage() -> Retained<CIImage>;
485
486        #[cfg(feature = "objc2-core-graphics")]
487        #[unsafe(method(initWithCGImage:))]
488        #[unsafe(method_family = init)]
489        pub unsafe fn initWithCGImage(this: Allocated<Self>, image: &CGImage) -> Retained<Self>;
490
491        #[cfg(feature = "objc2-core-graphics")]
492        #[unsafe(method(initWithCGImage:options:))]
493        #[unsafe(method_family = init)]
494        pub unsafe fn initWithCGImage_options(
495            this: Allocated<Self>,
496            image: &CGImage,
497            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
498        ) -> Retained<Self>;
499
500        #[cfg(feature = "objc2-core-graphics")]
501        #[deprecated = "Use initWithCGImage: instead."]
502        #[unsafe(method(initWithCGLayer:))]
503        #[unsafe(method_family = init)]
504        pub unsafe fn initWithCGLayer(this: Allocated<Self>, layer: &CGLayer) -> Retained<Self>;
505
506        #[cfg(feature = "objc2-core-graphics")]
507        #[deprecated = "Use initWithCGImage:options instead."]
508        #[unsafe(method(initWithCGLayer:options:))]
509        #[unsafe(method_family = init)]
510        pub unsafe fn initWithCGLayer_options(
511            this: Allocated<Self>,
512            layer: &CGLayer,
513            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
514        ) -> Retained<Self>;
515
516        #[unsafe(method(initWithData:))]
517        #[unsafe(method_family = init)]
518        pub unsafe fn initWithData(this: Allocated<Self>, data: &NSData) -> Option<Retained<Self>>;
519
520        #[unsafe(method(initWithData:options:))]
521        #[unsafe(method_family = init)]
522        pub unsafe fn initWithData_options(
523            this: Allocated<Self>,
524            data: &NSData,
525            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
526        ) -> Option<Retained<Self>>;
527
528        #[cfg(all(feature = "objc2-core-foundation", feature = "objc2-core-graphics"))]
529        #[unsafe(method(initWithBitmapData:bytesPerRow:size:format:colorSpace:))]
530        #[unsafe(method_family = init)]
531        pub unsafe fn initWithBitmapData_bytesPerRow_size_format_colorSpace(
532            this: Allocated<Self>,
533            data: &NSData,
534            bytes_per_row: usize,
535            size: CGSize,
536            format: CIFormat,
537            color_space: Option<&CGColorSpace>,
538        ) -> Retained<Self>;
539
540        #[cfg(all(feature = "objc2-core-foundation", feature = "objc2-core-graphics"))]
541        #[deprecated = "Core Image OpenGL API deprecated. (Define CI_SILENCE_GL_DEPRECATION to silence these warnings)"]
542        #[unsafe(method(initWithTexture:size:flipped:colorSpace:))]
543        #[unsafe(method_family = init)]
544        pub unsafe fn initWithTexture_size_flipped_colorSpace(
545            this: Allocated<Self>,
546            name: c_uint,
547            size: CGSize,
548            flipped: bool,
549            color_space: Option<&CGColorSpace>,
550        ) -> Retained<Self>;
551
552        #[cfg(feature = "objc2-core-foundation")]
553        #[deprecated = "Core Image OpenGL API deprecated. (Define CI_SILENCE_GL_DEPRECATION to silence these warnings)"]
554        #[unsafe(method(initWithTexture:size:flipped:options:))]
555        #[unsafe(method_family = init)]
556        pub unsafe fn initWithTexture_size_flipped_options(
557            this: Allocated<Self>,
558            name: c_uint,
559            size: CGSize,
560            flipped: bool,
561            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
562        ) -> Retained<Self>;
563
564        #[cfg(feature = "objc2-metal")]
565        #[unsafe(method(initWithMTLTexture:options:))]
566        #[unsafe(method_family = init)]
567        pub unsafe fn initWithMTLTexture_options(
568            this: Allocated<Self>,
569            texture: &ProtocolObject<dyn MTLTexture>,
570            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
571        ) -> Option<Retained<Self>>;
572
573        #[unsafe(method(initWithContentsOfURL:))]
574        #[unsafe(method_family = init)]
575        pub unsafe fn initWithContentsOfURL(
576            this: Allocated<Self>,
577            url: &NSURL,
578        ) -> Option<Retained<Self>>;
579
580        #[unsafe(method(initWithContentsOfURL:options:))]
581        #[unsafe(method_family = init)]
582        pub unsafe fn initWithContentsOfURL_options(
583            this: Allocated<Self>,
584            url: &NSURL,
585            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
586        ) -> Option<Retained<Self>>;
587
588        #[cfg(feature = "objc2-io-surface")]
589        #[unsafe(method(initWithIOSurface:))]
590        #[unsafe(method_family = init)]
591        pub unsafe fn initWithIOSurface(
592            this: Allocated<Self>,
593            surface: &IOSurfaceRef,
594        ) -> Retained<Self>;
595
596        #[cfg(feature = "objc2-io-surface")]
597        #[unsafe(method(initWithIOSurface:options:))]
598        #[unsafe(method_family = init)]
599        pub unsafe fn initWithIOSurface_options(
600            this: Allocated<Self>,
601            surface: &IOSurfaceRef,
602            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
603        ) -> Retained<Self>;
604
605        #[cfg(feature = "objc2-io-surface")]
606        #[deprecated]
607        #[unsafe(method(initWithIOSurface:plane:format:options:))]
608        #[unsafe(method_family = init)]
609        pub unsafe fn initWithIOSurface_plane_format_options(
610            this: Allocated<Self>,
611            surface: &IOSurfaceRef,
612            plane: usize,
613            format: CIFormat,
614            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
615        ) -> Retained<Self>;
616
617        #[cfg(feature = "objc2-core-video")]
618        #[unsafe(method(initWithCVImageBuffer:))]
619        #[unsafe(method_family = init)]
620        pub unsafe fn initWithCVImageBuffer(
621            this: Allocated<Self>,
622            image_buffer: &CVImageBuffer,
623        ) -> Retained<Self>;
624
625        #[cfg(feature = "objc2-core-video")]
626        #[unsafe(method(initWithCVImageBuffer:options:))]
627        #[unsafe(method_family = init)]
628        pub unsafe fn initWithCVImageBuffer_options(
629            this: Allocated<Self>,
630            image_buffer: &CVImageBuffer,
631            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
632        ) -> Retained<Self>;
633
634        #[cfg(feature = "objc2-core-video")]
635        #[unsafe(method(initWithCVPixelBuffer:))]
636        #[unsafe(method_family = init)]
637        pub unsafe fn initWithCVPixelBuffer(
638            this: Allocated<Self>,
639            pixel_buffer: &CVPixelBuffer,
640        ) -> Retained<Self>;
641
642        #[cfg(feature = "objc2-core-video")]
643        #[unsafe(method(initWithCVPixelBuffer:options:))]
644        #[unsafe(method_family = init)]
645        pub unsafe fn initWithCVPixelBuffer_options(
646            this: Allocated<Self>,
647            pixel_buffer: &CVPixelBuffer,
648            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
649        ) -> Retained<Self>;
650
651        #[cfg(feature = "CIColor")]
652        #[unsafe(method(initWithColor:))]
653        #[unsafe(method_family = init)]
654        pub unsafe fn initWithColor(this: Allocated<Self>, color: &CIColor) -> Retained<Self>;
655
656        #[cfg(feature = "objc2-core-foundation")]
657        #[unsafe(method(imageByApplyingTransform:))]
658        #[unsafe(method_family = none)]
659        pub unsafe fn imageByApplyingTransform(
660            &self,
661            matrix: CGAffineTransform,
662        ) -> Retained<CIImage>;
663
664        #[cfg(feature = "objc2-core-foundation")]
665        #[unsafe(method(imageByApplyingTransform:highQualityDownsample:))]
666        #[unsafe(method_family = none)]
667        pub unsafe fn imageByApplyingTransform_highQualityDownsample(
668            &self,
669            matrix: CGAffineTransform,
670            high_quality_downsample: bool,
671        ) -> Retained<CIImage>;
672
673        #[unsafe(method(imageByApplyingOrientation:))]
674        #[unsafe(method_family = none)]
675        pub unsafe fn imageByApplyingOrientation(&self, orientation: c_int) -> Retained<CIImage>;
676
677        #[unsafe(method(imageByCompositingOverImage:))]
678        #[unsafe(method_family = none)]
679        pub unsafe fn imageByCompositingOverImage(&self, dest: &CIImage) -> Retained<CIImage>;
680
681        #[cfg(feature = "objc2-core-foundation")]
682        #[unsafe(method(imageByCroppingToRect:))]
683        #[unsafe(method_family = none)]
684        pub unsafe fn imageByCroppingToRect(&self, rect: CGRect) -> Retained<CIImage>;
685
686        #[unsafe(method(imageByClampingToExtent))]
687        #[unsafe(method_family = none)]
688        pub unsafe fn imageByClampingToExtent(&self) -> Retained<CIImage>;
689
690        #[cfg(feature = "objc2-core-foundation")]
691        #[unsafe(method(imageByClampingToRect:))]
692        #[unsafe(method_family = none)]
693        pub unsafe fn imageByClampingToRect(&self, rect: CGRect) -> Retained<CIImage>;
694
695        #[unsafe(method(imageByApplyingFilter:withInputParameters:))]
696        #[unsafe(method_family = none)]
697        pub unsafe fn imageByApplyingFilter_withInputParameters(
698            &self,
699            filter_name: &NSString,
700            params: &NSDictionary<NSString, AnyObject>,
701        ) -> Retained<CIImage>;
702
703        #[unsafe(method(imageByApplyingFilter:))]
704        #[unsafe(method_family = none)]
705        pub unsafe fn imageByApplyingFilter(&self, filter_name: &NSString) -> Retained<CIImage>;
706
707        #[cfg(feature = "objc2-core-graphics")]
708        #[unsafe(method(imageByColorMatchingColorSpaceToWorkingSpace:))]
709        #[unsafe(method_family = none)]
710        pub unsafe fn imageByColorMatchingColorSpaceToWorkingSpace(
711            &self,
712            color_space: &CGColorSpace,
713        ) -> Option<Retained<CIImage>>;
714
715        #[cfg(feature = "objc2-core-graphics")]
716        #[unsafe(method(imageByColorMatchingWorkingSpaceToColorSpace:))]
717        #[unsafe(method_family = none)]
718        pub unsafe fn imageByColorMatchingWorkingSpaceToColorSpace(
719            &self,
720            color_space: &CGColorSpace,
721        ) -> Option<Retained<CIImage>>;
722
723        #[unsafe(method(imageByPremultiplyingAlpha))]
724        #[unsafe(method_family = none)]
725        pub unsafe fn imageByPremultiplyingAlpha(&self) -> Retained<CIImage>;
726
727        #[unsafe(method(imageByUnpremultiplyingAlpha))]
728        #[unsafe(method_family = none)]
729        pub unsafe fn imageByUnpremultiplyingAlpha(&self) -> Retained<CIImage>;
730
731        #[cfg(feature = "objc2-core-foundation")]
732        #[unsafe(method(imageBySettingAlphaOneInExtent:))]
733        #[unsafe(method_family = none)]
734        pub unsafe fn imageBySettingAlphaOneInExtent(&self, extent: CGRect) -> Retained<CIImage>;
735
736        #[unsafe(method(imageByApplyingGaussianBlurWithSigma:))]
737        #[unsafe(method_family = none)]
738        pub unsafe fn imageByApplyingGaussianBlurWithSigma(
739            &self,
740            sigma: c_double,
741        ) -> Retained<CIImage>;
742
743        #[unsafe(method(imageBySettingProperties:))]
744        #[unsafe(method_family = none)]
745        pub unsafe fn imageBySettingProperties(
746            &self,
747            properties: &NSDictionary,
748        ) -> Retained<CIImage>;
749
750        #[unsafe(method(imageBySamplingLinear))]
751        #[unsafe(method_family = none)]
752        pub unsafe fn imageBySamplingLinear(&self) -> Retained<CIImage>;
753
754        #[unsafe(method(imageBySamplingNearest))]
755        #[unsafe(method_family = none)]
756        pub unsafe fn imageBySamplingNearest(&self) -> Retained<CIImage>;
757
758        #[unsafe(method(imageByInsertingIntermediate))]
759        #[unsafe(method_family = none)]
760        pub unsafe fn imageByInsertingIntermediate(&self) -> Retained<CIImage>;
761
762        #[unsafe(method(imageByInsertingIntermediate:))]
763        #[unsafe(method_family = none)]
764        pub unsafe fn imageByInsertingIntermediate_(&self, cache: bool) -> Retained<CIImage>;
765
766        #[unsafe(method(imageByApplyingGainMap:))]
767        #[unsafe(method_family = none)]
768        pub unsafe fn imageByApplyingGainMap(&self, gainmap: &CIImage) -> Retained<CIImage>;
769
770        #[unsafe(method(imageByApplyingGainMap:headroom:))]
771        #[unsafe(method_family = none)]
772        pub unsafe fn imageByApplyingGainMap_headroom(
773            &self,
774            gainmap: &CIImage,
775            headroom: c_float,
776        ) -> Retained<CIImage>;
777
778        #[cfg(feature = "objc2-core-foundation")]
779        #[unsafe(method(extent))]
780        #[unsafe(method_family = none)]
781        pub unsafe fn extent(&self) -> CGRect;
782
783        #[unsafe(method(isOpaque))]
784        #[unsafe(method_family = none)]
785        pub unsafe fn isOpaque(&self) -> bool;
786
787        #[unsafe(method(properties))]
788        #[unsafe(method_family = none)]
789        pub unsafe fn properties(&self) -> Retained<NSDictionary<NSString, AnyObject>>;
790
791        #[cfg(feature = "CIFilterShape")]
792        #[unsafe(method(definition))]
793        #[unsafe(method_family = none)]
794        pub unsafe fn definition(&self) -> Retained<CIFilterShape>;
795
796        #[unsafe(method(url))]
797        #[unsafe(method_family = none)]
798        pub unsafe fn url(&self) -> Option<Retained<NSURL>>;
799
800        #[cfg(feature = "objc2-core-graphics")]
801        #[unsafe(method(colorSpace))]
802        #[unsafe(method_family = none)]
803        pub unsafe fn colorSpace(&self) -> Option<Retained<CGColorSpace>>;
804
805        #[unsafe(method(contentHeadroom))]
806        #[unsafe(method_family = none)]
807        pub unsafe fn contentHeadroom(&self) -> c_float;
808
809        #[cfg(feature = "objc2-core-video")]
810        #[unsafe(method(pixelBuffer))]
811        #[unsafe(method_family = none)]
812        pub unsafe fn pixelBuffer(&self) -> Option<Retained<CVPixelBuffer>>;
813
814        #[cfg(feature = "objc2-core-graphics")]
815        #[unsafe(method(CGImage))]
816        #[unsafe(method_family = none)]
817        pub unsafe fn CGImage(&self) -> Option<Retained<CGImage>>;
818
819        #[cfg(feature = "objc2-metal")]
820        #[unsafe(method(metalTexture))]
821        #[unsafe(method_family = none)]
822        pub unsafe fn metalTexture(&self) -> Option<Retained<ProtocolObject<dyn MTLTexture>>>;
823
824        #[cfg(feature = "objc2-core-foundation")]
825        #[unsafe(method(regionOfInterestForImage:inRect:))]
826        #[unsafe(method_family = none)]
827        pub unsafe fn regionOfInterestForImage_inRect(
828            &self,
829            image: &CIImage,
830            rect: CGRect,
831        ) -> CGRect;
832    );
833}
834
835/// Methods declared on superclass `NSObject`.
836impl CIImage {
837    extern_methods!(
838        #[unsafe(method(init))]
839        #[unsafe(method_family = init)]
840        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
841
842        #[unsafe(method(new))]
843        #[unsafe(method_family = new)]
844        pub unsafe fn new() -> Retained<Self>;
845    );
846}
847
848/// [Apple's documentation](https://developer.apple.com/documentation/coreimage/ciimageautoadjustmentoption?language=objc)
849// NS_TYPED_ENUM
850pub type CIImageAutoAdjustmentOption = NSString;
851
852extern "C" {
853    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimageautoadjustenhance?language=objc)
854    pub static kCIImageAutoAdjustEnhance: &'static CIImageAutoAdjustmentOption;
855}
856
857extern "C" {
858    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimageautoadjustredeye?language=objc)
859    pub static kCIImageAutoAdjustRedEye: &'static CIImageAutoAdjustmentOption;
860}
861
862extern "C" {
863    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimageautoadjustfeatures?language=objc)
864    pub static kCIImageAutoAdjustFeatures: &'static CIImageAutoAdjustmentOption;
865}
866
867extern "C" {
868    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimageautoadjustcrop?language=objc)
869    pub static kCIImageAutoAdjustCrop: &'static CIImageAutoAdjustmentOption;
870}
871
872extern "C" {
873    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/kciimageautoadjustlevel?language=objc)
874    pub static kCIImageAutoAdjustLevel: &'static CIImageAutoAdjustmentOption;
875}
876
877/// AutoAdjustment.
878impl CIImage {
879    extern_methods!(
880        #[cfg(feature = "CIFilter")]
881        #[unsafe(method(autoAdjustmentFilters))]
882        #[unsafe(method_family = none)]
883        pub unsafe fn autoAdjustmentFilters(&self) -> Retained<NSArray<CIFilter>>;
884
885        #[cfg(feature = "CIFilter")]
886        #[unsafe(method(autoAdjustmentFiltersWithOptions:))]
887        #[unsafe(method_family = none)]
888        pub unsafe fn autoAdjustmentFiltersWithOptions(
889            &self,
890            options: Option<&NSDictionary<CIImageAutoAdjustmentOption, AnyObject>>,
891        ) -> Retained<NSArray<CIFilter>>;
892    );
893}
894
895/// LabConversion.
896impl CIImage {
897    extern_methods!(
898        #[unsafe(method(imageByConvertingWorkingSpaceToLab))]
899        #[unsafe(method_family = none)]
900        pub unsafe fn imageByConvertingWorkingSpaceToLab(&self) -> Retained<CIImage>;
901
902        #[unsafe(method(imageByConvertingLabToWorkingSpace))]
903        #[unsafe(method_family = none)]
904        pub unsafe fn imageByConvertingLabToWorkingSpace(&self) -> Retained<CIImage>;
905    );
906}