objc2_ui_kit/generated/
UIWindowSceneGeometryPreferencesMac.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_class!(
12    /// Use this class to express macOS-specific geometry preferences when calling `-[UIWindowScene requestGeometryUpdateWithPreferences:errorHandler:]`
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uiwindowscenegeometrypreferencesmac?language=objc)
15    #[unsafe(super(UIWindowSceneGeometryPreferences, NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    #[cfg(feature = "UIWindowSceneGeometryPreferences")]
18    pub struct UIWindowSceneGeometryPreferencesMac;
19);
20
21#[cfg(feature = "UIWindowSceneGeometryPreferences")]
22extern_conformance!(
23    unsafe impl NSObjectProtocol for UIWindowSceneGeometryPreferencesMac {}
24);
25
26#[cfg(feature = "UIWindowSceneGeometryPreferences")]
27impl UIWindowSceneGeometryPreferencesMac {
28    extern_methods!(
29        #[unsafe(method(init))]
30        #[unsafe(method_family = init)]
31        pub fn init(this: Allocated<Self>) -> Retained<Self>;
32
33        #[cfg(feature = "objc2-core-foundation")]
34        #[unsafe(method(initWithSystemFrame:))]
35        #[unsafe(method_family = init)]
36        pub fn initWithSystemFrame(this: Allocated<Self>, system_frame: CGRect) -> Retained<Self>;
37
38        #[cfg(feature = "objc2-core-foundation")]
39        /// The preferred system frame in the system scale where an origin of (0, 0) corresponds to the top-left
40        /// corner of the main display. Defaults to CGRectNull to indicate no preference.
41        #[unsafe(method(systemFrame))]
42        #[unsafe(method_family = none)]
43        pub fn systemFrame(&self) -> CGRect;
44
45        #[cfg(feature = "objc2-core-foundation")]
46        /// Setter for [`systemFrame`][Self::systemFrame].
47        #[unsafe(method(setSystemFrame:))]
48        #[unsafe(method_family = none)]
49        pub fn setSystemFrame(&self, system_frame: CGRect);
50    );
51}
52
53/// Methods declared on superclass `UIWindowSceneGeometryPreferences`.
54#[cfg(feature = "UIWindowSceneGeometryPreferences")]
55impl UIWindowSceneGeometryPreferencesMac {
56    extern_methods!(
57        #[unsafe(method(new))]
58        #[unsafe(method_family = new)]
59        pub unsafe fn new() -> Retained<Self>;
60    );
61}