1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use crate::*;
extern_class!(
/// [Apple's documentation](https://developer.apple.com/documentation/tvservices/tvtopshelfcontentprovider?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct TVTopShelfContentProvider;
);
extern_conformance!(
unsafe impl NSObjectProtocol for TVTopShelfContentProvider {}
);
impl TVTopShelfContentProvider {
extern_methods!(
#[cfg(all(feature = "TVTopShelfContent", feature = "block2"))]
/// Load Top Shelf content.
///
/// If the completion handler is not called in a timely manner or is called with empty content the system will display the static image instead.
///
/// - parameter completionHandler: You must call this handler and should do so as soon as possible. The handler can be called on any queue.
#[unsafe(method(loadTopShelfContentWithCompletionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn loadTopShelfContentWithCompletionHandler(
&self,
completion_handler: &block2::DynBlock<
dyn Fn(*mut ProtocolObject<dyn TVTopShelfContent>),
>,
);
/// Can be called from an application or extension to tell the system that your Top Shelf content has changed.
#[unsafe(method(topShelfContentDidChange))]
#[unsafe(method_family = none)]
pub unsafe fn topShelfContentDidChange();
);
}
/// Methods declared on superclass `NSObject`.
impl TVTopShelfContentProvider {
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>;
);
}