objc2_tv_services/generated/
TVTopShelfObject.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// An abstract base class for describing Top Shelf items and Top Shelf item collections.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/tvservices/tvtopshelfobject?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct TVTopShelfObject;
17);
18
19extern_conformance!(
20    unsafe impl NSObjectProtocol for TVTopShelfObject {}
21);
22
23impl TVTopShelfObject {
24    extern_methods!(
25        /// The title of the section or item.
26        #[unsafe(method(title))]
27        #[unsafe(method_family = none)]
28        pub unsafe fn title(&self) -> Option<Retained<NSString>>;
29
30        /// Setter for [`title`][Self::title].
31        ///
32        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
33        #[unsafe(method(setTitle:))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn setTitle(&self, title: Option<&NSString>);
36
37        #[unsafe(method(init))]
38        #[unsafe(method_family = init)]
39        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
40
41        #[unsafe(method(new))]
42        #[unsafe(method_family = new)]
43        pub unsafe fn new() -> Retained<Self>;
44    );
45}