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"]
46 #[unsafe(method(setJavaScriptApplicationURL:))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn setJavaScriptApplicationURL(&self, java_script_application_url: &NSURL);
49
50 #[deprecated = "Please use SwiftUI or UIKit"]
52 #[unsafe(method(storageIdentifier))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn storageIdentifier(&self) -> Option<Retained<NSString>>;
55
56 #[deprecated = "Please use SwiftUI or UIKit"]
58 #[unsafe(method(setStorageIdentifier:))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn setStorageIdentifier(&self, storage_identifier: Option<&NSString>);
61
62 #[deprecated = "Please use SwiftUI or UIKit"]
64 #[unsafe(method(supportsPictureInPicturePlayback))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn supportsPictureInPicturePlayback(&self) -> bool;
67
68 #[deprecated = "Please use SwiftUI or UIKit"]
70 #[unsafe(method(setSupportsPictureInPicturePlayback:))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn setSupportsPictureInPicturePlayback(
73 &self,
74 supports_picture_in_picture_playback: bool,
75 );
76
77 #[deprecated = "Please use SwiftUI or UIKit"]
85 #[unsafe(method(launchOptions))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn launchOptions(&self) -> Retained<NSDictionary<NSString, AnyObject>>;
88
89 #[deprecated = "Please use SwiftUI or UIKit"]
91 #[unsafe(method(setLaunchOptions:))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn setLaunchOptions(&self, launch_options: &NSDictionary<NSString, AnyObject>);
94 );
95}
96
97impl TVApplicationControllerContext {
99 extern_methods!(
100 #[unsafe(method(init))]
101 #[unsafe(method_family = init)]
102 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
103
104 #[unsafe(method(new))]
105 #[unsafe(method_family = new)]
106 pub unsafe fn new() -> Retained<Self>;
107 );
108}
109
110extern_protocol!(
111 #[deprecated = "Please use SwiftUI or UIKit"]
113 pub unsafe trait TVApplicationControllerDelegate: NSObjectProtocol {
114 #[cfg(feature = "objc2-javascript-core")]
115 #[deprecated = "Please use SwiftUI or UIKit"]
117 #[optional]
118 #[unsafe(method(appController:evaluateAppJavaScriptInContext:))]
119 #[unsafe(method_family = none)]
120 unsafe fn appController_evaluateAppJavaScriptInContext(
121 &self,
122 app_controller: &TVApplicationController,
123 js_context: &JSContext,
124 );
125
126 #[deprecated = "Please use SwiftUI or UIKit"]
128 #[optional]
129 #[unsafe(method(appController:didFinishLaunchingWithOptions:))]
130 #[unsafe(method_family = none)]
131 unsafe fn appController_didFinishLaunchingWithOptions(
132 &self,
133 app_controller: &TVApplicationController,
134 options: Option<&NSDictionary<NSString, AnyObject>>,
135 );
136
137 #[deprecated = "Please use SwiftUI or UIKit"]
139 #[optional]
140 #[unsafe(method(appController:didFailWithError:))]
141 #[unsafe(method_family = none)]
142 unsafe fn appController_didFailWithError(
143 &self,
144 app_controller: &TVApplicationController,
145 error: &NSError,
146 );
147
148 #[deprecated = "Please use SwiftUI or UIKit"]
150 #[optional]
151 #[unsafe(method(appController:didStopWithOptions:))]
152 #[unsafe(method_family = none)]
153 unsafe fn appController_didStopWithOptions(
154 &self,
155 app_controller: &TVApplicationController,
156 options: Option<&NSDictionary<NSString, AnyObject>>,
157 );
158
159 #[cfg(feature = "TVPlayback")]
160 #[deprecated = "Please use SwiftUI or UIKit"]
162 #[optional]
163 #[unsafe(method(playerForAppController:))]
164 #[unsafe(method_family = none)]
165 unsafe fn playerForAppController(
166 &self,
167 app_controller: &TVApplicationController,
168 ) -> Option<Retained<TVPlayer>>;
169 }
170);
171
172extern_class!(
173 #[unsafe(super(NSObject))]
179 #[derive(Debug, PartialEq, Eq, Hash)]
180 #[deprecated = "Please use SwiftUI or UIKit"]
181 pub struct TVApplicationController;
182);
183
184extern_conformance!(
185 unsafe impl NSObjectProtocol for TVApplicationController {}
186);
187
188impl TVApplicationController {
189 extern_methods!(
190 #[cfg(feature = "objc2-ui-kit")]
191 #[deprecated = "Please use SwiftUI or UIKit"]
197 #[unsafe(method(initWithContext:window:delegate:))]
198 #[unsafe(method_family = init)]
199 pub unsafe fn initWithContext_window_delegate(
200 this: Allocated<Self>,
201 context: &TVApplicationControllerContext,
202 window: Option<&UIWindow>,
203 delegate: Option<&ProtocolObject<dyn TVApplicationControllerDelegate>>,
204 ) -> Retained<Self>;
205
206 #[deprecated = "Please use SwiftUI or UIKit"]
207 #[unsafe(method(init))]
208 #[unsafe(method_family = init)]
209 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
210
211 #[cfg(feature = "objc2-ui-kit")]
212 #[deprecated = "Please use SwiftUI or UIKit"]
213 #[unsafe(method(window))]
214 #[unsafe(method_family = none)]
215 pub unsafe fn window(&self, mtm: MainThreadMarker) -> Option<Retained<UIWindow>>;
216
217 #[deprecated = "Please use SwiftUI or UIKit"]
218 #[unsafe(method(context))]
219 #[unsafe(method_family = none)]
220 pub unsafe fn context(&self) -> Retained<TVApplicationControllerContext>;
221
222 #[deprecated = "Please use SwiftUI or UIKit"]
223 #[unsafe(method(delegate))]
224 #[unsafe(method_family = none)]
225 pub unsafe fn delegate(
226 &self,
227 ) -> Option<Retained<ProtocolObject<dyn TVApplicationControllerDelegate>>>;
228
229 #[cfg(feature = "objc2-ui-kit")]
230 #[deprecated = "Please use SwiftUI or UIKit"]
232 #[unsafe(method(navigationController))]
233 #[unsafe(method_family = none)]
234 pub unsafe fn navigationController(
235 &self,
236 mtm: MainThreadMarker,
237 ) -> Retained<UINavigationController>;
238
239 #[cfg(all(feature = "block2", feature = "objc2-javascript-core"))]
240 #[deprecated = "Please use SwiftUI or UIKit"]
250 #[unsafe(method(evaluateInJavaScriptContext:completion:))]
251 #[unsafe(method_family = none)]
252 pub unsafe fn evaluateInJavaScriptContext_completion(
253 &self,
254 evaluation: &block2::DynBlock<dyn Fn(NonNull<JSContext>)>,
255 completion: Option<&block2::DynBlock<dyn Fn(Bool)>>,
256 );
257
258 #[deprecated = "Please use SwiftUI or UIKit"]
263 #[unsafe(method(stop))]
264 #[unsafe(method_family = none)]
265 pub unsafe fn stop(&self);
266 );
267}
268
269impl TVApplicationController {
271 extern_methods!(
272 #[unsafe(method(new))]
273 #[unsafe(method_family = new)]
274 pub unsafe fn new() -> Retained<Self>;
275 );
276}