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")]
28extern_conformance!(
29    unsafe impl NSObjectProtocol for UIWindowSceneGeometryPreferencesVision {}
30);
31
32#[cfg(feature = "UIWindowSceneGeometryPreferences")]
33impl UIWindowSceneGeometryPreferencesVision {
34    extern_methods!(
35        /// Creates a geometry preference with no changes. Update the properties who's preference should change
36        #[unsafe(method(init))]
37        #[unsafe(method_family = init)]
38        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
39
40        #[cfg(feature = "objc2-core-foundation")]
41        /// 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)
42        #[unsafe(method(initWithSize:))]
43        #[unsafe(method_family = init)]
44        pub unsafe fn initWithSize(this: Allocated<Self>, size: CGSize) -> Retained<Self>;
45
46        #[cfg(feature = "objc2-core-foundation")]
47        /// The preferred system size. Use UIProposedSceneSizeNoPreference to use existing value
48        #[unsafe(method(size))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn size(&self) -> CGSize;
51
52        #[cfg(feature = "objc2-core-foundation")]
53        /// Setter for [`size`][Self::size].
54        #[unsafe(method(setSize:))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn setSize(&self, size: CGSize);
57
58        #[cfg(feature = "objc2-core-foundation")]
59        /// 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.
60        /// By default, the value is left unchanged
61        #[unsafe(method(minimumSize))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn minimumSize(&self) -> CGSize;
64
65        #[cfg(feature = "objc2-core-foundation")]
66        /// Setter for [`minimumSize`][Self::minimumSize].
67        #[unsafe(method(setMinimumSize:))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn setMinimumSize(&self, minimum_size: CGSize);
70
71        #[cfg(feature = "objc2-core-foundation")]
72        /// 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.
73        /// By default, the value is left unchanged
74        #[unsafe(method(maximumSize))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn maximumSize(&self) -> CGSize;
77
78        #[cfg(feature = "objc2-core-foundation")]
79        /// Setter for [`maximumSize`][Self::maximumSize].
80        #[unsafe(method(setMaximumSize:))]
81        #[unsafe(method_family = none)]
82        pub unsafe fn setMaximumSize(&self, maximum_size: CGSize);
83
84        #[cfg(feature = "UIWindowSceneGeometry")]
85        /// The user resizable restrictions on the window scene
86        /// By default, the value is left unchanged
87        #[unsafe(method(resizingRestrictions))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn resizingRestrictions(&self) -> UIWindowSceneResizingRestrictions;
90
91        #[cfg(feature = "UIWindowSceneGeometry")]
92        /// Setter for [`resizingRestrictions`][Self::resizingRestrictions].
93        #[unsafe(method(setResizingRestrictions:))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn setResizingRestrictions(
96            &self,
97            resizing_restrictions: UIWindowSceneResizingRestrictions,
98        );
99    );
100}
101
102/// Methods declared on superclass `UIWindowSceneGeometryPreferences`.
103#[cfg(feature = "UIWindowSceneGeometryPreferences")]
104impl UIWindowSceneGeometryPreferencesVision {
105    extern_methods!(
106        #[unsafe(method(new))]
107        #[unsafe(method_family = new)]
108        pub unsafe fn new() -> Retained<Self>;
109    );
110}