objc2_ar_kit/generated/
ARImageAnchor.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8#[cfg(feature = "objc2-foundation")]
9use objc2_foundation::*;
10
11use crate::*;
12
13#[cfg(feature = "objc2")]
14extern_class!(
15    /// An anchor representing an image in the world.
16    ///
17    /// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/arimageanchor?language=objc)
18    #[unsafe(super(ARAnchor, NSObject))]
19    #[derive(Debug, PartialEq, Eq, Hash)]
20    #[cfg(all(feature = "ARAnchor", feature = "objc2"))]
21    pub struct ARImageAnchor;
22);
23
24#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
25unsafe impl Send for ARImageAnchor {}
26
27#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
28unsafe impl Sync for ARImageAnchor {}
29
30#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
31unsafe impl ARAnchorCopying for ARImageAnchor {}
32
33#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
34unsafe impl ARTrackable for ARImageAnchor {}
35
36#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
37unsafe impl NSCoding for ARImageAnchor {}
38
39#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
40unsafe impl NSCopying for ARImageAnchor {}
41
42#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
43unsafe impl CopyingHelper for ARImageAnchor {
44    type Result = Self;
45}
46
47#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
48unsafe impl NSObjectProtocol for ARImageAnchor {}
49
50#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
51unsafe impl NSSecureCoding for ARImageAnchor {}
52
53#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
54impl ARImageAnchor {
55    extern_methods!(
56        #[cfg(feature = "ARReferenceImage")]
57        /// Reference to the detected image.
58        #[unsafe(method(referenceImage))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn referenceImage(&self) -> Retained<ARReferenceImage>;
61
62        #[cfg(feature = "objc2-core-foundation")]
63        /// The factor between estimated physical size and provided size.
64        ///
65        ///
66        /// This value will be estimated if automaticImageScaleEstimationEnabled is set to true on the ARWorldTrackingConfiguration. It is used to
67        /// correct the transform's translation. Default value is 1.0.
68        #[unsafe(method(estimatedScaleFactor))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn estimatedScaleFactor(&self) -> CGFloat;
71    );
72}
73
74/// Methods declared on superclass `ARAnchor`.
75#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
76impl ARImageAnchor {
77    extern_methods!(
78        /// Unavailable
79        #[unsafe(method(init))]
80        #[unsafe(method_family = init)]
81        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
82
83        #[unsafe(method(new))]
84        #[unsafe(method_family = new)]
85        pub unsafe fn new() -> Retained<Self>;
86    );
87}