objc2_ui_kit/generated/
UIWindowSceneGeometryPreferencesVision.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8
9use crate::*;
10
11extern "C" {
12    /// Used as the value for a dimension of a size related preference when wanting to leave it unchanged.
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uiproposedscenesizenopreference?language=objc)
15    #[cfg(feature = "objc2-core-foundation")]
16    pub static UIProposedSceneSizeNoPreference: CGFloat;
17}
18
19extern_class!(
20    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiwindowscenegeometrypreferencesvision?language=objc)
21    #[unsafe(super(UIWindowSceneGeometryPreferences, NSObject))]
22    #[derive(Debug, PartialEq, Eq, Hash)]
23    #[cfg(feature = "UIWindowSceneGeometryPreferences")]
24    pub struct UIWindowSceneGeometryPreferencesVision;
25);
26
27#[cfg(feature = "UIWindowSceneGeometryPreferences")]
28unsafe impl NSObjectProtocol for UIWindowSceneGeometryPreferencesVision {}
29
30#[cfg(feature = "UIWindowSceneGeometryPreferences")]
31impl UIWindowSceneGeometryPreferencesVision {
32    extern_methods!(
33        /// Creates a geometry preference with no changes. Update the properties who's preference should change
34        #[unsafe(method(init))]
35        #[unsafe(method_family = init)]
36        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
37
38        #[cfg(feature = "objc2-core-foundation")]
39        /// Creates a geometry preference with a specific size (specifying UIProposedSceneSizeNoPreference for any dimension of size, will specify no preference, keeping that dimension the same if possible)
40        #[unsafe(method(initWithSize:))]
41        #[unsafe(method_family = init)]
42        pub unsafe fn initWithSize(this: Allocated<Self>, size: CGSize) -> Retained<Self>;
43
44        #[cfg(feature = "objc2-core-foundation")]
45        /// The preferred system size. Use UIProposedSceneSizeNoPreference to use existing value
46        #[unsafe(method(size))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn size(&self) -> CGSize;
49
50        #[cfg(feature = "objc2-core-foundation")]
51        /// Setter for [`size`][Self::size].
52        #[unsafe(method(setSize:))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn setSize(&self, size: CGSize);
55
56        #[cfg(feature = "objc2-core-foundation")]
57        /// The preferred minimum size of the scene. Use `UIProposedSceneSizeNoPreference` on a dimension of the size to indicate that axis should be returned to the system default.
58        /// By default, the value is left unchanged
59        #[unsafe(method(minimumSize))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn minimumSize(&self) -> CGSize;
62
63        #[cfg(feature = "objc2-core-foundation")]
64        /// Setter for [`minimumSize`][Self::minimumSize].
65        #[unsafe(method(setMinimumSize:))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn setMinimumSize(&self, minimum_size: CGSize);
68
69        #[cfg(feature = "objc2-core-foundation")]
70        /// The preferred maximum size of the scene. Use `UIProposedSceneSizeNoPreference` on a dimension of the size to indicate that axis should be returned to the system default.
71        /// By default, the value is left unchanged
72        #[unsafe(method(maximumSize))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn maximumSize(&self) -> CGSize;
75
76        #[cfg(feature = "objc2-core-foundation")]
77        /// Setter for [`maximumSize`][Self::maximumSize].
78        #[unsafe(method(setMaximumSize:))]
79        #[unsafe(method_family = none)]
80        pub unsafe fn setMaximumSize(&self, maximum_size: CGSize);
81
82        #[cfg(feature = "UIWindowSceneGeometry")]
83        /// The user resizable restrictions on the window scene
84        /// By default, the value is left unchanged
85        #[unsafe(method(resizingRestrictions))]
86        #[unsafe(method_family = none)]
87        pub unsafe fn resizingRestrictions(&self) -> UIWindowSceneResizingRestrictions;
88
89        #[cfg(feature = "UIWindowSceneGeometry")]
90        /// Setter for [`resizingRestrictions`][Self::resizingRestrictions].
91        #[unsafe(method(setResizingRestrictions:))]
92        #[unsafe(method_family = none)]
93        pub unsafe fn setResizingRestrictions(
94            &self,
95            resizing_restrictions: UIWindowSceneResizingRestrictions,
96        );
97    );
98}
99
100/// Methods declared on superclass `UIWindowSceneGeometryPreferences`.
101#[cfg(feature = "UIWindowSceneGeometryPreferences")]
102impl UIWindowSceneGeometryPreferencesVision {
103    extern_methods!(
104        #[unsafe(method(new))]
105        #[unsafe(method_family = new)]
106        pub unsafe fn new() -> Retained<Self>;
107    );
108}