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-av-foundation")]
use objc2_av_foundation::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
#[cfg(feature = "objc2-foundation")]
use objc2_foundation::*;

use crate::*;

#[cfg(feature = "objc2")]
extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arvideoformat?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "objc2")]
    pub struct ARVideoFormat;
);

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

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

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

#[cfg(feature = "objc2")]
impl ARVideoFormat {
    extern_methods!(
        #[cfg(feature = "objc2-av-foundation")]
        /// Indicates the physical position of an AVCaptureDevice's hardware on the system.
        #[unsafe(method(captureDevicePosition))]
        #[unsafe(method_family = none)]
        pub unsafe fn captureDevicePosition(&self) -> AVCaptureDevicePosition;

        #[cfg(feature = "objc2-av-foundation")]
        /// Indicates the type of AVCaptureDevice.
        #[unsafe(method(captureDeviceType))]
        #[unsafe(method_family = none)]
        pub unsafe fn captureDeviceType(&self) -> Retained<AVCaptureDeviceType>;

        #[cfg(feature = "objc2-core-foundation")]
        /// Image resolution.
        #[unsafe(method(imageResolution))]
        #[unsafe(method_family = none)]
        pub unsafe fn imageResolution(&self) -> CGSize;

        /// Frame rate.
        #[unsafe(method(framesPerSecond))]
        #[unsafe(method_family = none)]
        pub unsafe fn framesPerSecond(&self) -> NSInteger;

        /// Indicates if the video format is recommended for capturing high resolution frames.
        #[unsafe(method(isRecommendedForHighResolutionFrameCapturing))]
        #[unsafe(method_family = none)]
        pub unsafe fn isRecommendedForHighResolutionFrameCapturing(&self) -> bool;

        /// Indicates if the video format supports high dynamic range (HDR) streaming.
        #[unsafe(method(isVideoHDRSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isVideoHDRSupported(&self) -> bool;

        #[cfg(feature = "objc2-av-foundation")]
        /// The color space ARKit uses to configure the capture session when this video format is selected.
        #[unsafe(method(defaultColorSpace))]
        #[unsafe(method_family = none)]
        pub unsafe fn defaultColorSpace(&self) -> AVCaptureColorSpace;

        #[cfg(feature = "objc2-av-foundation")]
        /// The default AVCapturePhotoSettings object that ARKit uses when capturing a high resolution frame using this video format.
        ///
        /// Calling this getter will return a new instance that may be mutated to customize settings. Pass that instance to
        /// `captureHighResolutionFrameUsingPhotoSettings:completion:` to capture a high resolution frame with custom settings.
        ///
        /// See: [ARSession captureHighResolutionFrameUsingPhotoSettings:completion:]
        ///
        /// Returns: An AVCapturePhotoSettings object.
        #[unsafe(method(defaultPhotoSettings))]
        #[unsafe(method_family = none)]
        pub unsafe fn defaultPhotoSettings(&self) -> Retained<AVCapturePhotoSettings>;

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