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")]
20extern_conformance!(
21    unsafe impl NSObjectProtocol for UIWindowSceneGeometryPreferencesIOS {}
22);
23
24#[cfg(feature = "UIWindowSceneGeometryPreferences")]
25impl UIWindowSceneGeometryPreferencesIOS {
26    extern_methods!(
27        #[unsafe(method(init))]
28        #[unsafe(method_family = init)]
29        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
30
31        #[cfg(feature = "UIOrientation")]
32        #[unsafe(method(initWithInterfaceOrientations:))]
33        #[unsafe(method_family = init)]
34        pub unsafe fn initWithInterfaceOrientations(
35            this: Allocated<Self>,
36            interface_orientations: UIInterfaceOrientationMask,
37        ) -> Retained<Self>;
38
39        #[cfg(feature = "UIOrientation")]
40        /// The preferred interface orientations. The system will choose the best orientation from the intersection of these
41        /// orientations and the current supported orientations. Defaults to an empty mask to indicate no preference.
42        #[unsafe(method(interfaceOrientations))]
43        #[unsafe(method_family = none)]
44        pub unsafe fn interfaceOrientations(&self) -> UIInterfaceOrientationMask;
45
46        #[cfg(feature = "UIOrientation")]
47        /// Setter for [`interfaceOrientations`][Self::interfaceOrientations].
48        #[unsafe(method(setInterfaceOrientations:))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn setInterfaceOrientations(
51            &self,
52            interface_orientations: UIInterfaceOrientationMask,
53        );
54    );
55}
56
57/// Methods declared on superclass `UIWindowSceneGeometryPreferences`.
58#[cfg(feature = "UIWindowSceneGeometryPreferences")]
59impl UIWindowSceneGeometryPreferencesIOS {
60    extern_methods!(
61        #[unsafe(method(new))]
62        #[unsafe(method_family = new)]
63        pub unsafe fn new() -> Retained<Self>;
64    );
65}