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::ptr::NonNull;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-foundation")]
use objc2_foundation::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/arkit/arskeletonjointname?language=objc)
// NS_TYPED_ENUM
#[cfg(feature = "objc2-foundation")]
pub type ARSkeletonJointName = NSString;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arskeletonjointnameroot?language=objc)
    #[cfg(feature = "objc2-foundation")]
    pub static ARSkeletonJointNameRoot: &'static ARSkeletonJointName;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arskeletonjointnamehead?language=objc)
    #[cfg(feature = "objc2-foundation")]
    pub static ARSkeletonJointNameHead: &'static ARSkeletonJointName;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arskeletonjointnamelefthand?language=objc)
    #[cfg(feature = "objc2-foundation")]
    pub static ARSkeletonJointNameLeftHand: &'static ARSkeletonJointName;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arskeletonjointnamerighthand?language=objc)
    #[cfg(feature = "objc2-foundation")]
    pub static ARSkeletonJointNameRightHand: &'static ARSkeletonJointName;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arskeletonjointnameleftfoot?language=objc)
    #[cfg(feature = "objc2-foundation")]
    pub static ARSkeletonJointNameLeftFoot: &'static ARSkeletonJointName;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arskeletonjointnamerightfoot?language=objc)
    #[cfg(feature = "objc2-foundation")]
    pub static ARSkeletonJointNameRightFoot: &'static ARSkeletonJointName;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arskeletonjointnameleftshoulder?language=objc)
    #[cfg(feature = "objc2-foundation")]
    pub static ARSkeletonJointNameLeftShoulder: &'static ARSkeletonJointName;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arskeletonjointnamerightshoulder?language=objc)
    #[cfg(feature = "objc2-foundation")]
    pub static ARSkeletonJointNameRightShoulder: &'static ARSkeletonJointName;
}

#[cfg(feature = "objc2")]
extern_class!(
    /// Definition of a skeleton.
    ///
    ///
    /// A skeleton consists of a set of labeled joints that are defined in a certain hierarchy, i.e. joints are parented to other joints.
    /// One may use the parentIndices property to identify the hierarchy for a given skeleton definition.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/arskeletondefinition?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "objc2")]
    pub struct ARSkeletonDefinition;
);

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

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

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

#[cfg(feature = "objc2")]
impl ARSkeletonDefinition {
    extern_methods!(
        /// Default skeleton definition for bodies defined in 3D.
        ///
        /// Note: The default height of this skeleton, measured from lowest to highest joint in standing position, is defined to be 1.71 meters.
        ///
        /// See: ARSkeleton3D
        #[unsafe(method(defaultBody3DSkeletonDefinition))]
        #[unsafe(method_family = none)]
        pub unsafe fn defaultBody3DSkeletonDefinition() -> Retained<ARSkeletonDefinition>;

        /// Default skeleton definition for bodies defined in 2D.
        ///
        /// See: ARBody2D
        #[unsafe(method(defaultBody2DSkeletonDefinition))]
        #[unsafe(method_family = none)]
        pub unsafe fn defaultBody2DSkeletonDefinition() -> Retained<ARSkeletonDefinition>;

        /// The number of joints.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(jointCount))]
        #[unsafe(method_family = none)]
        pub unsafe fn jointCount(&self) -> NSUInteger;

        #[cfg(feature = "objc2-foundation")]
        /// The joint names.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(jointNames))]
        #[unsafe(method_family = none)]
        pub unsafe fn jointNames(&self) -> Retained<NSArray<NSString>>;

        #[cfg(feature = "objc2-foundation")]
        /// The parent index for each joint.
        ///
        /// This property may be used to identify the hierarchical dependency between joints. If a line is drawn for every joint and its parent joint
        /// the result is a visualization of the underlying skeleton. The joint with no parent is denoted as the root joint. The root joint's parent index has
        /// a value of -1.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(parentIndices))]
        #[unsafe(method_family = none)]
        pub unsafe fn parentIndices(&self) -> Retained<NSArray<NSNumber>>;

        #[cfg(feature = "ARSkeleton")]
        /// The 3D skeleton in neutral pose.
        ///
        /// The neutral skeleton pose assumes a standardized size of the skeleton in meters. The neutral pose is defined as the skeleton's T-pose.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(neutralBodySkeleton3D))]
        #[unsafe(method_family = none)]
        pub unsafe fn neutralBodySkeleton3D(&self) -> Option<Retained<ARSkeleton3D>>;

        #[cfg(feature = "objc2-foundation")]
        /// Returns the index for a given joint identifier.
        ///
        ///
        /// Parameter `jointName`: Name of a given joint.
        ///
        /// This function returns NSNotFound if an invalid joint name is passed.
        ///
        /// Returns: Joint index.
        #[unsafe(method(indexForJointName:))]
        #[unsafe(method_family = none)]
        pub unsafe fn indexForJointName(&self, joint_name: &ARSkeletonJointName) -> NSUInteger;

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