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

use crate::*;

extern "C" {
    /// Used as the value for a dimension of a size related preference when wanting to leave it unchanged.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uiproposedscenesizenopreference?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static UIProposedSceneSizeNoPreference: CGFloat;
}

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

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

#[cfg(feature = "UIWindowSceneGeometryPreferences")]
impl UIWindowSceneGeometryPreferencesVision {
    extern_methods!(
        /// Creates a geometry preference with no changes. Update the properties who's preference should change
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;

        #[cfg(feature = "objc2-core-foundation")]
        /// Creates a geometry preference with a specific size (specifying UIProposedSceneSizeNoPreference for any dimension of size, will specify no preference, keeping that dimension the same if possible)
        #[unsafe(method(initWithSize:))]
        #[unsafe(method_family = init)]
        pub fn initWithSize(this: Allocated<Self>, size: CGSize) -> Retained<Self>;

        #[cfg(feature = "objc2-core-foundation")]
        /// The preferred system size. Use UIProposedSceneSizeNoPreference to use existing value
        #[unsafe(method(size))]
        #[unsafe(method_family = none)]
        pub fn size(&self) -> CGSize;

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`size`][Self::size].
        #[unsafe(method(setSize:))]
        #[unsafe(method_family = none)]
        pub fn setSize(&self, size: CGSize);

        #[cfg(feature = "objc2-core-foundation")]
        /// The preferred minimum size of the scene. Use `UIProposedSceneSizeNoPreference` on a dimension of the size to indicate that axis should be returned to the system default.
        /// By default, the value is left unchanged
        #[unsafe(method(minimumSize))]
        #[unsafe(method_family = none)]
        pub fn minimumSize(&self) -> CGSize;

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`minimumSize`][Self::minimumSize].
        #[unsafe(method(setMinimumSize:))]
        #[unsafe(method_family = none)]
        pub fn setMinimumSize(&self, minimum_size: CGSize);

        #[cfg(feature = "objc2-core-foundation")]
        /// The preferred maximum size of the scene. Use `UIProposedSceneSizeNoPreference` on a dimension of the size to indicate that axis should be returned to the system default.
        /// By default, the value is left unchanged
        #[unsafe(method(maximumSize))]
        #[unsafe(method_family = none)]
        pub fn maximumSize(&self) -> CGSize;

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`maximumSize`][Self::maximumSize].
        #[unsafe(method(setMaximumSize:))]
        #[unsafe(method_family = none)]
        pub fn setMaximumSize(&self, maximum_size: CGSize);

        #[cfg(feature = "UIWindowSceneGeometry")]
        /// The user resizable restrictions on the window scene
        /// By default, the value is left unchanged
        #[unsafe(method(resizingRestrictions))]
        #[unsafe(method_family = none)]
        pub fn resizingRestrictions(&self) -> UIWindowSceneResizingRestrictions;

        #[cfg(feature = "UIWindowSceneGeometry")]
        /// Setter for [`resizingRestrictions`][Self::resizingRestrictions].
        #[unsafe(method(setResizingRestrictions:))]
        #[unsafe(method_family = none)]
        pub fn setResizingRestrictions(
            &self,
            resizing_restrictions: UIWindowSceneResizingRestrictions,
        );
    );
}

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