objc2_vision/generated/
VNGenerateAttentionBasedSaliencyImageRequest.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// Generates an image that identifies which part(s) of a given image is most interesting (i.e. something that a human is likely to look at - hence attention based).
11    /// The resulting observation, VNSaliencyImageObservation, encodes this data as a heat map which can be used to highlight regions of interest.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vngenerateattentionbasedsaliencyimagerequest?language=objc)
14    #[unsafe(super(VNImageBasedRequest, VNRequest, NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[cfg(feature = "VNRequest")]
17    pub struct VNGenerateAttentionBasedSaliencyImageRequest;
18);
19
20#[cfg(feature = "VNRequest")]
21extern_conformance!(
22    unsafe impl NSCopying for VNGenerateAttentionBasedSaliencyImageRequest {}
23);
24
25#[cfg(feature = "VNRequest")]
26unsafe impl CopyingHelper for VNGenerateAttentionBasedSaliencyImageRequest {
27    type Result = Self;
28}
29
30#[cfg(feature = "VNRequest")]
31extern_conformance!(
32    unsafe impl NSObjectProtocol for VNGenerateAttentionBasedSaliencyImageRequest {}
33);
34
35#[cfg(feature = "VNRequest")]
36impl VNGenerateAttentionBasedSaliencyImageRequest {
37    extern_methods!(
38        #[cfg(feature = "VNObservation")]
39        /// VNSaliencyImageObservation results.
40        #[unsafe(method(results))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn results(&self) -> Option<Retained<NSArray<VNSaliencyImageObservation>>>;
43    );
44}
45
46/// Methods declared on superclass `VNRequest`.
47#[cfg(feature = "VNRequest")]
48impl VNGenerateAttentionBasedSaliencyImageRequest {
49    extern_methods!(
50        /// Creates a new VNRequest with no completion handler.
51        #[unsafe(method(init))]
52        #[unsafe(method_family = init)]
53        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
54
55        #[cfg(feature = "block2")]
56        /// Creates a new VNRequest with an optional completion handler.
57        ///
58        ///
59        /// Parameter `completionHandler`: The block to be invoked after the request has completed its processing. The completion handler gets executed on the same dispatch queue as the request being executed.
60        #[unsafe(method(initWithCompletionHandler:))]
61        #[unsafe(method_family = init)]
62        pub unsafe fn initWithCompletionHandler(
63            this: Allocated<Self>,
64            completion_handler: VNRequestCompletionHandler,
65        ) -> Retained<Self>;
66    );
67}
68
69/// Methods declared on superclass `NSObject`.
70#[cfg(feature = "VNRequest")]
71impl VNGenerateAttentionBasedSaliencyImageRequest {
72    extern_methods!(
73        #[unsafe(method(new))]
74        #[unsafe(method_family = new)]
75        pub unsafe fn new() -> Retained<Self>;
76    );
77}
78
79/// [Apple's documentation](https://developer.apple.com/documentation/vision/vngenerateattentionbasedsaliencyimagerequestrevision1?language=objc)
80pub static VNGenerateAttentionBasedSaliencyImageRequestRevision1: NSUInteger = 1;
81
82/// Improved accuracy, reduced latency and memory utilization.
83///
84/// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vngenerateattentionbasedsaliencyimagerequestrevision2?language=objc)
85pub static VNGenerateAttentionBasedSaliencyImageRequestRevision2: NSUInteger = 2;