use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-image")]
use objc2_core_image::*;
use objc2_foundation::*;
use crate::*;
pub type VNImageOption = NSString;
extern "C" {
pub static VNImageOptionProperties: &'static VNImageOption;
}
extern "C" {
pub static VNImageOptionCameraIntrinsics: &'static VNImageOption;
}
extern "C" {
pub static VNImageOptionCIContext: &'static VNImageOption;
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct VNImageRequestHandler;
unsafe impl ClassType for VNImageRequestHandler {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for VNImageRequestHandler {}
extern_methods!(
unsafe impl VNImageRequestHandler {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "objc2-core-image")]
#[method_id(@__retain_semantics Init initWithCIImage:options:)]
pub unsafe fn initWithCIImage_options(
this: Allocated<Self>,
image: &CIImage,
options: &NSDictionary<VNImageOption, AnyObject>,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithURL:options:)]
pub unsafe fn initWithURL_options(
this: Allocated<Self>,
image_url: &NSURL,
options: &NSDictionary<VNImageOption, AnyObject>,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithData:options:)]
pub unsafe fn initWithData_options(
this: Allocated<Self>,
image_data: &NSData,
options: &NSDictionary<VNImageOption, AnyObject>,
) -> Retained<Self>;
#[cfg(feature = "VNRequest")]
#[method(performRequests:error:_)]
pub unsafe fn performRequests_error(
&self,
requests: &NSArray<VNRequest>,
) -> Result<(), Retained<NSError>>;
}
);
extern_methods!(
unsafe impl VNImageRequestHandler {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct VNSequenceRequestHandler;
unsafe impl ClassType for VNSequenceRequestHandler {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for VNSequenceRequestHandler {}
extern_methods!(
unsafe impl VNSequenceRequestHandler {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(all(feature = "VNRequest", feature = "objc2-core-image"))]
#[method(performRequests:onCIImage:error:_)]
pub unsafe fn performRequests_onCIImage_error(
&self,
requests: &NSArray<VNRequest>,
image: &CIImage,
) -> Result<(), Retained<NSError>>;
#[cfg(feature = "VNRequest")]
#[method(performRequests:onImageURL:error:_)]
pub unsafe fn performRequests_onImageURL_error(
&self,
requests: &NSArray<VNRequest>,
image_url: &NSURL,
) -> Result<(), Retained<NSError>>;
#[cfg(feature = "VNRequest")]
#[method(performRequests:onImageData:error:_)]
pub unsafe fn performRequests_onImageData_error(
&self,
requests: &NSArray<VNRequest>,
image_data: &NSData,
) -> Result<(), Retained<NSError>>;
}
);
extern_methods!(
unsafe impl VNSequenceRequestHandler {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);