objc2_tv_ml_kit/generated/
TVBrowserViewController.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::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9#[cfg(feature = "objc2-ui-kit")]
10use objc2_ui_kit::*;
11
12use crate::*;
13
14extern_class!(
15    /// [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvbrowsertransitionanimator?language=objc)
16    #[unsafe(super(NSObject))]
17    #[thread_kind = MainThreadOnly]
18    #[derive(Debug, PartialEq, Eq, Hash)]
19    pub struct TVBrowserTransitionAnimator;
20);
21
22extern_conformance!(
23    unsafe impl NSObjectProtocol for TVBrowserTransitionAnimator {}
24);
25
26#[cfg(feature = "objc2-ui-kit")]
27extern_conformance!(
28    unsafe impl UIViewControllerAnimatedTransitioning for TVBrowserTransitionAnimator {}
29);
30
31impl TVBrowserTransitionAnimator {
32    extern_methods!();
33}
34
35/// Methods declared on superclass `NSObject`.
36impl TVBrowserTransitionAnimator {
37    extern_methods!(
38        #[unsafe(method(init))]
39        #[unsafe(method_family = init)]
40        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
41
42        #[unsafe(method(new))]
43        #[unsafe(method_family = new)]
44        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
45    );
46}
47
48extern_protocol!(
49    /// [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvbrowserviewcontrollerdatasource?language=objc)
50    pub unsafe trait TVBrowserViewControllerDataSource: NSObjectProtocol {
51        #[cfg(all(
52            feature = "TVDocumentViewController",
53            feature = "TVViewElement",
54            feature = "objc2-ui-kit"
55        ))]
56        #[unsafe(method(browserViewController:documentViewControllerForElement:))]
57        #[unsafe(method_family = none)]
58        unsafe fn browserViewController_documentViewControllerForElement(
59            &self,
60            browser_view_controller: &TVBrowserViewController,
61            view_element: &TVViewElement,
62        ) -> Option<Retained<TVDocumentViewController>>;
63    }
64);
65
66extern_protocol!(
67    /// [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvbrowserviewcontrollerdelegate?language=objc)
68    pub unsafe trait TVBrowserViewControllerDelegate: NSObjectProtocol {
69        #[cfg(all(feature = "TVViewElement", feature = "objc2-ui-kit"))]
70        #[optional]
71        #[unsafe(method(browserViewController:willCenterOnViewElement:))]
72        #[unsafe(method_family = none)]
73        unsafe fn browserViewController_willCenterOnViewElement(
74            &self,
75            browser_view_controller: &TVBrowserViewController,
76            view_element: &TVViewElement,
77        );
78
79        #[cfg(all(feature = "TVViewElement", feature = "objc2-ui-kit"))]
80        #[optional]
81        #[unsafe(method(browserViewController:didCenterOnViewElement:))]
82        #[unsafe(method_family = none)]
83        unsafe fn browserViewController_didCenterOnViewElement(
84            &self,
85            browser_view_controller: &TVBrowserViewController,
86            view_element: &TVViewElement,
87        );
88    }
89);
90
91extern_class!(
92    /// [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvbrowserviewcontroller?language=objc)
93    #[unsafe(super(UIViewController, UIResponder, NSObject))]
94    #[derive(Debug, PartialEq, Eq, Hash)]
95    #[cfg(feature = "objc2-ui-kit")]
96    pub struct TVBrowserViewController;
97);
98
99#[cfg(feature = "objc2-ui-kit")]
100extern_conformance!(
101    unsafe impl NSCoding for TVBrowserViewController {}
102);
103
104#[cfg(feature = "objc2-ui-kit")]
105extern_conformance!(
106    unsafe impl NSObjectProtocol for TVBrowserViewController {}
107);
108
109#[cfg(feature = "objc2-ui-kit")]
110extern_conformance!(
111    unsafe impl UIAppearanceContainer for TVBrowserViewController {}
112);
113
114#[cfg(feature = "objc2-ui-kit")]
115extern_conformance!(
116    unsafe impl UIContentContainer for TVBrowserViewController {}
117);
118
119#[cfg(feature = "objc2-ui-kit")]
120extern_conformance!(
121    unsafe impl UIFocusEnvironment for TVBrowserViewController {}
122);
123
124#[cfg(feature = "objc2-ui-kit")]
125extern_conformance!(
126    unsafe impl UIResponderStandardEditActions for TVBrowserViewController {}
127);
128
129#[cfg(feature = "objc2-ui-kit")]
130extern_conformance!(
131    unsafe impl UITraitEnvironment for TVBrowserViewController {}
132);
133
134#[cfg(feature = "objc2-ui-kit")]
135impl TVBrowserViewController {
136    extern_methods!(
137        #[cfg(feature = "TVViewElement")]
138        #[unsafe(method(viewElement))]
139        #[unsafe(method_family = none)]
140        pub unsafe fn viewElement(&self) -> Retained<TVViewElement>;
141
142        #[cfg(feature = "objc2-core-foundation")]
143        #[unsafe(method(cornerRadius))]
144        #[unsafe(method_family = none)]
145        pub unsafe fn cornerRadius(&self) -> CGFloat;
146
147        #[cfg(feature = "objc2-core-foundation")]
148        /// Setter for [`cornerRadius`][Self::cornerRadius].
149        #[unsafe(method(setCornerRadius:))]
150        #[unsafe(method_family = none)]
151        pub unsafe fn setCornerRadius(&self, corner_radius: CGFloat);
152
153        #[cfg(feature = "objc2-core-foundation")]
154        #[unsafe(method(interitemSpacing))]
155        #[unsafe(method_family = none)]
156        pub unsafe fn interitemSpacing(&self) -> CGFloat;
157
158        #[cfg(feature = "objc2-core-foundation")]
159        /// Setter for [`interitemSpacing`][Self::interitemSpacing].
160        #[unsafe(method(setInteritemSpacing:))]
161        #[unsafe(method_family = none)]
162        pub unsafe fn setInteritemSpacing(&self, interitem_spacing: CGFloat);
163
164        #[unsafe(method(maskInset))]
165        #[unsafe(method_family = none)]
166        pub unsafe fn maskInset(&self) -> UIEdgeInsets;
167
168        /// Setter for [`maskInset`][Self::maskInset].
169        #[unsafe(method(setMaskInset:))]
170        #[unsafe(method_family = none)]
171        pub unsafe fn setMaskInset(&self, mask_inset: UIEdgeInsets);
172
173        #[cfg(feature = "TVViewElement")]
174        #[unsafe(method(centeredViewElement))]
175        #[unsafe(method_family = none)]
176        pub unsafe fn centeredViewElement(&self) -> Retained<TVViewElement>;
177
178        #[cfg(feature = "TVViewElement")]
179        /// Setter for [`centeredViewElement`][Self::centeredViewElement].
180        #[unsafe(method(setCenteredViewElement:))]
181        #[unsafe(method_family = none)]
182        pub unsafe fn setCenteredViewElement(&self, centered_view_element: &TVViewElement);
183
184        #[unsafe(method(delegate))]
185        #[unsafe(method_family = none)]
186        pub unsafe fn delegate(
187            &self,
188        ) -> Option<Retained<ProtocolObject<dyn TVBrowserViewControllerDelegate>>>;
189
190        /// Setter for [`delegate`][Self::delegate].
191        ///
192        /// This is a [weak property][objc2::topics::weak_property].
193        #[unsafe(method(setDelegate:))]
194        #[unsafe(method_family = none)]
195        pub unsafe fn setDelegate(
196            &self,
197            delegate: Option<&ProtocolObject<dyn TVBrowserViewControllerDelegate>>,
198        );
199
200        #[unsafe(method(dataSource))]
201        #[unsafe(method_family = none)]
202        pub unsafe fn dataSource(
203            &self,
204        ) -> Option<Retained<ProtocolObject<dyn TVBrowserViewControllerDataSource>>>;
205
206        /// Setter for [`dataSource`][Self::dataSource].
207        ///
208        /// This is a [weak property][objc2::topics::weak_property].
209        #[unsafe(method(setDataSource:))]
210        #[unsafe(method_family = none)]
211        pub unsafe fn setDataSource(
212            &self,
213            data_source: Option<&ProtocolObject<dyn TVBrowserViewControllerDataSource>>,
214        );
215
216        #[cfg(feature = "TVViewElement")]
217        #[unsafe(method(viewControllerForElement:))]
218        #[unsafe(method_family = none)]
219        pub unsafe fn viewControllerForElement(
220            view_element: &TVViewElement,
221            mtm: MainThreadMarker,
222        ) -> Option<Retained<Self>>;
223
224        #[unsafe(method(init))]
225        #[unsafe(method_family = init)]
226        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
227
228        #[unsafe(method(initWithNibName:bundle:))]
229        #[unsafe(method_family = init)]
230        pub unsafe fn initWithNibName_bundle(
231            this: Allocated<Self>,
232            nib_name_or_nil: Option<&NSString>,
233            nib_bundle_or_nil: Option<&NSBundle>,
234        ) -> Retained<Self>;
235
236        /// # Safety
237        ///
238        /// `coder` possibly has further requirements.
239        #[unsafe(method(initWithCoder:))]
240        #[unsafe(method_family = init)]
241        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
242    );
243}
244
245/// Methods declared on superclass `NSObject`.
246#[cfg(feature = "objc2-ui-kit")]
247impl TVBrowserViewController {
248    extern_methods!(
249        #[unsafe(method(new))]
250        #[unsafe(method_family = new)]
251        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
252    );
253}