use core::ffi::*;
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 TVTopShelfSectionedItemImageShape(pub NSInteger);
impl TVTopShelfSectionedItemImageShape {
#[doc(alias = "TVTopShelfSectionedItemImageShapeSquare")]
pub const Square: Self = Self(0);
#[doc(alias = "TVTopShelfSectionedItemImageShapePoster")]
pub const Poster: Self = Self(1);
#[doc(alias = "TVTopShelfSectionedItemImageShapeHDTV")]
pub const HDTV: Self = Self(2);
}
unsafe impl Encode for TVTopShelfSectionedItemImageShape {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for TVTopShelfSectionedItemImageShape {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(TVTopShelfItem, TVTopShelfObject, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
pub struct TVTopShelfSectionedItem;
);
#[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
extern_conformance!(
unsafe impl NSObjectProtocol for TVTopShelfSectionedItem {}
);
#[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
impl TVTopShelfSectionedItem {
extern_methods!(
#[unsafe(method(imageShape))]
#[unsafe(method_family = none)]
pub unsafe fn imageShape(&self) -> TVTopShelfSectionedItemImageShape;
#[unsafe(method(setImageShape:))]
#[unsafe(method_family = none)]
pub unsafe fn setImageShape(&self, image_shape: TVTopShelfSectionedItemImageShape);
#[unsafe(method(playbackProgress))]
#[unsafe(method_family = none)]
pub unsafe fn playbackProgress(&self) -> c_double;
#[unsafe(method(setPlaybackProgress:))]
#[unsafe(method_family = none)]
pub unsafe fn setPlaybackProgress(&self, playback_progress: c_double);
);
}
#[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
impl TVTopShelfSectionedItem {
extern_methods!(
#[unsafe(method(initWithIdentifier:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithIdentifier(
this: Allocated<Self>,
identifier: &NSString,
) -> Retained<Self>;
);
}
#[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
impl TVTopShelfSectionedItem {
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>;
);
}