use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIWindowSceneResizingRestrictions(pub NSInteger);
impl UIWindowSceneResizingRestrictions {
#[doc(alias = "UIWindowSceneResizingRestrictionsUnspecified")]
pub const Unspecified: Self = Self(0);
#[doc(alias = "UIWindowSceneResizingRestrictionsNone")]
pub const None: Self = Self(1);
#[doc(alias = "UIWindowSceneResizingRestrictionsUniform")]
pub const Uniform: Self = Self(2);
#[doc(alias = "UIWindowSceneResizingRestrictionsFreeform")]
pub const Freeform: Self = Self(3);
}
unsafe impl Encode for UIWindowSceneResizingRestrictions {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UIWindowSceneResizingRestrictions {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UIWindowSceneGeometry;
);
extern_conformance!(
unsafe impl NSCopying for UIWindowSceneGeometry {}
);
unsafe impl CopyingHelper for UIWindowSceneGeometry {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for UIWindowSceneGeometry {}
);
impl UIWindowSceneGeometry {
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() -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(systemFrame))]
#[unsafe(method_family = none)]
pub fn systemFrame(&self) -> CGRect;
#[cfg(feature = "UIView")]
#[unsafe(method(coordinateSpace))]
#[unsafe(method_family = none)]
pub fn coordinateSpace(
&self,
mtm: MainThreadMarker,
) -> Retained<ProtocolObject<dyn UICoordinateSpace>>;
#[cfg(feature = "UIOrientation")]
#[unsafe(method(interfaceOrientation))]
#[unsafe(method_family = none)]
pub fn interfaceOrientation(&self) -> UIInterfaceOrientation;
#[unsafe(method(isInterfaceOrientationLocked))]
#[unsafe(method_family = none)]
pub fn isInterfaceOrientationLocked(&self) -> bool;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(minimumSize))]
#[unsafe(method_family = none)]
pub fn minimumSize(&self) -> CGSize;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(maximumSize))]
#[unsafe(method_family = none)]
pub fn maximumSize(&self) -> CGSize;
#[unsafe(method(resizingRestrictions))]
#[unsafe(method_family = none)]
pub fn resizingRestrictions(&self) -> UIWindowSceneResizingRestrictions;
#[unsafe(method(isInteractivelyResizing))]
#[unsafe(method_family = none)]
pub fn isInteractivelyResizing(&self) -> bool;
);
}