objc2_tv_services/generated/
TVTopShelfItemCollection.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// An object that represents a collection of Top Shelf items that can be displayed in a section.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/tvservices/tvtopshelfitemcollection?language=objc)
13    #[unsafe(super(TVTopShelfObject, NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[cfg(feature = "TVTopShelfObject")]
16    pub struct TVTopShelfItemCollection<Item: ?Sized = AnyObject>;
17);
18
19#[cfg(feature = "TVTopShelfObject")]
20extern_conformance!(
21    unsafe impl<Item: ?Sized> NSObjectProtocol for TVTopShelfItemCollection<Item> {}
22);
23
24#[cfg(feature = "TVTopShelfObject")]
25impl<Item: Message> TVTopShelfItemCollection<Item> {
26    extern_methods!(
27        /// The collection's items.
28        #[unsafe(method(items))]
29        #[unsafe(method_family = none)]
30        pub unsafe fn items(&self) -> Retained<NSArray<Item>>;
31
32        /// Create a collection of items.
33        #[unsafe(method(initWithItems:))]
34        #[unsafe(method_family = init)]
35        pub unsafe fn initWithItems(this: Allocated<Self>, items: &NSArray<Item>)
36            -> Retained<Self>;
37    );
38}
39
40/// Methods declared on superclass `TVTopShelfObject`.
41#[cfg(feature = "TVTopShelfObject")]
42impl<Item: Message> TVTopShelfItemCollection<Item> {
43    extern_methods!(
44        #[unsafe(method(init))]
45        #[unsafe(method_family = init)]
46        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
47
48        #[unsafe(method(new))]
49        #[unsafe(method_family = new)]
50        pub unsafe fn new() -> Retained<Self>;
51    );
52}