objc2-tv-services 0.3.2

Bindings to the TVServices framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// An object that represents inset banner content.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/tvservices/tvtopshelfinsetcontent?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct TVTopShelfInsetContent;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for TVTopShelfInsetContent {}
);

#[cfg(feature = "TVTopShelfContent")]
extern_conformance!(
    unsafe impl TVTopShelfContent for TVTopShelfInsetContent {}
);

impl TVTopShelfInsetContent {
    extern_methods!(
        #[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
        /// The content's items.
        #[unsafe(method(items))]
        #[unsafe(method_family = none)]
        pub unsafe fn items(&self) -> Retained<NSArray<TVTopShelfItem>>;

        #[cfg(feature = "objc2-core-foundation")]
        /// The size of images in the inset content style.
        #[unsafe(method(imageSize))]
        #[unsafe(method_family = none)]
        pub unsafe fn imageSize() -> CGSize;

        #[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
        /// Create a content with the given items.
        #[unsafe(method(initWithItems:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithItems(
            this: Allocated<Self>,
            items: &NSArray<TVTopShelfItem>,
        ) -> 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>;
    );
}