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"))]
31extern_conformance!(
32    unsafe impl ARAnchorCopying for ARImageAnchor {}
33);
34
35#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
36extern_conformance!(
37    unsafe impl ARTrackable for ARImageAnchor {}
38);
39
40#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
41extern_conformance!(
42    unsafe impl NSCoding for ARImageAnchor {}
43);
44
45#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
46extern_conformance!(
47    unsafe impl NSCopying for ARImageAnchor {}
48);
49
50#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
51unsafe impl CopyingHelper for ARImageAnchor {
52    type Result = Self;
53}
54
55#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
56extern_conformance!(
57    unsafe impl NSObjectProtocol for ARImageAnchor {}
58);
59
60#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
61extern_conformance!(
62    unsafe impl NSSecureCoding for ARImageAnchor {}
63);
64
65#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
66impl ARImageAnchor {
67    extern_methods!(
68        #[cfg(feature = "ARReferenceImage")]
69        /// Reference to the detected image.
70        ///
71        /// This property is not atomic.
72        ///
73        /// # Safety
74        ///
75        /// This might not be thread-safe.
76        #[unsafe(method(referenceImage))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn referenceImage(&self) -> Retained<ARReferenceImage>;
79
80        #[cfg(feature = "objc2-core-foundation")]
81        /// The factor between estimated physical size and provided size.
82        ///
83        ///
84        /// This value will be estimated if automaticImageScaleEstimationEnabled is set to true on the ARWorldTrackingConfiguration. It is used to
85        /// correct the transform's translation. Default value is 1.0.
86        ///
87        /// This property is not atomic.
88        ///
89        /// # Safety
90        ///
91        /// This might not be thread-safe.
92        #[unsafe(method(estimatedScaleFactor))]
93        #[unsafe(method_family = none)]
94        pub unsafe fn estimatedScaleFactor(&self) -> CGFloat;
95    );
96}
97
98/// Methods declared on superclass `ARAnchor`.
99#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
100impl ARImageAnchor {
101    extern_methods!(
102        /// Unavailable
103        #[unsafe(method(init))]
104        #[unsafe(method_family = init)]
105        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
106
107        #[unsafe(method(new))]
108        #[unsafe(method_family = new)]
109        pub unsafe fn new() -> Retained<Self>;
110    );
111}