objc2_ui_kit/generated/
UIWindowSceneGeometry.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-foundation")]
6use objc2_core_foundation::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11#[repr(transparent)]
14#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
15pub struct UIWindowSceneResizingRestrictions(pub NSInteger);
16impl UIWindowSceneResizingRestrictions {
17 #[doc(alias = "UIWindowSceneResizingRestrictionsUnspecified")]
19 pub const Unspecified: Self = Self(0);
20 #[doc(alias = "UIWindowSceneResizingRestrictionsNone")]
22 pub const None: Self = Self(1);
23 #[doc(alias = "UIWindowSceneResizingRestrictionsUniform")]
25 pub const Uniform: Self = Self(2);
26 #[doc(alias = "UIWindowSceneResizingRestrictionsFreeform")]
28 pub const Freeform: Self = Self(3);
29}
30
31unsafe impl Encode for UIWindowSceneResizingRestrictions {
32 const ENCODING: Encoding = NSInteger::ENCODING;
33}
34
35unsafe impl RefEncode for UIWindowSceneResizingRestrictions {
36 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
37}
38
39extern_class!(
40 #[unsafe(super(NSObject))]
42 #[derive(Debug, PartialEq, Eq, Hash)]
43 pub struct UIWindowSceneGeometry;
44);
45
46unsafe impl NSCopying for UIWindowSceneGeometry {}
47
48unsafe impl CopyingHelper for UIWindowSceneGeometry {
49 type Result = Self;
50}
51
52unsafe impl NSObjectProtocol for UIWindowSceneGeometry {}
53
54impl UIWindowSceneGeometry {
55 extern_methods!(
56 #[unsafe(method(init))]
58 #[unsafe(method_family = init)]
59 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
60
61 #[unsafe(method(new))]
62 #[unsafe(method_family = new)]
63 pub unsafe fn new() -> Retained<Self>;
64
65 #[cfg(feature = "objc2-core-foundation")]
66 #[unsafe(method(systemFrame))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn systemFrame(&self) -> CGRect;
69
70 #[cfg(feature = "UIOrientation")]
71 #[unsafe(method(interfaceOrientation))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn interfaceOrientation(&self) -> UIInterfaceOrientation;
74
75 #[cfg(feature = "objc2-core-foundation")]
76 #[unsafe(method(minimumSize))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn minimumSize(&self) -> CGSize;
80
81 #[cfg(feature = "objc2-core-foundation")]
82 #[unsafe(method(maximumSize))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn maximumSize(&self) -> CGSize;
86
87 #[unsafe(method(resizingRestrictions))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn resizingRestrictions(&self) -> UIWindowSceneResizingRestrictions;
91 );
92}