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"))]
30extern_conformance!(
31    unsafe impl CALayerDelegate for UIContentUnavailableView {}
32);
33
34#[cfg(all(feature = "UIResponder", feature = "UIView"))]
35extern_conformance!(
36    unsafe impl NSCoding for UIContentUnavailableView {}
37);
38
39#[cfg(all(feature = "UIResponder", feature = "UIView"))]
40extern_conformance!(
41    unsafe impl NSObjectProtocol for UIContentUnavailableView {}
42);
43
44#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
45extern_conformance!(
46    unsafe impl UIAppearance for UIContentUnavailableView {}
47);
48
49#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
50extern_conformance!(
51    unsafe impl UIAppearanceContainer for UIContentUnavailableView {}
52);
53
54#[cfg(all(
55    feature = "UIContentConfiguration",
56    feature = "UIResponder",
57    feature = "UIView"
58))]
59extern_conformance!(
60    unsafe impl UIContentView for UIContentUnavailableView {}
61);
62
63#[cfg(all(feature = "UIResponder", feature = "UIView"))]
64extern_conformance!(
65    unsafe impl UICoordinateSpace for UIContentUnavailableView {}
66);
67
68#[cfg(all(
69    feature = "UIDynamicBehavior",
70    feature = "UIResponder",
71    feature = "UIView"
72))]
73extern_conformance!(
74    unsafe impl UIDynamicItem for UIContentUnavailableView {}
75);
76
77#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
78extern_conformance!(
79    unsafe impl UIFocusEnvironment for UIContentUnavailableView {}
80);
81
82#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
83extern_conformance!(
84    unsafe impl UIFocusItem for UIContentUnavailableView {}
85);
86
87#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
88extern_conformance!(
89    unsafe impl UIFocusItemContainer for UIContentUnavailableView {}
90);
91
92#[cfg(all(feature = "UIResponder", feature = "UIView"))]
93extern_conformance!(
94    unsafe impl UIResponderStandardEditActions for UIContentUnavailableView {}
95);
96
97#[cfg(all(
98    feature = "UIResponder",
99    feature = "UITraitCollection",
100    feature = "UIView"
101))]
102extern_conformance!(
103    unsafe impl UITraitEnvironment for UIContentUnavailableView {}
104);
105
106#[cfg(all(feature = "UIResponder", feature = "UIView"))]
107impl UIContentUnavailableView {
108    extern_methods!(
109        #[cfg(feature = "UIContentUnavailableConfiguration")]
110        #[unsafe(method(initWithConfiguration:))]
111        #[unsafe(method_family = init)]
112        pub fn initWithConfiguration(
113            this: Allocated<Self>,
114            configuration: &UIContentUnavailableConfiguration,
115        ) -> Retained<Self>;
116
117        /// # Safety
118        ///
119        /// `coder` possibly has further requirements.
120        #[unsafe(method(initWithCoder:))]
121        #[unsafe(method_family = init)]
122        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
123
124        #[cfg(feature = "objc2-core-foundation")]
125        #[unsafe(method(initWithFrame:))]
126        #[unsafe(method_family = init)]
127        pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
128
129        #[unsafe(method(init))]
130        #[unsafe(method_family = init)]
131        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
132
133        #[unsafe(method(new))]
134        #[unsafe(method_family = new)]
135        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
136
137        #[cfg(feature = "UIContentUnavailableConfiguration")]
138        /// The content unavailable configuration.
139        #[unsafe(method(configuration))]
140        #[unsafe(method_family = none)]
141        pub fn configuration(&self) -> Retained<UIContentUnavailableConfiguration>;
142
143        #[cfg(feature = "UIContentUnavailableConfiguration")]
144        /// Setter for [`configuration`][Self::configuration].
145        ///
146        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
147        #[unsafe(method(setConfiguration:))]
148        #[unsafe(method_family = none)]
149        pub fn setConfiguration(&self, configuration: &UIContentUnavailableConfiguration);
150
151        /// Whether the content can scroll. Default is NO.
152        #[unsafe(method(isScrollEnabled))]
153        #[unsafe(method_family = none)]
154        pub fn isScrollEnabled(&self) -> bool;
155
156        /// Setter for [`isScrollEnabled`][Self::isScrollEnabled].
157        #[unsafe(method(setScrollEnabled:))]
158        #[unsafe(method_family = none)]
159        pub fn setScrollEnabled(&self, scroll_enabled: bool);
160    );
161}