objc2_ui_kit/generated/
UIWindowSceneGeometryPreferencesIOS.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
7use crate::*;
8
9extern_class!(
10    /// Use this class to express iOS-specific geometry preferences when calling `-[UIWindowScene requestGeometryUpdateWithPreferences:errorHandler:]`
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uiwindowscenegeometrypreferencesios?language=objc)
13    #[unsafe(super(UIWindowSceneGeometryPreferences, NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[cfg(feature = "UIWindowSceneGeometryPreferences")]
16    pub struct UIWindowSceneGeometryPreferencesIOS;
17);
18
19#[cfg(feature = "UIWindowSceneGeometryPreferences")]
20unsafe impl NSObjectProtocol for UIWindowSceneGeometryPreferencesIOS {}
21
22#[cfg(feature = "UIWindowSceneGeometryPreferences")]
23impl UIWindowSceneGeometryPreferencesIOS {
24    extern_methods!(
25        #[unsafe(method(init))]
26        #[unsafe(method_family = init)]
27        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
28
29        #[cfg(feature = "UIOrientation")]
30        #[unsafe(method(initWithInterfaceOrientations:))]
31        #[unsafe(method_family = init)]
32        pub unsafe fn initWithInterfaceOrientations(
33            this: Allocated<Self>,
34            interface_orientations: UIInterfaceOrientationMask,
35        ) -> Retained<Self>;
36
37        #[cfg(feature = "UIOrientation")]
38        /// The preferred interface orientations. The system will choose the best orientation from the intersection of these
39        /// orientations and the current supported orientations. Defaults to an empty mask to indicate no preference.
40        #[unsafe(method(interfaceOrientations))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn interfaceOrientations(&self) -> UIInterfaceOrientationMask;
43
44        #[cfg(feature = "UIOrientation")]
45        /// Setter for [`interfaceOrientations`][Self::interfaceOrientations].
46        #[unsafe(method(setInterfaceOrientations:))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn setInterfaceOrientations(
49            &self,
50            interface_orientations: UIInterfaceOrientationMask,
51        );
52    );
53}
54
55/// Methods declared on superclass `UIWindowSceneGeometryPreferences`.
56#[cfg(feature = "UIWindowSceneGeometryPreferences")]
57impl UIWindowSceneGeometryPreferencesIOS {
58    extern_methods!(
59        #[unsafe(method(new))]
60        #[unsafe(method_family = new)]
61        pub unsafe fn new() -> Retained<Self>;
62    );
63}