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-foundation")]
use objc2_foundation::*;

use crate::*;

#[cfg(feature = "objc2")]
extern_class!(
    /// Object representing the mapping of a physical 3D space.
    ///
    /// ARWorldMap supports archiving and unarchiving across devices
    /// and versions with NSDecodingFailurePolicySetErrorAndReturn, providing an error
    /// if the map format is not supported.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/arworldmap?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "objc2")]
    pub struct ARWorldMap;
);

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

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

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

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

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

#[cfg(feature = "objc2")]
impl ARWorldMap {
    extern_methods!(
        #[cfg(all(feature = "ARAnchor", feature = "objc2-foundation"))]
        /// A list of anchors in the map.
        #[unsafe(method(anchors))]
        #[unsafe(method_family = none)]
        pub unsafe fn anchors(&self) -> Retained<NSArray<ARAnchor>>;

        #[cfg(all(feature = "ARAnchor", feature = "objc2-foundation"))]
        /// Setter for [`anchors`][Self::anchors].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setAnchors:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAnchors(&self, anchors: &NSArray<ARAnchor>);

        #[cfg(feature = "ARPointCloud")]
        /// The feature points in the map.
        #[unsafe(method(rawFeaturePoints))]
        #[unsafe(method_family = none)]
        pub unsafe fn rawFeaturePoints(&self) -> Retained<ARPointCloud>;

        /// 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>;
    );
}