objc2-ui-kit 0.2.2

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

use crate::*;

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIContentUnavailableAlignment(pub NSInteger);
impl UIContentUnavailableAlignment {
    #[doc(alias = "UIContentUnavailableAlignmentCenter")]
    pub const Center: Self = Self(0);
    #[doc(alias = "UIContentUnavailableAlignmentNatural")]
    pub const Natural: Self = Self(1);
}

unsafe impl Encode for UIContentUnavailableAlignment {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for UIContentUnavailableAlignment {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UIContentUnavailableConfiguration;

    unsafe impl ClassType for UIContentUnavailableConfiguration {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSCoding for UIContentUnavailableConfiguration {}

unsafe impl NSCopying for UIContentUnavailableConfiguration {}

unsafe impl NSObjectProtocol for UIContentUnavailableConfiguration {}

unsafe impl NSSecureCoding for UIContentUnavailableConfiguration {}

#[cfg(feature = "UIContentConfiguration")]
unsafe impl UIContentConfiguration for UIContentUnavailableConfiguration {}

extern_methods!(
    unsafe impl UIContentUnavailableConfiguration {
        #[method_id(@__retain_semantics Other emptyConfiguration)]
        pub unsafe fn emptyConfiguration(mtm: MainThreadMarker) -> Retained<Self>;

        #[method_id(@__retain_semantics Other loadingConfiguration)]
        pub unsafe fn loadingConfiguration(mtm: MainThreadMarker) -> Retained<Self>;

        #[method_id(@__retain_semantics Other searchConfiguration)]
        pub unsafe fn searchConfiguration(mtm: MainThreadMarker) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[cfg(feature = "UIImage")]
        #[method_id(@__retain_semantics Other image)]
        pub unsafe fn image(&self) -> Option<Retained<UIImage>>;

        #[cfg(feature = "UIImage")]
        #[method(setImage:)]
        pub unsafe fn setImage(&self, image: Option<&UIImage>);

        #[cfg(feature = "UIContentUnavailableImageProperties")]
        #[method_id(@__retain_semantics Other imageProperties)]
        pub unsafe fn imageProperties(&self) -> Retained<UIContentUnavailableImageProperties>;

        #[method_id(@__retain_semantics Other text)]
        pub unsafe fn text(&self) -> Option<Retained<NSString>>;

        #[method(setText:)]
        pub unsafe fn setText(&self, text: Option<&NSString>);

        #[method_id(@__retain_semantics Other attributedText)]
        pub unsafe fn attributedText(&self) -> Option<Retained<NSAttributedString>>;

        #[method(setAttributedText:)]
        pub unsafe fn setAttributedText(&self, attributed_text: Option<&NSAttributedString>);

        #[cfg(feature = "UIContentUnavailableTextProperties")]
        #[method_id(@__retain_semantics Other textProperties)]
        pub unsafe fn textProperties(&self) -> Retained<UIContentUnavailableTextProperties>;

        #[method_id(@__retain_semantics Other secondaryText)]
        pub unsafe fn secondaryText(&self) -> Option<Retained<NSString>>;

        #[method(setSecondaryText:)]
        pub unsafe fn setSecondaryText(&self, secondary_text: Option<&NSString>);

        #[method_id(@__retain_semantics Other secondaryAttributedText)]
        pub unsafe fn secondaryAttributedText(&self) -> Option<Retained<NSAttributedString>>;

        #[method(setSecondaryAttributedText:)]
        pub unsafe fn setSecondaryAttributedText(
            &self,
            secondary_attributed_text: Option<&NSAttributedString>,
        );

        #[cfg(feature = "UIContentUnavailableTextProperties")]
        #[method_id(@__retain_semantics Other secondaryTextProperties)]
        pub unsafe fn secondaryTextProperties(
            &self,
        ) -> Retained<UIContentUnavailableTextProperties>;

        #[cfg(feature = "UIButtonConfiguration")]
        #[method_id(@__retain_semantics Other button)]
        pub unsafe fn button(&self) -> Retained<UIButtonConfiguration>;

        #[cfg(feature = "UIButtonConfiguration")]
        #[method(setButton:)]
        pub unsafe fn setButton(&self, button: &UIButtonConfiguration);

        #[cfg(feature = "UIContentUnavailableButtonProperties")]
        #[method_id(@__retain_semantics Other buttonProperties)]
        pub unsafe fn buttonProperties(&self) -> Retained<UIContentUnavailableButtonProperties>;

        #[cfg(feature = "UIButtonConfiguration")]
        #[method_id(@__retain_semantics Other secondaryButton)]
        pub unsafe fn secondaryButton(&self) -> Retained<UIButtonConfiguration>;

        #[cfg(feature = "UIButtonConfiguration")]
        #[method(setSecondaryButton:)]
        pub unsafe fn setSecondaryButton(&self, secondary_button: &UIButtonConfiguration);

        #[cfg(feature = "UIContentUnavailableButtonProperties")]
        #[method_id(@__retain_semantics Other secondaryButtonProperties)]
        pub unsafe fn secondaryButtonProperties(
            &self,
        ) -> Retained<UIContentUnavailableButtonProperties>;

        #[method(alignment)]
        pub unsafe fn alignment(&self) -> UIContentUnavailableAlignment;

        #[method(setAlignment:)]
        pub unsafe fn setAlignment(&self, alignment: UIContentUnavailableAlignment);

        #[cfg(feature = "UIGeometry")]
        #[method(axesPreservingSuperviewLayoutMargins)]
        pub unsafe fn axesPreservingSuperviewLayoutMargins(&self) -> UIAxis;

        #[cfg(feature = "UIGeometry")]
        #[method(setAxesPreservingSuperviewLayoutMargins:)]
        pub unsafe fn setAxesPreservingSuperviewLayoutMargins(
            &self,
            axes_preserving_superview_layout_margins: UIAxis,
        );

        #[cfg(feature = "UIGeometry")]
        #[method(directionalLayoutMargins)]
        pub unsafe fn directionalLayoutMargins(&self) -> NSDirectionalEdgeInsets;

        #[cfg(feature = "UIGeometry")]
        #[method(setDirectionalLayoutMargins:)]
        pub unsafe fn setDirectionalLayoutMargins(
            &self,
            directional_layout_margins: NSDirectionalEdgeInsets,
        );

        #[method(imageToTextPadding)]
        pub unsafe fn imageToTextPadding(&self) -> CGFloat;

        #[method(setImageToTextPadding:)]
        pub unsafe fn setImageToTextPadding(&self, image_to_text_padding: CGFloat);

        #[method(textToSecondaryTextPadding)]
        pub unsafe fn textToSecondaryTextPadding(&self) -> CGFloat;

        #[method(setTextToSecondaryTextPadding:)]
        pub unsafe fn setTextToSecondaryTextPadding(&self, text_to_secondary_text_padding: CGFloat);

        #[method(textToButtonPadding)]
        pub unsafe fn textToButtonPadding(&self) -> CGFloat;

        #[method(setTextToButtonPadding:)]
        pub unsafe fn setTextToButtonPadding(&self, text_to_button_padding: CGFloat);

        #[method(buttonToSecondaryButtonPadding)]
        pub unsafe fn buttonToSecondaryButtonPadding(&self) -> CGFloat;

        #[method(setButtonToSecondaryButtonPadding:)]
        pub unsafe fn setButtonToSecondaryButtonPadding(
            &self,
            button_to_secondary_button_padding: CGFloat,
        );

        #[cfg(feature = "UIBackgroundConfiguration")]
        #[method_id(@__retain_semantics Other background)]
        pub unsafe fn background(&self) -> Retained<UIBackgroundConfiguration>;

        #[cfg(feature = "UIBackgroundConfiguration")]
        #[method(setBackground:)]
        pub unsafe fn setBackground(&self, background: &UIBackgroundConfiguration);
    }
);