use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-ui-kit")]
use objc2_ui_kit::*;
use crate::*;
#[deprecated = "Please use SwiftUI or UIKit"]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct TVColorType(pub NSInteger);
impl TVColorType {
#[doc(alias = "TVColorTypeNone")]
#[deprecated = "Please use SwiftUI or UIKit"]
pub const None: Self = Self(0);
#[doc(alias = "TVColorTypePlain")]
#[deprecated = "Please use SwiftUI or UIKit"]
pub const Plain: Self = Self(1);
#[doc(alias = "TVColorTypeLinearGradientTopToBottom")]
#[deprecated = "Please use SwiftUI or UIKit"]
pub const LinearGradientTopToBottom: Self = Self(2);
#[doc(alias = "TVColorTypeLinearGradientLeftToRight")]
#[deprecated = "Please use SwiftUI or UIKit"]
pub const LinearGradientLeftToRight: Self = Self(3);
}
unsafe impl Encode for TVColorType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for TVColorType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[deprecated = "Please use SwiftUI or UIKit"]
pub struct TVColor;
);
extern_conformance!(
unsafe impl NSCopying for TVColor {}
);
unsafe impl CopyingHelper for TVColor {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for TVColor {}
);
impl TVColor {
extern_methods!(
#[deprecated = "Please use SwiftUI or UIKit"]
#[unsafe(method(colorType))]
#[unsafe(method_family = none)]
pub unsafe fn colorType(&self) -> TVColorType;
#[cfg(feature = "objc2-ui-kit")]
#[deprecated = "Please use SwiftUI or UIKit"]
#[unsafe(method(color))]
#[unsafe(method_family = none)]
pub unsafe fn color(&self) -> Option<Retained<UIColor>>;
#[cfg(feature = "objc2-ui-kit")]
#[deprecated = "Please use SwiftUI or UIKit"]
#[unsafe(method(gradientColors))]
#[unsafe(method_family = none)]
pub unsafe fn gradientColors(&self) -> Option<Retained<NSArray<UIColor>>>;
#[deprecated = "Please use SwiftUI or UIKit"]
#[unsafe(method(gradientPoints))]
#[unsafe(method_family = none)]
pub unsafe fn gradientPoints(&self) -> Option<Retained<NSArray<NSNumber>>>;
);
}
impl TVColor {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}