objc2-ar-kit 0.3.2

Bindings to the ARKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
#[cfg(feature = "objc2-foundation")]
use objc2_foundation::*;

use crate::*;

#[cfg(feature = "objc2")]
extern_class!(
    /// A model representing the camera and its parameters.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/arcamera?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "objc2")]
    pub struct ARCamera;
);

#[cfg(feature = "objc2")]
unsafe impl Send for ARCamera {}

#[cfg(feature = "objc2")]
unsafe impl Sync for ARCamera {}

#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
extern_conformance!(
    unsafe impl NSCopying for ARCamera {}
);

#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
unsafe impl CopyingHelper for ARCamera {
    type Result = Self;
}

#[cfg(feature = "objc2")]
extern_conformance!(
    unsafe impl NSObjectProtocol for ARCamera {}
);

#[cfg(feature = "objc2")]
impl ARCamera {
    extern_methods!(
        #[cfg(feature = "ARTrackingStatusTypes")]
        /// The tracking state of the camera.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(trackingState))]
        #[unsafe(method_family = none)]
        pub unsafe fn trackingState(&self) -> ARTrackingState;

        #[cfg(feature = "ARTrackingStatusTypes")]
        /// The reason for the camera’s current tracking state.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(trackingStateReason))]
        #[unsafe(method_family = none)]
        pub unsafe fn trackingStateReason(&self) -> ARTrackingStateReason;

        #[cfg(feature = "objc2-core-foundation")]
        /// The camera image resolution in pixels.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(imageResolution))]
        #[unsafe(method_family = none)]
        pub unsafe fn imageResolution(&self) -> CGSize;

        #[cfg(feature = "objc2-foundation")]
        /// The camera exposure duration in seconds.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(exposureDuration))]
        #[unsafe(method_family = none)]
        pub unsafe fn exposureDuration(&self) -> NSTimeInterval;

        /// The camera exposure offset in EV (exposure value) units.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(exposureOffset))]
        #[unsafe(method_family = none)]
        pub unsafe fn exposureOffset(&self) -> c_float;

        /// Unavailable
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}