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 fn systemFrame(&self) -> CGRect;
73
74 #[cfg(feature = "UIView")]
75 #[unsafe(method(coordinateSpace))]
77 #[unsafe(method_family = none)]
78 pub fn coordinateSpace(
79 &self,
80 mtm: MainThreadMarker,
81 ) -> Retained<ProtocolObject<dyn UICoordinateSpace>>;
82
83 #[cfg(feature = "UIOrientation")]
84 #[unsafe(method(interfaceOrientation))]
86 #[unsafe(method_family = none)]
87 pub fn interfaceOrientation(&self) -> UIInterfaceOrientation;
88
89 #[unsafe(method(isInterfaceOrientationLocked))]
91 #[unsafe(method_family = none)]
92 pub fn isInterfaceOrientationLocked(&self) -> bool;
93
94 #[cfg(feature = "objc2-core-foundation")]
95 #[unsafe(method(minimumSize))]
97 #[unsafe(method_family = none)]
98 pub fn minimumSize(&self) -> CGSize;
99
100 #[cfg(feature = "objc2-core-foundation")]
101 #[unsafe(method(maximumSize))]
103 #[unsafe(method_family = none)]
104 pub fn maximumSize(&self) -> CGSize;
105
106 #[unsafe(method(resizingRestrictions))]
108 #[unsafe(method_family = none)]
109 pub fn resizingRestrictions(&self) -> UIWindowSceneResizingRestrictions;
110
111 #[unsafe(method(isInteractivelyResizing))]
113 #[unsafe(method_family = none)]
114 pub fn isInteractivelyResizing(&self) -> bool;
115 );
116}