objc2_tv_ml_kit/generated/
TVDocumentViewController.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7#[cfg(feature = "objc2-ui-kit")]
8use objc2_ui_kit::*;
9
10use crate::*;
11
12extern "C" {
13 #[deprecated = "Please use SwiftUI or UIKit"]
15 pub static TVDocumentErrorDomain: &'static NSErrorDomain;
16}
17
18#[deprecated = "Please use SwiftUI or UIKit"]
21#[repr(transparent)]
22#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
23pub struct TVDocumentError(pub NSInteger);
24impl TVDocumentError {
25 #[doc(alias = "TVDocumentErrorFailed")]
26 #[deprecated = "Please use SwiftUI or UIKit"]
27 pub const Failed: Self = Self(0);
28 #[doc(alias = "TVDocumentErrorCancelled")]
29 #[deprecated = "Please use SwiftUI or UIKit"]
30 pub const Cancelled: Self = Self(1);
31}
32
33unsafe impl Encode for TVDocumentError {
34 const ENCODING: Encoding = NSInteger::ENCODING;
35}
36
37unsafe impl RefEncode for TVDocumentError {
38 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
39}
40
41#[deprecated = "Please use SwiftUI or UIKit"]
43pub type TVDocumentEvent = NSString;
45
46extern "C" {
47 #[deprecated = "Please use SwiftUI or UIKit"]
49 pub static TVDocumentEventPlay: &'static TVDocumentEvent;
50}
51
52extern "C" {
53 #[deprecated = "Please use SwiftUI or UIKit"]
55 pub static TVDocumentEventSelect: &'static TVDocumentEvent;
56}
57
58extern "C" {
59 #[deprecated = "Please use SwiftUI or UIKit"]
61 pub static TVDocumentEventHoldSelect: &'static TVDocumentEvent;
62}
63
64extern "C" {
65 #[deprecated = "Please use SwiftUI or UIKit"]
67 pub static TVDocumentEventHighlight: &'static TVDocumentEvent;
68}
69
70extern "C" {
71 #[deprecated = "Please use SwiftUI or UIKit"]
73 pub static TVDocumentEventLoad: &'static TVDocumentEvent;
74}
75
76extern "C" {
77 #[deprecated = "Please use SwiftUI or UIKit"]
79 pub static TVDocumentEventUnload: &'static TVDocumentEvent;
80}
81
82extern "C" {
83 #[deprecated = "Please use SwiftUI or UIKit"]
85 pub static TVDocumentEventAppear: &'static TVDocumentEvent;
86}
87
88extern "C" {
89 #[deprecated = "Please use SwiftUI or UIKit"]
91 pub static TVDocumentEventDisappear: &'static TVDocumentEvent;
92}
93
94extern_protocol!(
95 #[deprecated = "Please use SwiftUI or UIKit"]
97 pub unsafe trait TVDocumentViewControllerDelegate: NSObjectProtocol {
98 #[cfg(feature = "objc2-ui-kit")]
99 #[deprecated = "Please use SwiftUI or UIKit"]
100 #[optional]
101 #[unsafe(method(documentViewControllerWillUpdate:))]
102 #[unsafe(method_family = none)]
103 unsafe fn documentViewControllerWillUpdate(
104 &self,
105 document_view_controller: &TVDocumentViewController,
106 );
107
108 #[cfg(feature = "objc2-ui-kit")]
109 #[deprecated = "Please use SwiftUI or UIKit"]
110 #[optional]
111 #[unsafe(method(documentViewControllerDidUpdate:))]
112 #[unsafe(method_family = none)]
113 unsafe fn documentViewControllerDidUpdate(
114 &self,
115 document_view_controller: &TVDocumentViewController,
116 );
117
118 #[cfg(feature = "objc2-ui-kit")]
119 #[deprecated = "Please use SwiftUI or UIKit"]
123 #[optional]
124 #[unsafe(method(documentViewController:didUpdateWithContext:))]
125 #[unsafe(method_family = none)]
126 unsafe fn documentViewController_didUpdateWithContext(
127 &self,
128 document_view_controller: &TVDocumentViewController,
129 context: &NSDictionary<NSString, AnyObject>,
130 );
131
132 #[cfg(feature = "objc2-ui-kit")]
133 #[deprecated = "Please use SwiftUI or UIKit"]
134 #[optional]
135 #[unsafe(method(documentViewController:didFailUpdateWithError:))]
136 #[unsafe(method_family = none)]
137 unsafe fn documentViewController_didFailUpdateWithError(
138 &self,
139 document_view_controller: &TVDocumentViewController,
140 error: &NSError,
141 );
142
143 #[cfg(all(feature = "TVViewElement", feature = "objc2-ui-kit"))]
144 #[deprecated = "Please use SwiftUI or UIKit"]
145 #[optional]
146 #[unsafe(method(documentViewController:handleEvent:withElement:))]
147 #[unsafe(method_family = none)]
148 unsafe fn documentViewController_handleEvent_withElement(
149 &self,
150 document_view_controller: &TVDocumentViewController,
151 event: &TVDocumentEvent,
152 element: &TVViewElement,
153 ) -> bool;
154 }
155);
156
157extern_class!(
158 #[unsafe(super(UIViewController, UIResponder, NSObject))]
160 #[derive(Debug, PartialEq, Eq, Hash)]
161 #[cfg(feature = "objc2-ui-kit")]
162 #[deprecated = "Please use SwiftUI or UIKit"]
163 pub struct TVDocumentViewController;
164);
165
166#[cfg(feature = "objc2-ui-kit")]
167extern_conformance!(
168 unsafe impl NSCoding for TVDocumentViewController {}
169);
170
171#[cfg(feature = "objc2-ui-kit")]
172extern_conformance!(
173 unsafe impl NSObjectProtocol for TVDocumentViewController {}
174);
175
176#[cfg(feature = "objc2-ui-kit")]
177extern_conformance!(
178 unsafe impl UIAppearanceContainer for TVDocumentViewController {}
179);
180
181#[cfg(feature = "objc2-ui-kit")]
182extern_conformance!(
183 unsafe impl UIContentContainer for TVDocumentViewController {}
184);
185
186#[cfg(feature = "objc2-ui-kit")]
187extern_conformance!(
188 unsafe impl UIFocusEnvironment for TVDocumentViewController {}
189);
190
191#[cfg(feature = "objc2-ui-kit")]
192extern_conformance!(
193 unsafe impl UIResponderStandardEditActions for TVDocumentViewController {}
194);
195
196#[cfg(feature = "objc2-ui-kit")]
197extern_conformance!(
198 unsafe impl UITraitEnvironment for TVDocumentViewController {}
199);
200
201#[cfg(feature = "objc2-ui-kit")]
202impl TVDocumentViewController {
203 extern_methods!(
204 #[deprecated = "Please use SwiftUI or UIKit"]
205 #[unsafe(method(documentContext))]
206 #[unsafe(method_family = none)]
207 pub unsafe fn documentContext(&self) -> Retained<NSDictionary<NSString, AnyObject>>;
208
209 #[cfg(feature = "TVApplicationController")]
210 #[deprecated = "Please use SwiftUI or UIKit"]
211 #[unsafe(method(appController))]
212 #[unsafe(method_family = none)]
213 pub unsafe fn appController(&self) -> Option<Retained<TVApplicationController>>;
214
215 #[deprecated = "Please use SwiftUI or UIKit"]
216 #[unsafe(method(delegate))]
217 #[unsafe(method_family = none)]
218 pub unsafe fn delegate(
219 &self,
220 ) -> Option<Retained<ProtocolObject<dyn TVDocumentViewControllerDelegate>>>;
221
222 #[deprecated = "Please use SwiftUI or UIKit"]
226 #[unsafe(method(setDelegate:))]
227 #[unsafe(method_family = none)]
228 pub unsafe fn setDelegate(
229 &self,
230 delegate: Option<&ProtocolObject<dyn TVDocumentViewControllerDelegate>>,
231 );
232
233 #[cfg(feature = "TVApplicationController")]
234 #[deprecated = "Please use SwiftUI or UIKit"]
238 #[unsafe(method(viewControllerWithContext:forAppController:))]
239 #[unsafe(method_family = none)]
240 pub unsafe fn viewControllerWithContext_forAppController(
241 context: &NSDictionary<NSString, AnyObject>,
242 app_controller: &TVApplicationController,
243 mtm: MainThreadMarker,
244 ) -> Retained<Self>;
245
246 #[deprecated = "Please use SwiftUI or UIKit"]
250 #[unsafe(method(updateUsingContext:))]
251 #[unsafe(method_family = none)]
252 pub unsafe fn updateUsingContext(&self, context: &NSDictionary<NSString, AnyObject>);
253
254 #[unsafe(method(init))]
255 #[unsafe(method_family = init)]
256 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
257
258 #[unsafe(method(initWithNibName:bundle:))]
259 #[unsafe(method_family = init)]
260 pub unsafe fn initWithNibName_bundle(
261 this: Allocated<Self>,
262 nib_name_or_nil: Option<&NSString>,
263 nib_bundle_or_nil: Option<&NSBundle>,
264 ) -> Retained<Self>;
265
266 #[unsafe(method(initWithCoder:))]
270 #[unsafe(method_family = init)]
271 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
272 );
273}
274
275#[cfg(feature = "objc2-ui-kit")]
277impl TVDocumentViewController {
278 extern_methods!(
279 #[unsafe(method(new))]
280 #[unsafe(method_family = new)]
281 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
282 );
283}