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 unsafe fn initWithTraitCollection(
49            this: Allocated<Self>,
50            trait_collection: &UITraitCollection,
51        ) -> Retained<Self>;
52
53        #[unsafe(method(initWithCoder:))]
54        #[unsafe(method_family = init)]
55        pub unsafe fn initWithCoder(
56            this: Allocated<Self>,
57            coder: &NSCoder,
58        ) -> Option<Retained<Self>>;
59
60        #[unsafe(method(init))]
61        #[unsafe(method_family = init)]
62        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
63
64        #[unsafe(method(new))]
65        #[unsafe(method_family = new)]
66        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
67
68        #[cfg(feature = "UITraitCollection")]
69        /// The trait collection.
70        #[unsafe(method(traitCollection))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn traitCollection(&self) -> Retained<UITraitCollection>;
73
74        #[cfg(feature = "UITraitCollection")]
75        /// Setter for [`traitCollection`][Self::traitCollection].
76        #[unsafe(method(setTraitCollection:))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn setTraitCollection(&self, trait_collection: &UITraitCollection);
79
80        /// The search text. Default is the search bar text of the view controller's search controller.
81        #[unsafe(method(searchText))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn searchText(&self) -> Option<Retained<NSString>>;
84
85        /// Setter for [`searchText`][Self::searchText].
86        #[unsafe(method(setSearchText:))]
87        #[unsafe(method_family = none)]
88        pub unsafe fn setSearchText(&self, search_text: Option<&NSString>);
89    );
90}