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::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;

use crate::*;

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

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

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

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

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

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

impl UIContentUnavailableImageProperties {
    extern_methods!(
        #[cfg(all(
            feature = "UIImageConfiguration",
            feature = "UIImageSymbolConfiguration"
        ))]
        /// The symbol configuration to use.
        #[unsafe(method(preferredSymbolConfiguration))]
        #[unsafe(method_family = none)]
        pub fn preferredSymbolConfiguration(&self) -> Option<Retained<UIImageSymbolConfiguration>>;

        #[cfg(all(
            feature = "UIImageConfiguration",
            feature = "UIImageSymbolConfiguration"
        ))]
        /// Setter for [`preferredSymbolConfiguration`][Self::preferredSymbolConfiguration].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setPreferredSymbolConfiguration:))]
        #[unsafe(method_family = none)]
        pub fn setPreferredSymbolConfiguration(
            &self,
            preferred_symbol_configuration: Option<&UIImageSymbolConfiguration>,
        );

        #[cfg(feature = "UIColor")]
        /// The tint color to apply to the image view. Nil will use the image view's normal inherited tint color.
        #[unsafe(method(tintColor))]
        #[unsafe(method_family = none)]
        pub fn tintColor(&self) -> Option<Retained<UIColor>>;

        #[cfg(feature = "UIColor")]
        /// Setter for [`tintColor`][Self::tintColor].
        #[unsafe(method(setTintColor:))]
        #[unsafe(method_family = none)]
        pub fn setTintColor(&self, tint_color: Option<&UIColor>);

        #[cfg(feature = "objc2-core-foundation")]
        /// The preferred corner radius (using a continuous corner curve) for the image.
        /// Default is 0. If the image is too small to fit the requested radius, the corner curve
        /// and radius will be adjusted to fit.
        #[unsafe(method(cornerRadius))]
        #[unsafe(method_family = none)]
        pub fn cornerRadius(&self) -> CGFloat;

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`cornerRadius`][Self::cornerRadius].
        #[unsafe(method(setCornerRadius:))]
        #[unsafe(method_family = none)]
        pub fn setCornerRadius(&self, corner_radius: CGFloat);

        #[cfg(feature = "objc2-core-foundation")]
        /// Enforces a maximum size for the image. The default value is CGSizeZero. A zero width or
        /// height means the size is unconstrained on that dimension. If the image exceeds this size
        /// on either dimension, its size will be reduced proportionately (maintaining aspect ratio).
        #[unsafe(method(maximumSize))]
        #[unsafe(method_family = none)]
        pub fn maximumSize(&self) -> CGSize;

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`maximumSize`][Self::maximumSize].
        #[unsafe(method(setMaximumSize:))]
        #[unsafe(method_family = none)]
        pub fn setMaximumSize(&self, maximum_size: CGSize);

        /// Prevents the image from inverting its colors when the accessibility setting is enabled.
        #[unsafe(method(accessibilityIgnoresInvertColors))]
        #[unsafe(method_family = none)]
        pub fn accessibilityIgnoresInvertColors(&self) -> bool;

        /// Setter for [`accessibilityIgnoresInvertColors`][Self::accessibilityIgnoresInvertColors].
        #[unsafe(method(setAccessibilityIgnoresInvertColors:))]
        #[unsafe(method_family = none)]
        pub fn setAccessibilityIgnoresInvertColors(
            &self,
            accessibility_ignores_invert_colors: bool,
        );
    );
}

/// Methods declared on superclass `NSObject`.
impl UIContentUnavailableImageProperties {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;

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