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 pub static TVDocumentErrorDomain: &'static NSErrorDomain;
15}
16
17#[deprecated = "Please use SwiftUI or UIKit"]
20#[repr(transparent)]
21#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
22pub struct TVDocumentError(pub NSInteger);
23impl TVDocumentError {
24 #[doc(alias = "TVDocumentErrorFailed")]
25 #[deprecated = "Please use SwiftUI or UIKit"]
26 pub const Failed: Self = Self(0);
27 #[doc(alias = "TVDocumentErrorCancelled")]
28 #[deprecated = "Please use SwiftUI or UIKit"]
29 pub const Cancelled: Self = Self(1);
30}
31
32unsafe impl Encode for TVDocumentError {
33 const ENCODING: Encoding = NSInteger::ENCODING;
34}
35
36unsafe impl RefEncode for TVDocumentError {
37 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
38}
39
40pub type TVDocumentEvent = NSString;
43
44extern "C" {
45 pub static TVDocumentEventPlay: &'static TVDocumentEvent;
47}
48
49extern "C" {
50 pub static TVDocumentEventSelect: &'static TVDocumentEvent;
52}
53
54extern "C" {
55 pub static TVDocumentEventHoldSelect: &'static TVDocumentEvent;
57}
58
59extern "C" {
60 pub static TVDocumentEventHighlight: &'static TVDocumentEvent;
62}
63
64extern "C" {
65 pub static TVDocumentEventLoad: &'static TVDocumentEvent;
67}
68
69extern "C" {
70 pub static TVDocumentEventUnload: &'static TVDocumentEvent;
72}
73
74extern "C" {
75 pub static TVDocumentEventAppear: &'static TVDocumentEvent;
77}
78
79extern "C" {
80 pub static TVDocumentEventDisappear: &'static TVDocumentEvent;
82}
83
84extern_protocol!(
85 #[deprecated = "Please use SwiftUI or UIKit"]
87 pub unsafe trait TVDocumentViewControllerDelegate: NSObjectProtocol {
88 #[cfg(feature = "objc2-ui-kit")]
89 #[deprecated = "Please use SwiftUI or UIKit"]
90 #[optional]
91 #[unsafe(method(documentViewControllerWillUpdate:))]
92 #[unsafe(method_family = none)]
93 unsafe fn documentViewControllerWillUpdate(
94 &self,
95 document_view_controller: &TVDocumentViewController,
96 );
97
98 #[cfg(feature = "objc2-ui-kit")]
99 #[deprecated = "Please use SwiftUI or UIKit"]
100 #[optional]
101 #[unsafe(method(documentViewControllerDidUpdate:))]
102 #[unsafe(method_family = none)]
103 unsafe fn documentViewControllerDidUpdate(
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(documentViewController:didUpdateWithContext:))]
112 #[unsafe(method_family = none)]
113 unsafe fn documentViewController_didUpdateWithContext(
114 &self,
115 document_view_controller: &TVDocumentViewController,
116 context: &NSDictionary<NSString, AnyObject>,
117 );
118
119 #[cfg(feature = "objc2-ui-kit")]
120 #[deprecated = "Please use SwiftUI or UIKit"]
121 #[optional]
122 #[unsafe(method(documentViewController:didFailUpdateWithError:))]
123 #[unsafe(method_family = none)]
124 unsafe fn documentViewController_didFailUpdateWithError(
125 &self,
126 document_view_controller: &TVDocumentViewController,
127 error: &NSError,
128 );
129
130 #[cfg(all(feature = "TVViewElement", feature = "objc2-ui-kit"))]
131 #[deprecated = "Please use SwiftUI or UIKit"]
132 #[optional]
133 #[unsafe(method(documentViewController:handleEvent:withElement:))]
134 #[unsafe(method_family = none)]
135 unsafe fn documentViewController_handleEvent_withElement(
136 &self,
137 document_view_controller: &TVDocumentViewController,
138 event: &TVDocumentEvent,
139 element: &TVViewElement,
140 ) -> bool;
141 }
142);
143
144extern_class!(
145 #[unsafe(super(UIViewController, UIResponder, NSObject))]
147 #[derive(Debug, PartialEq, Eq, Hash)]
148 #[cfg(feature = "objc2-ui-kit")]
149 #[deprecated = "Please use SwiftUI or UIKit"]
150 pub struct TVDocumentViewController;
151);
152
153#[cfg(feature = "objc2-ui-kit")]
154extern_conformance!(
155 unsafe impl NSCoding for TVDocumentViewController {}
156);
157
158#[cfg(feature = "objc2-ui-kit")]
159extern_conformance!(
160 unsafe impl NSObjectProtocol for TVDocumentViewController {}
161);
162
163#[cfg(feature = "objc2-ui-kit")]
164extern_conformance!(
165 unsafe impl UIAppearanceContainer for TVDocumentViewController {}
166);
167
168#[cfg(feature = "objc2-ui-kit")]
169extern_conformance!(
170 unsafe impl UIContentContainer for TVDocumentViewController {}
171);
172
173#[cfg(feature = "objc2-ui-kit")]
174extern_conformance!(
175 unsafe impl UIFocusEnvironment for TVDocumentViewController {}
176);
177
178#[cfg(feature = "objc2-ui-kit")]
179extern_conformance!(
180 unsafe impl UIResponderStandardEditActions for TVDocumentViewController {}
181);
182
183#[cfg(feature = "objc2-ui-kit")]
184extern_conformance!(
185 unsafe impl UITraitEnvironment for TVDocumentViewController {}
186);
187
188#[cfg(feature = "objc2-ui-kit")]
189impl TVDocumentViewController {
190 extern_methods!(
191 #[deprecated = "Please use SwiftUI or UIKit"]
192 #[unsafe(method(documentContext))]
193 #[unsafe(method_family = none)]
194 pub unsafe fn documentContext(&self) -> Retained<NSDictionary<NSString, AnyObject>>;
195
196 #[cfg(feature = "TVApplicationController")]
197 #[deprecated = "Please use SwiftUI or UIKit"]
198 #[unsafe(method(appController))]
199 #[unsafe(method_family = none)]
200 pub unsafe fn appController(&self) -> Option<Retained<TVApplicationController>>;
201
202 #[deprecated = "Please use SwiftUI or UIKit"]
203 #[unsafe(method(delegate))]
204 #[unsafe(method_family = none)]
205 pub unsafe fn delegate(
206 &self,
207 ) -> Option<Retained<ProtocolObject<dyn TVDocumentViewControllerDelegate>>>;
208
209 #[deprecated = "Please use SwiftUI or UIKit"]
212 #[unsafe(method(setDelegate:))]
213 #[unsafe(method_family = none)]
214 pub unsafe fn setDelegate(
215 &self,
216 delegate: Option<&ProtocolObject<dyn TVDocumentViewControllerDelegate>>,
217 );
218
219 #[cfg(feature = "TVApplicationController")]
220 #[deprecated = "Please use SwiftUI or UIKit"]
221 #[unsafe(method(viewControllerWithContext:forAppController:))]
222 #[unsafe(method_family = none)]
223 pub unsafe fn viewControllerWithContext_forAppController(
224 context: &NSDictionary<NSString, AnyObject>,
225 app_controller: &TVApplicationController,
226 mtm: MainThreadMarker,
227 ) -> Retained<Self>;
228
229 #[deprecated = "Please use SwiftUI or UIKit"]
230 #[unsafe(method(updateUsingContext:))]
231 #[unsafe(method_family = none)]
232 pub unsafe fn updateUsingContext(&self, context: &NSDictionary<NSString, AnyObject>);
233
234 #[unsafe(method(init))]
235 #[unsafe(method_family = init)]
236 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
237
238 #[unsafe(method(initWithNibName:bundle:))]
239 #[unsafe(method_family = init)]
240 pub unsafe fn initWithNibName_bundle(
241 this: Allocated<Self>,
242 nib_name_or_nil: Option<&NSString>,
243 nib_bundle_or_nil: Option<&NSBundle>,
244 ) -> Retained<Self>;
245
246 #[unsafe(method(initWithCoder:))]
247 #[unsafe(method_family = init)]
248 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
249 );
250}
251
252#[cfg(feature = "objc2-ui-kit")]
254impl TVDocumentViewController {
255 extern_methods!(
256 #[unsafe(method(new))]
257 #[unsafe(method_family = new)]
258 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
259 );
260}