objc2-av-foundation 0.3.2

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

use crate::*;

extern_class!(
    /// An AVSpatialVideoConfiguration specifies spatial video properties.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avspatialvideoconfiguration?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct AVSpatialVideoConfiguration;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for AVSpatialVideoConfiguration {}
);

impl AVSpatialVideoConfiguration {
    extern_methods!(
        /// Specifies intrinsic and extrinsic parameters for single or multiple lenses.
        ///
        /// The property value is an array of dictionaries describing the camera calibration data for each lens. The camera calibration data includes intrinsics and extrinics with other parameters.  This property is only applicable when the projection kind is kCMTagProjectionTypeParametricImmersive.  Can be nil if the value is unknown.
        #[unsafe(method(cameraCalibrationDataLensCollection))]
        #[unsafe(method_family = none)]
        pub unsafe fn cameraCalibrationDataLensCollection(
            &self,
        ) -> Option<Retained<NSArray<NSDictionary<NSString, AnyObject>>>>;

        /// Setter for [`cameraCalibrationDataLensCollection`][Self::cameraCalibrationDataLensCollection].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        ///
        /// # Safety
        ///
        /// `camera_calibration_data_lens_collection` generic generic should be of the correct type.
        #[unsafe(method(setCameraCalibrationDataLensCollection:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setCameraCalibrationDataLensCollection(
            &self,
            camera_calibration_data_lens_collection: Option<
                &NSArray<NSDictionary<NSString, AnyObject>>,
            >,
        );

        /// Specifies horizontal field of view in thousandths of a degree. Can be nil if the value is unknown.
        #[unsafe(method(horizontalFieldOfView))]
        #[unsafe(method_family = none)]
        pub unsafe fn horizontalFieldOfView(&self) -> Option<Retained<NSNumber>>;

        /// Setter for [`horizontalFieldOfView`][Self::horizontalFieldOfView].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setHorizontalFieldOfView:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setHorizontalFieldOfView(&self, horizontal_field_of_view: Option<&NSNumber>);

        /// Specifies the distance between centers of the lenses of the camera system that created the video.
        ///
        /// The distance is in micrometers or thousandths of a millimeter. Can be nil if the value is unknown.
        #[unsafe(method(cameraSystemBaseline))]
        #[unsafe(method_family = none)]
        pub unsafe fn cameraSystemBaseline(&self) -> Option<Retained<NSNumber>>;

        /// Setter for [`cameraSystemBaseline`][Self::cameraSystemBaseline].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setCameraSystemBaseline:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setCameraSystemBaseline(&self, camera_system_baseline: Option<&NSNumber>);

        /// Specifies a relative shift of the left and right images, which changes the zero parallax plane.
        ///
        /// The value is in normalized image space and measured over the range of -10000 to 10000 mapping to the uniform range [-1.0...1.0]. The interval of 0.0 to 1.0 or 0 to 10000 maps onto the stereo eye view image width. The negative interval 0.0 to -1.0 or 0 to -10000 similarly map onto the stereo eye view image width. Can be nil if the value is unknown.
        #[unsafe(method(disparityAdjustment))]
        #[unsafe(method_family = none)]
        pub unsafe fn disparityAdjustment(&self) -> Option<Retained<NSNumber>>;

        /// Setter for [`disparityAdjustment`][Self::disparityAdjustment].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setDisparityAdjustment:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDisparityAdjustment(&self, disparity_adjustment: Option<&NSNumber>);

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

        #[cfg(feature = "objc2-core-media")]
        /// Initializes an AVSpatialVideoConfiguration with a format description.
        ///
        /// The format description is not stored.
        /// - Parameter formatDescription: Format description to use to initialize the AVSpatialVideoConfiguration.
        ///
        /// - Returns: An instance of AVSpatialVideoConfiguration
        #[unsafe(method(initWithFormatDescription:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithFormatDescription(
            this: Allocated<Self>,
            format_description: &CMFormatDescription,
        ) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
impl AVSpatialVideoConfiguration {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}