//! 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/uipreviewparameters?language=objc)
    #[unsafe(super(NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UIPreviewParameters;
);

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

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

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

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

        #[unsafe(method(initWithTextLineRects:))]
        #[unsafe(method_family = init)]
        pub fn initWithTextLineRects(
            this: Allocated<Self>,
            text_line_rects: &NSArray<NSValue>,
        ) -> Retained<Self>;

        #[cfg(feature = "UIBezierPath")]
        #[unsafe(method(visiblePath))]
        #[unsafe(method_family = none)]
        pub fn visiblePath(&self) -> Option<Retained<UIBezierPath>>;

        #[cfg(feature = "UIBezierPath")]
        /// Setter for [`visiblePath`][Self::visiblePath].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setVisiblePath:))]
        #[unsafe(method_family = none)]
        pub fn setVisiblePath(&self, visible_path: Option<&UIBezierPath>);

        #[cfg(feature = "UIBezierPath")]
        #[unsafe(method(shadowPath))]
        #[unsafe(method_family = none)]
        pub fn shadowPath(&self) -> Option<Retained<UIBezierPath>>;

        #[cfg(feature = "UIBezierPath")]
        /// Setter for [`shadowPath`][Self::shadowPath].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setShadowPath:))]
        #[unsafe(method_family = none)]
        pub fn setShadowPath(&self, shadow_path: Option<&UIBezierPath>);

        #[cfg(feature = "UIColor")]
        #[unsafe(method(backgroundColor))]
        #[unsafe(method_family = none)]
        pub fn backgroundColor(&self) -> Retained<UIColor>;

        #[cfg(feature = "UIColor")]
        /// Setter for [`backgroundColor`][Self::backgroundColor].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setBackgroundColor:))]
        #[unsafe(method_family = none)]
        pub fn setBackgroundColor(&self, background_color: Option<&UIColor>);
    );
}

/// Methods declared on superclass `NSObject`.
impl UIPreviewParameters {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}
