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
46extern_conformance!(
47 unsafe impl NSCopying for UIWindowSceneGeometry {}
48);
49
50unsafe impl CopyingHelper for UIWindowSceneGeometry {
51 type Result = Self;
52}
53
54extern_conformance!(
55 unsafe impl NSObjectProtocol for UIWindowSceneGeometry {}
56);
57
58impl UIWindowSceneGeometry {
59 extern_methods!(
60 #[unsafe(method(init))]
62 #[unsafe(method_family = init)]
63 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
64
65 #[unsafe(method(new))]
66 #[unsafe(method_family = new)]
67 pub unsafe fn new() -> Retained<Self>;
68
69 #[cfg(feature = "objc2-core-foundation")]
70 #[unsafe(method(systemFrame))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn systemFrame(&self) -> CGRect;
73
74 #[cfg(feature = "UIOrientation")]
75 #[unsafe(method(interfaceOrientation))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn interfaceOrientation(&self) -> UIInterfaceOrientation;
78
79 #[cfg(feature = "objc2-core-foundation")]
80 #[unsafe(method(minimumSize))]
82 #[unsafe(method_family = none)]
83 pub unsafe fn minimumSize(&self) -> CGSize;
84
85 #[cfg(feature = "objc2-core-foundation")]
86 #[unsafe(method(maximumSize))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn maximumSize(&self) -> CGSize;
90
91 #[unsafe(method(resizingRestrictions))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn resizingRestrictions(&self) -> UIWindowSceneResizingRestrictions;
95 );
96}