//! 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_class!(
    /// Sizing preferences for the scene. Clients do not create `UISceneSizeRestrictions` directly. An instance is returned from `UIWindowScene.sizeRestrictions`
    /// if the platform supports scene resizing.
    /// - Note: The system imposes limits on each preference that may result in it not being honored.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uiscenesizerestrictions?language=objc)
    #[unsafe(super(NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UISceneSizeRestrictions;
);

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

impl UISceneSizeRestrictions {
    extern_methods!(
        #[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(mtm: MainThreadMarker) -> Retained<Self>;

        #[cfg(feature = "objc2-core-foundation")]
        /// The preferred minimum size of the scene
        #[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
        #[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);

        /// Whether the scene supports full screen or not
        /// - Note: Currently only honored on Mac Catalyst
        #[unsafe(method(allowsFullScreen))]
        #[unsafe(method_family = none)]
        pub fn allowsFullScreen(&self) -> bool;

        /// Setter for [`allowsFullScreen`][Self::allowsFullScreen].
        #[unsafe(method(setAllowsFullScreen:))]
        #[unsafe(method_family = none)]
        pub fn setAllowsFullScreen(&self, allows_full_screen: bool);
    );
}
