objc2-clock-kit 0.3.2

Bindings to the ClockKit 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::*;
#[cfg(feature = "objc2-ui-kit")]
use objc2_ui_kit::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/clockkit/clkfullcolorimageprovider?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
    pub struct CLKFullColorImageProvider;
);

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

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

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

impl CLKFullColorImageProvider {
    extern_methods!(
        #[deprecated = "Use initializers that take parameters."]
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[deprecated = "Use factory methods that take parameters."]
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;

        #[cfg(feature = "objc2-ui-kit")]
        #[unsafe(method(initWithFullColorImage:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithFullColorImage(
            this: Allocated<Self>,
            image: &UIImage,
        ) -> Retained<Self>;

        #[cfg(all(feature = "CLKImageProvider", feature = "objc2-ui-kit"))]
        #[unsafe(method(initWithFullColorImage:tintedImageProvider:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithFullColorImage_tintedImageProvider(
            this: Allocated<Self>,
            image: &UIImage,
            tinted_image_provider: Option<&CLKImageProvider>,
        ) -> Retained<Self>;

        #[cfg(feature = "objc2-ui-kit")]
        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
        #[unsafe(method(providerWithFullColorImage:))]
        #[unsafe(method_family = none)]
        pub unsafe fn providerWithFullColorImage(image: &UIImage) -> Retained<Self>;

        #[cfg(all(feature = "CLKImageProvider", feature = "objc2-ui-kit"))]
        #[unsafe(method(providerWithFullColorImage:tintedImageProvider:))]
        #[unsafe(method_family = none)]
        pub unsafe fn providerWithFullColorImage_tintedImageProvider(
            image: &UIImage,
            tinted_image_provider: Option<&CLKImageProvider>,
        ) -> Retained<Self>;

        #[cfg(feature = "objc2-ui-kit")]
        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
        #[unsafe(method(image))]
        #[unsafe(method_family = none)]
        pub unsafe fn image(&self) -> Retained<UIImage>;

        #[cfg(feature = "objc2-ui-kit")]
        /// Setter for [`image`][Self::image].
        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
        #[unsafe(method(setImage:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setImage(&self, image: &UIImage);

        #[cfg(feature = "CLKImageProvider")]
        /// Optional image provider for monochrome contexts. If nil, the full color image is desaturated.
        #[unsafe(method(tintedImageProvider))]
        #[unsafe(method_family = none)]
        pub unsafe fn tintedImageProvider(&self) -> Option<Retained<CLKImageProvider>>;

        #[cfg(feature = "CLKImageProvider")]
        /// Setter for [`tintedImageProvider`][Self::tintedImageProvider].
        #[unsafe(method(setTintedImageProvider:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTintedImageProvider(
            &self,
            tinted_image_provider: Option<&CLKImageProvider>,
        );

        /// Text for accessibility.
        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
        #[unsafe(method(accessibilityLabel))]
        #[unsafe(method_family = none)]
        pub unsafe fn accessibilityLabel(&self) -> Option<Retained<NSString>>;

        /// Setter for [`accessibilityLabel`][Self::accessibilityLabel].
        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
        #[unsafe(method(setAccessibilityLabel:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAccessibilityLabel(&self, accessibility_label: Option<&NSString>);
    );
}