objc2_vision/generated/
VNDetectTextRectanglesRequest.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::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// A request that will detect regions of text in an image.
12    ///
13    ///
14    /// This request will generate VNTextObservation objects describing the locations of text detected in an image.
15    ///
16    /// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vndetecttextrectanglesrequest?language=objc)
17    #[unsafe(super(VNImageBasedRequest, VNRequest, NSObject))]
18    #[derive(Debug, PartialEq, Eq, Hash)]
19    #[cfg(feature = "VNRequest")]
20    pub struct VNDetectTextRectanglesRequest;
21);
22
23#[cfg(feature = "VNRequest")]
24unsafe impl NSCopying for VNDetectTextRectanglesRequest {}
25
26#[cfg(feature = "VNRequest")]
27unsafe impl CopyingHelper for VNDetectTextRectanglesRequest {
28    type Result = Self;
29}
30
31#[cfg(feature = "VNRequest")]
32unsafe impl NSObjectProtocol for VNDetectTextRectanglesRequest {}
33
34#[cfg(feature = "VNRequest")]
35impl VNDetectTextRectanglesRequest {
36    extern_methods!(
37        /// Specify whether or not the bounding boxes of individual characters should also be returned in the resultant VNTextObservations. Default is NO.
38        #[unsafe(method(reportCharacterBoxes))]
39        #[unsafe(method_family = none)]
40        pub unsafe fn reportCharacterBoxes(&self) -> bool;
41
42        /// Setter for [`reportCharacterBoxes`][Self::reportCharacterBoxes].
43        #[unsafe(method(setReportCharacterBoxes:))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn setReportCharacterBoxes(&self, report_character_boxes: bool);
46
47        #[cfg(feature = "VNObservation")]
48        /// VNTextObservation results.
49        #[unsafe(method(results))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn results(&self) -> Option<Retained<NSArray<VNTextObservation>>>;
52    );
53}
54
55/// Methods declared on superclass `VNRequest`.
56#[cfg(feature = "VNRequest")]
57impl VNDetectTextRectanglesRequest {
58    extern_methods!(
59        /// Creates a new VNRequest with no completion handler.
60        #[unsafe(method(init))]
61        #[unsafe(method_family = init)]
62        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
63
64        #[cfg(feature = "block2")]
65        /// Creates a new VNRequest with an optional completion handler.
66        ///
67        ///
68        /// 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.
69        #[unsafe(method(initWithCompletionHandler:))]
70        #[unsafe(method_family = init)]
71        pub unsafe fn initWithCompletionHandler(
72            this: Allocated<Self>,
73            completion_handler: VNRequestCompletionHandler,
74        ) -> Retained<Self>;
75    );
76}
77
78/// Methods declared on superclass `NSObject`.
79#[cfg(feature = "VNRequest")]
80impl VNDetectTextRectanglesRequest {
81    extern_methods!(
82        #[unsafe(method(new))]
83        #[unsafe(method_family = new)]
84        pub unsafe fn new() -> Retained<Self>;
85    );
86}
87
88/// [Apple's documentation](https://developer.apple.com/documentation/vision/vndetecttextrectanglesrequestrevision1?language=objc)
89pub static VNDetectTextRectanglesRequestRevision1: NSUInteger = 1;