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