objc2-ui-kit 0.3.2

Bindings to the UIKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uicontentunavailableconfigurationstate?language=objc)
    #[unsafe(super(NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UIContentUnavailableConfigurationState;
);

extern_conformance!(
    unsafe impl NSCoding for UIContentUnavailableConfigurationState {}
);

extern_conformance!(
    unsafe impl NSCopying for UIContentUnavailableConfigurationState {}
);

unsafe impl CopyingHelper for UIContentUnavailableConfigurationState {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for UIContentUnavailableConfigurationState {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for UIContentUnavailableConfigurationState {}
);

#[cfg(feature = "UIConfigurationState")]
extern_conformance!(
    unsafe impl UIConfigurationState for UIContentUnavailableConfigurationState {}
);

impl UIContentUnavailableConfigurationState {
    extern_methods!(
        #[cfg(feature = "UITraitCollection")]
        #[unsafe(method(initWithTraitCollection:))]
        #[unsafe(method_family = init)]
        pub fn initWithTraitCollection(
            this: Allocated<Self>,
            trait_collection: &UITraitCollection,
        ) -> Retained<Self>;

        /// # Safety
        ///
        /// `coder` possibly has further requirements.
        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;

        #[cfg(feature = "UITraitCollection")]
        /// The trait collection.
        #[unsafe(method(traitCollection))]
        #[unsafe(method_family = none)]
        pub fn traitCollection(&self) -> Retained<UITraitCollection>;

        #[cfg(feature = "UITraitCollection")]
        /// Setter for [`traitCollection`][Self::traitCollection].
        #[unsafe(method(setTraitCollection:))]
        #[unsafe(method_family = none)]
        pub fn setTraitCollection(&self, trait_collection: &UITraitCollection);

        /// The search text. Default is the search bar text of the view controller's search controller.
        #[unsafe(method(searchText))]
        #[unsafe(method_family = none)]
        pub fn searchText(&self) -> Option<Retained<NSString>>;

        /// Setter for [`searchText`][Self::searchText].
        #[unsafe(method(setSearchText:))]
        #[unsafe(method_family = none)]
        pub fn setSearchText(&self, search_text: Option<&NSString>);
    );
}