use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct TVTopShelfCarouselContentStyle(pub NSInteger);
impl TVTopShelfCarouselContentStyle {
#[doc(alias = "TVTopShelfCarouselContentStyleActions")]
pub const Actions: Self = Self(0);
#[doc(alias = "TVTopShelfCarouselContentStyleDetails")]
pub const Details: Self = Self(1);
}
unsafe impl Encode for TVTopShelfCarouselContentStyle {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for TVTopShelfCarouselContentStyle {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct TVTopShelfCarouselContent;
);
extern_conformance!(
unsafe impl NSObjectProtocol for TVTopShelfCarouselContent {}
);
#[cfg(feature = "TVTopShelfContent")]
extern_conformance!(
unsafe impl TVTopShelfContent for TVTopShelfCarouselContent {}
);
impl TVTopShelfCarouselContent {
extern_methods!(
#[unsafe(method(style))]
#[unsafe(method_family = none)]
pub unsafe fn style(&self) -> TVTopShelfCarouselContentStyle;
#[cfg(all(
feature = "TVTopShelfCarouselItem",
feature = "TVTopShelfItem",
feature = "TVTopShelfObject"
))]
#[unsafe(method(items))]
#[unsafe(method_family = none)]
pub unsafe fn items(&self) -> Retained<NSArray<TVTopShelfCarouselItem>>;
#[cfg(all(
feature = "TVTopShelfCarouselItem",
feature = "TVTopShelfItem",
feature = "TVTopShelfObject"
))]
#[unsafe(method(initWithStyle:items:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithStyle_items(
this: Allocated<Self>,
style: TVTopShelfCarouselContentStyle,
items: &NSArray<TVTopShelfCarouselItem>,
) -> Retained<Self>;
#[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>;
);
}