objc2_ui_kit/generated/
UIContentUnavailableView.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::*;
8use objc2_foundation::*;
9#[cfg(feature = "objc2-quartz-core")]
10#[cfg(not(target_os = "watchos"))]
11use objc2_quartz_core::*;
12
13use crate::*;
14
15extern_class!(
16    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uicontentunavailableview?language=objc)
17    #[unsafe(super(UIView, UIResponder, NSObject))]
18    #[thread_kind = MainThreadOnly]
19    #[derive(Debug, PartialEq, Eq, Hash)]
20    #[cfg(all(feature = "UIResponder", feature = "UIView"))]
21    pub struct UIContentUnavailableView;
22);
23
24#[cfg(all(
25    feature = "UIResponder",
26    feature = "UIView",
27    feature = "objc2-quartz-core"
28))]
29#[cfg(not(target_os = "watchos"))]
30unsafe impl CALayerDelegate for UIContentUnavailableView {}
31
32#[cfg(all(feature = "UIResponder", feature = "UIView"))]
33unsafe impl NSCoding for UIContentUnavailableView {}
34
35#[cfg(all(feature = "UIResponder", feature = "UIView"))]
36unsafe impl NSObjectProtocol for UIContentUnavailableView {}
37
38#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
39unsafe impl UIAppearance for UIContentUnavailableView {}
40
41#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
42unsafe impl UIAppearanceContainer for UIContentUnavailableView {}
43
44#[cfg(all(
45    feature = "UIContentConfiguration",
46    feature = "UIResponder",
47    feature = "UIView"
48))]
49unsafe impl UIContentView for UIContentUnavailableView {}
50
51#[cfg(all(feature = "UIResponder", feature = "UIView"))]
52unsafe impl UICoordinateSpace for UIContentUnavailableView {}
53
54#[cfg(all(
55    feature = "UIDynamicBehavior",
56    feature = "UIResponder",
57    feature = "UIView"
58))]
59unsafe impl UIDynamicItem for UIContentUnavailableView {}
60
61#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
62unsafe impl UIFocusEnvironment for UIContentUnavailableView {}
63
64#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
65unsafe impl UIFocusItem for UIContentUnavailableView {}
66
67#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
68unsafe impl UIFocusItemContainer for UIContentUnavailableView {}
69
70#[cfg(all(feature = "UIResponder", feature = "UIView"))]
71unsafe impl UIResponderStandardEditActions for UIContentUnavailableView {}
72
73#[cfg(all(
74    feature = "UIResponder",
75    feature = "UITraitCollection",
76    feature = "UIView"
77))]
78unsafe impl UITraitEnvironment for UIContentUnavailableView {}
79
80#[cfg(all(feature = "UIResponder", feature = "UIView"))]
81impl UIContentUnavailableView {
82    extern_methods!(
83        #[cfg(feature = "UIContentUnavailableConfiguration")]
84        #[unsafe(method(initWithConfiguration:))]
85        #[unsafe(method_family = init)]
86        pub unsafe fn initWithConfiguration(
87            this: Allocated<Self>,
88            configuration: &UIContentUnavailableConfiguration,
89        ) -> Retained<Self>;
90
91        #[unsafe(method(initWithCoder:))]
92        #[unsafe(method_family = init)]
93        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
94
95        #[cfg(feature = "objc2-core-foundation")]
96        #[unsafe(method(initWithFrame:))]
97        #[unsafe(method_family = init)]
98        pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
99
100        #[unsafe(method(init))]
101        #[unsafe(method_family = init)]
102        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
103
104        #[unsafe(method(new))]
105        #[unsafe(method_family = new)]
106        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
107
108        #[cfg(feature = "UIContentUnavailableConfiguration")]
109        /// The content unavailable configuration.
110        #[unsafe(method(configuration))]
111        #[unsafe(method_family = none)]
112        pub unsafe fn configuration(&self) -> Retained<UIContentUnavailableConfiguration>;
113
114        #[cfg(feature = "UIContentUnavailableConfiguration")]
115        /// Setter for [`configuration`][Self::configuration].
116        #[unsafe(method(setConfiguration:))]
117        #[unsafe(method_family = none)]
118        pub unsafe fn setConfiguration(&self, configuration: &UIContentUnavailableConfiguration);
119
120        /// Whether the content can scroll. Default is NO.
121        #[unsafe(method(isScrollEnabled))]
122        #[unsafe(method_family = none)]
123        pub unsafe fn isScrollEnabled(&self) -> bool;
124
125        /// Setter for [`isScrollEnabled`][Self::isScrollEnabled].
126        #[unsafe(method(setScrollEnabled:))]
127        #[unsafe(method_family = none)]
128        pub unsafe fn setScrollEnabled(&self, scroll_enabled: bool);
129    );
130}