objc2_ar_kit/generated/
ARCamera.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5#[cfg(feature = "objc2")]
6use objc2::__framework_prelude::*;
7#[cfg(feature = "objc2-core-foundation")]
8use objc2_core_foundation::*;
9#[cfg(feature = "objc2-foundation")]
10use objc2_foundation::*;
11
12use crate::*;
13
14#[cfg(feature = "objc2")]
15extern_class!(
16    /// A model representing the camera and its parameters.
17    ///
18    /// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/arcamera?language=objc)
19    #[unsafe(super(NSObject))]
20    #[derive(Debug, PartialEq, Eq, Hash)]
21    #[cfg(feature = "objc2")]
22    pub struct ARCamera;
23);
24
25#[cfg(feature = "objc2")]
26unsafe impl Send for ARCamera {}
27
28#[cfg(feature = "objc2")]
29unsafe impl Sync for ARCamera {}
30
31#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
32extern_conformance!(
33    unsafe impl NSCopying for ARCamera {}
34);
35
36#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
37unsafe impl CopyingHelper for ARCamera {
38    type Result = Self;
39}
40
41#[cfg(feature = "objc2")]
42extern_conformance!(
43    unsafe impl NSObjectProtocol for ARCamera {}
44);
45
46#[cfg(feature = "objc2")]
47impl ARCamera {
48    extern_methods!(
49        #[cfg(feature = "ARTrackingStatusTypes")]
50        /// The tracking state of the camera.
51        ///
52        /// This property is not atomic.
53        ///
54        /// # Safety
55        ///
56        /// This might not be thread-safe.
57        #[unsafe(method(trackingState))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn trackingState(&self) -> ARTrackingState;
60
61        #[cfg(feature = "ARTrackingStatusTypes")]
62        /// The reason for the camera’s current tracking state.
63        ///
64        /// This property is not atomic.
65        ///
66        /// # Safety
67        ///
68        /// This might not be thread-safe.
69        #[unsafe(method(trackingStateReason))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn trackingStateReason(&self) -> ARTrackingStateReason;
72
73        #[cfg(feature = "objc2-core-foundation")]
74        /// The camera image resolution in pixels.
75        ///
76        /// This property is not atomic.
77        ///
78        /// # Safety
79        ///
80        /// This might not be thread-safe.
81        #[unsafe(method(imageResolution))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn imageResolution(&self) -> CGSize;
84
85        #[cfg(feature = "objc2-foundation")]
86        /// The camera exposure duration in seconds.
87        ///
88        /// This property is not atomic.
89        ///
90        /// # Safety
91        ///
92        /// This might not be thread-safe.
93        #[unsafe(method(exposureDuration))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn exposureDuration(&self) -> NSTimeInterval;
96
97        /// The camera exposure offset in EV (exposure value) units.
98        ///
99        /// This property is not atomic.
100        ///
101        /// # Safety
102        ///
103        /// This might not be thread-safe.
104        #[unsafe(method(exposureOffset))]
105        #[unsafe(method_family = none)]
106        pub unsafe fn exposureOffset(&self) -> c_float;
107
108        /// Unavailable
109        #[unsafe(method(init))]
110        #[unsafe(method_family = init)]
111        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
112
113        #[unsafe(method(new))]
114        #[unsafe(method_family = new)]
115        pub unsafe fn new() -> Retained<Self>;
116    );
117}