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::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_protocol!(
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiappearancecontainer?language=objc)
    pub unsafe trait UIAppearanceContainer: NSObjectProtocol + MainThreadOnly {}
);

extern_protocol!(
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiappearance?language=objc)
    pub unsafe trait UIAppearance: NSObjectProtocol + MainThreadOnly {
        #[unsafe(method(appearance))]
        #[unsafe(method_family = none)]
        fn appearance(mtm: MainThreadMarker) -> Retained<Self>;

        /// # Safety
        ///
        /// `container_types` generic must implement UIAppearanceContainer.
        #[unsafe(method(appearanceWhenContainedInInstancesOfClasses:))]
        #[unsafe(method_family = none)]
        unsafe fn appearanceWhenContainedInInstancesOfClasses(
            container_types: &NSArray<AnyClass>,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[cfg(feature = "UITraitCollection")]
        #[unsafe(method(appearanceForTraitCollection:))]
        #[unsafe(method_family = none)]
        fn appearanceForTraitCollection(
            r#trait: &UITraitCollection,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[cfg(feature = "UITraitCollection")]
        /// # Safety
        ///
        /// `container_types` generic must implement UIAppearanceContainer.
        #[unsafe(method(appearanceForTraitCollection:whenContainedInInstancesOfClasses:))]
        #[unsafe(method_family = none)]
        unsafe fn appearanceForTraitCollection_whenContainedInInstancesOfClasses(
            r#trait: &UITraitCollection,
            container_types: &NSArray<AnyClass>,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;
    }
);