use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(TVTopShelfObject, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
pub struct TVTopShelfItemCollection<Item: ?Sized = AnyObject>;
);
#[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
impl<Item: ?Sized + Message + AsRef<TVTopShelfItem>> TVTopShelfItemCollection<Item> {
#[inline]
pub unsafe fn cast_unchecked<NewItem: ?Sized + Message + AsRef<TVTopShelfItem>>(
&self,
) -> &TVTopShelfItemCollection<NewItem> {
unsafe { &*((self as *const Self).cast()) }
}
}
#[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
extern_conformance!(
unsafe impl<Item: ?Sized + AsRef<TVTopShelfItem>> NSObjectProtocol
for TVTopShelfItemCollection<Item>
{
}
);
#[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
impl<Item: Message + AsRef<TVTopShelfItem>> TVTopShelfItemCollection<Item> {
extern_methods!(
#[unsafe(method(items))]
#[unsafe(method_family = none)]
pub unsafe fn items(&self) -> Retained<NSArray<Item>>;
#[unsafe(method(initWithItems:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithItems(this: Allocated<Self>, items: &NSArray<Item>)
-> Retained<Self>;
);
}
#[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
impl<Item: Message + AsRef<TVTopShelfItem>> TVTopShelfItemCollection<Item> {
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>;
);
}