objc2_tv_ml_kit/generated/
TVApplicationController.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7#[cfg(feature = "objc2-javascript-core")]
8use objc2_javascript_core::*;
9#[cfg(feature = "objc2-ui-kit")]
10use objc2_ui_kit::*;
11
12use crate::*;
13
14extern_class!(
15 #[unsafe(super(NSObject))]
19 #[derive(Debug, PartialEq, Eq, Hash)]
20 #[deprecated = "Please use SwiftUI or UIKit"]
21 pub struct TVApplicationControllerContext;
22);
23
24extern_conformance!(
25 unsafe impl NSCopying for TVApplicationControllerContext {}
26);
27
28unsafe impl CopyingHelper for TVApplicationControllerContext {
29 type Result = Self;
30}
31
32extern_conformance!(
33 unsafe impl NSObjectProtocol for TVApplicationControllerContext {}
34);
35
36impl TVApplicationControllerContext {
37 extern_methods!(
38 #[deprecated = "Please use SwiftUI or UIKit"]
40 #[unsafe(method(javaScriptApplicationURL))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn javaScriptApplicationURL(&self) -> Retained<NSURL>;
43
44 #[deprecated = "Please use SwiftUI or UIKit"]
48 #[unsafe(method(setJavaScriptApplicationURL:))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn setJavaScriptApplicationURL(&self, java_script_application_url: &NSURL);
51
52 #[deprecated = "Please use SwiftUI or UIKit"]
54 #[unsafe(method(storageIdentifier))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn storageIdentifier(&self) -> Option<Retained<NSString>>;
57
58 #[deprecated = "Please use SwiftUI or UIKit"]
62 #[unsafe(method(setStorageIdentifier:))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn setStorageIdentifier(&self, storage_identifier: Option<&NSString>);
65
66 #[deprecated = "Please use SwiftUI or UIKit"]
68 #[unsafe(method(supportsPictureInPicturePlayback))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn supportsPictureInPicturePlayback(&self) -> bool;
71
72 #[deprecated = "Please use SwiftUI or UIKit"]
74 #[unsafe(method(setSupportsPictureInPicturePlayback:))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn setSupportsPictureInPicturePlayback(
77 &self,
78 supports_picture_in_picture_playback: bool,
79 );
80
81 #[deprecated = "Please use SwiftUI or UIKit"]
89 #[unsafe(method(launchOptions))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn launchOptions(&self) -> Retained<NSDictionary<NSString, AnyObject>>;
92
93 #[deprecated = "Please use SwiftUI or UIKit"]
101 #[unsafe(method(setLaunchOptions:))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn setLaunchOptions(&self, launch_options: &NSDictionary<NSString, AnyObject>);
104 );
105}
106
107impl TVApplicationControllerContext {
109 extern_methods!(
110 #[unsafe(method(init))]
111 #[unsafe(method_family = init)]
112 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
113
114 #[unsafe(method(new))]
115 #[unsafe(method_family = new)]
116 pub unsafe fn new() -> Retained<Self>;
117 );
118}
119
120extern_protocol!(
121 #[deprecated = "Please use SwiftUI or UIKit"]
123 pub unsafe trait TVApplicationControllerDelegate: NSObjectProtocol {
124 #[cfg(feature = "objc2-javascript-core")]
125 #[deprecated = "Please use SwiftUI or UIKit"]
127 #[optional]
128 #[unsafe(method(appController:evaluateAppJavaScriptInContext:))]
129 #[unsafe(method_family = none)]
130 unsafe fn appController_evaluateAppJavaScriptInContext(
131 &self,
132 app_controller: &TVApplicationController,
133 js_context: &JSContext,
134 );
135
136 #[deprecated = "Please use SwiftUI or UIKit"]
142 #[optional]
143 #[unsafe(method(appController:didFinishLaunchingWithOptions:))]
144 #[unsafe(method_family = none)]
145 unsafe fn appController_didFinishLaunchingWithOptions(
146 &self,
147 app_controller: &TVApplicationController,
148 options: Option<&NSDictionary<NSString, AnyObject>>,
149 );
150
151 #[deprecated = "Please use SwiftUI or UIKit"]
153 #[optional]
154 #[unsafe(method(appController:didFailWithError:))]
155 #[unsafe(method_family = none)]
156 unsafe fn appController_didFailWithError(
157 &self,
158 app_controller: &TVApplicationController,
159 error: &NSError,
160 );
161
162 #[deprecated = "Please use SwiftUI or UIKit"]
168 #[optional]
169 #[unsafe(method(appController:didStopWithOptions:))]
170 #[unsafe(method_family = none)]
171 unsafe fn appController_didStopWithOptions(
172 &self,
173 app_controller: &TVApplicationController,
174 options: Option<&NSDictionary<NSString, AnyObject>>,
175 );
176
177 #[cfg(feature = "TVPlayback")]
178 #[deprecated = "Please use SwiftUI or UIKit"]
180 #[optional]
181 #[unsafe(method(playerForAppController:))]
182 #[unsafe(method_family = none)]
183 unsafe fn playerForAppController(
184 &self,
185 app_controller: &TVApplicationController,
186 ) -> Option<Retained<TVPlayer>>;
187 }
188);
189
190extern_class!(
191 #[unsafe(super(NSObject))]
197 #[derive(Debug, PartialEq, Eq, Hash)]
198 #[deprecated = "Please use SwiftUI or UIKit"]
199 pub struct TVApplicationController;
200);
201
202extern_conformance!(
203 unsafe impl NSObjectProtocol for TVApplicationController {}
204);
205
206impl TVApplicationController {
207 extern_methods!(
208 #[cfg(feature = "objc2-ui-kit")]
209 #[deprecated = "Please use SwiftUI or UIKit"]
215 #[unsafe(method(initWithContext:window:delegate:))]
216 #[unsafe(method_family = init)]
217 pub unsafe fn initWithContext_window_delegate(
218 this: Allocated<Self>,
219 context: &TVApplicationControllerContext,
220 window: Option<&UIWindow>,
221 delegate: Option<&ProtocolObject<dyn TVApplicationControllerDelegate>>,
222 ) -> Retained<Self>;
223
224 #[deprecated = "Please use SwiftUI or UIKit"]
225 #[unsafe(method(init))]
226 #[unsafe(method_family = init)]
227 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
228
229 #[cfg(feature = "objc2-ui-kit")]
230 #[deprecated = "Please use SwiftUI or UIKit"]
231 #[unsafe(method(window))]
232 #[unsafe(method_family = none)]
233 pub unsafe fn window(&self, mtm: MainThreadMarker) -> Option<Retained<UIWindow>>;
234
235 #[deprecated = "Please use SwiftUI or UIKit"]
236 #[unsafe(method(context))]
237 #[unsafe(method_family = none)]
238 pub unsafe fn context(&self) -> Retained<TVApplicationControllerContext>;
239
240 #[deprecated = "Please use SwiftUI or UIKit"]
241 #[unsafe(method(delegate))]
242 #[unsafe(method_family = none)]
243 pub unsafe fn delegate(
244 &self,
245 ) -> Option<Retained<ProtocolObject<dyn TVApplicationControllerDelegate>>>;
246
247 #[cfg(feature = "objc2-ui-kit")]
248 #[deprecated = "Please use SwiftUI or UIKit"]
250 #[unsafe(method(navigationController))]
251 #[unsafe(method_family = none)]
252 pub unsafe fn navigationController(
253 &self,
254 mtm: MainThreadMarker,
255 ) -> Retained<UINavigationController>;
256
257 #[cfg(all(feature = "block2", feature = "objc2-javascript-core"))]
258 #[deprecated = "Please use SwiftUI or UIKit"]
268 #[unsafe(method(evaluateInJavaScriptContext:completion:))]
269 #[unsafe(method_family = none)]
270 pub unsafe fn evaluateInJavaScriptContext_completion(
271 &self,
272 evaluation: &block2::DynBlock<dyn Fn(NonNull<JSContext>)>,
273 completion: Option<&block2::DynBlock<dyn Fn(Bool)>>,
274 );
275
276 #[deprecated = "Please use SwiftUI or UIKit"]
281 #[unsafe(method(stop))]
282 #[unsafe(method_family = none)]
283 pub unsafe fn stop(&self);
284 );
285}
286
287impl TVApplicationController {
289 extern_methods!(
290 #[unsafe(method(new))]
291 #[unsafe(method_family = new)]
292 pub unsafe fn new() -> Retained<Self>;
293 );
294}