objc2_core_image/generated/
CIImageProvider.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-graphics")]
7use objc2_core_graphics::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12#[cfg(feature = "CIImage")]
14impl CIImage {
15 extern_methods!(
16 #[cfg(feature = "objc2-core-graphics")]
17 #[unsafe(method(imageWithImageProvider:size::format:colorSpace:options:))]
18 #[unsafe(method_family = none)]
19 pub unsafe fn imageWithImageProvider_size__format_colorSpace_options(
20 p: &AnyObject,
21 width: usize,
22 height: usize,
23 f: CIFormat,
24 cs: Option<&CGColorSpace>,
25 options: Option<&NSDictionary<CIImageOption, AnyObject>>,
26 ) -> Retained<CIImage>;
27
28 #[cfg(feature = "objc2-core-graphics")]
29 #[unsafe(method(initWithImageProvider:size::format:colorSpace:options:))]
30 #[unsafe(method_family = init)]
31 pub unsafe fn initWithImageProvider_size__format_colorSpace_options(
32 this: Allocated<Self>,
33 p: &AnyObject,
34 width: usize,
35 height: usize,
36 f: CIFormat,
37 cs: Option<&CGColorSpace>,
38 options: Option<&NSDictionary<CIImageOption, AnyObject>>,
39 ) -> Retained<Self>;
40 );
41}
42
43mod private_NSObjectCIImageProvider {
44 pub trait Sealed {}
45}
46
47#[doc(alias = "CIImageProvider")]
50pub unsafe trait NSObjectCIImageProvider:
51 ClassType + Sized + private_NSObjectCIImageProvider::Sealed
52{
53 extern_methods!(
54 #[unsafe(method(provideImageData:bytesPerRow:origin::size::userInfo:))]
55 #[unsafe(method_family = none)]
56 unsafe fn provideImageData_bytesPerRow_origin__size__userInfo(
57 &self,
58 data: NonNull<c_void>,
59 rowbytes: usize,
60 x: usize,
61 y: usize,
62 width: usize,
63 height: usize,
64 info: Option<&AnyObject>,
65 );
66 );
67}
68
69impl private_NSObjectCIImageProvider::Sealed for NSObject {}
70unsafe impl NSObjectCIImageProvider for NSObject {}
71
72extern "C" {
73 #[cfg(feature = "CIImage")]
75 pub static kCIImageProviderTileSize: &'static CIImageOption;
76}
77
78extern "C" {
79 #[cfg(feature = "CIImage")]
81 pub static kCIImageProviderUserInfo: &'static CIImageOption;
82}