objc2_ui_kit/generated/
UIContentUnavailableConfigurationState.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::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uicontentunavailableconfigurationstate?language=objc)
12    #[unsafe(super(NSObject))]
13    #[thread_kind = MainThreadOnly]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct UIContentUnavailableConfigurationState;
16);
17
18extern_conformance!(
19    unsafe impl NSCoding for UIContentUnavailableConfigurationState {}
20);
21
22extern_conformance!(
23    unsafe impl NSCopying for UIContentUnavailableConfigurationState {}
24);
25
26unsafe impl CopyingHelper for UIContentUnavailableConfigurationState {
27    type Result = Self;
28}
29
30extern_conformance!(
31    unsafe impl NSObjectProtocol for UIContentUnavailableConfigurationState {}
32);
33
34extern_conformance!(
35    unsafe impl NSSecureCoding for UIContentUnavailableConfigurationState {}
36);
37
38#[cfg(feature = "UIConfigurationState")]
39extern_conformance!(
40    unsafe impl UIConfigurationState for UIContentUnavailableConfigurationState {}
41);
42
43impl UIContentUnavailableConfigurationState {
44    extern_methods!(
45        #[cfg(feature = "UITraitCollection")]
46        #[unsafe(method(initWithTraitCollection:))]
47        #[unsafe(method_family = init)]
48        pub fn initWithTraitCollection(
49            this: Allocated<Self>,
50            trait_collection: &UITraitCollection,
51        ) -> Retained<Self>;
52
53        /// # Safety
54        ///
55        /// `coder` possibly has further requirements.
56        #[unsafe(method(initWithCoder:))]
57        #[unsafe(method_family = init)]
58        pub unsafe fn initWithCoder(
59            this: Allocated<Self>,
60            coder: &NSCoder,
61        ) -> Option<Retained<Self>>;
62
63        #[unsafe(method(init))]
64        #[unsafe(method_family = init)]
65        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
66
67        #[unsafe(method(new))]
68        #[unsafe(method_family = new)]
69        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
70
71        #[cfg(feature = "UITraitCollection")]
72        /// The trait collection.
73        #[unsafe(method(traitCollection))]
74        #[unsafe(method_family = none)]
75        pub fn traitCollection(&self) -> Retained<UITraitCollection>;
76
77        #[cfg(feature = "UITraitCollection")]
78        /// Setter for [`traitCollection`][Self::traitCollection].
79        #[unsafe(method(setTraitCollection:))]
80        #[unsafe(method_family = none)]
81        pub fn setTraitCollection(&self, trait_collection: &UITraitCollection);
82
83        /// The search text. Default is the search bar text of the view controller's search controller.
84        #[unsafe(method(searchText))]
85        #[unsafe(method_family = none)]
86        pub fn searchText(&self) -> Option<Retained<NSString>>;
87
88        /// Setter for [`searchText`][Self::searchText].
89        #[unsafe(method(setSearchText:))]
90        #[unsafe(method_family = none)]
91        pub fn setSearchText(&self, search_text: Option<&NSString>);
92    );
93}