use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[deprecated = "Please use SwiftUI or UIKit"]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct TVImageType(pub NSInteger);
impl TVImageType {
#[doc(alias = "TVImageTypeImage")]
#[deprecated = "Please use SwiftUI or UIKit"]
pub const Image: Self = Self(0);
#[doc(alias = "TVImageTypeFullscreen")]
#[deprecated = "Please use SwiftUI or UIKit"]
pub const Fullscreen: Self = Self(1);
#[doc(alias = "TVImageTypeDecoration")]
#[deprecated = "Please use SwiftUI or UIKit"]
pub const Decoration: Self = Self(2);
#[doc(alias = "TVImageTypeHero")]
#[deprecated = "Please use SwiftUI or UIKit"]
pub const Hero: Self = Self(3);
}
unsafe impl Encode for TVImageType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for TVImageType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(TVViewElement, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "TVViewElement")]
#[deprecated = "Please use SwiftUI or UIKit"]
pub struct TVImageElement;
);
#[cfg(feature = "TVViewElement")]
extern_conformance!(
unsafe impl NSCopying for TVImageElement {}
);
#[cfg(feature = "TVViewElement")]
unsafe impl CopyingHelper for TVImageElement {
type Result = Self;
}
#[cfg(feature = "TVViewElement")]
extern_conformance!(
unsafe impl NSObjectProtocol for TVImageElement {}
);
#[cfg(feature = "TVViewElement")]
impl TVImageElement {
extern_methods!(
#[deprecated = "Please use SwiftUI or UIKit"]
#[unsafe(method(URL))]
#[unsafe(method_family = none)]
pub unsafe fn URL(&self) -> Option<Retained<NSURL>>;
#[deprecated = "Please use SwiftUI or UIKit"]
#[unsafe(method(srcset))]
#[unsafe(method_family = none)]
pub unsafe fn srcset(&self) -> Option<Retained<NSDictionary<NSString, NSURL>>>;
#[deprecated = "Please use SwiftUI or UIKit"]
#[unsafe(method(imageType))]
#[unsafe(method_family = none)]
pub unsafe fn imageType(&self) -> TVImageType;
);
}
#[cfg(feature = "TVViewElement")]
impl TVImageElement {
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>;
);
}